Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support for Python 3.10 #236

Closed
cvmvxunm opened this issue Dec 22, 2021 · 2 comments
Closed

Feature request: support for Python 3.10 #236

cvmvxunm opened this issue Dec 22, 2021 · 2 comments

Comments

@cvmvxunm
Copy link

Compilation fails in pvectorcmodule.c due to signed/unsigned int comparison.

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"

In a new Python 3.10 venv:

$ pip install pyrsistent                                                              
Collecting pyrsistent                                                                                                          
  Using cached pyrsistent-0.18.0.tar.gz (104 kB)                                                                               
  Installing build dependencies ... done                                                                                       
  Getting requirements to build wheel ... done                                                                                 
  Preparing metadata (pyproject.toml) ... done                                                                                 
Building wheels for collected packages: pyrsistent                                                                             
  Building wheel for pyrsistent (pyproject.toml) ... error                                                                     
  ERROR: Command errored out with exit status 1:                                                                               
   command: /home/xxx/src/pyrsistent-check/venv/bin/python3.10 /home/xxx/src/pyrsistent-check/venv/lib/python3.10/site-packag
es/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpuq9j40s9                                                   
       cwd: /tmp/pip-install-4m4gr042/pyrsistent_ba135875ad4d4fee90fe778fdf1705eb                                              
  Complete output (104 lines):                                                                                                 
  running bdist_wheel      
  running build                                                                                                                
  running build_py                                                                                                             
  creating build    
  creating build/lib.linux-x86_64-3.10                                                                                         
  copying _pyrsistent_version.py -> build/lib.linux-x86_64-3.10                                                                
  creating build/lib.linux-x86_64-3.10/pyrsistent                                                                              
  copying pyrsistent/_immutable.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                   
  copying pyrsistent/typing.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                       
  copying pyrsistent/_precord.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                     
  copying pyrsistent/_helpers.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                     
  copying pyrsistent/_pbag.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                        
  copying pyrsistent/_checked_types.py -> build/lib.linux-x86_64-3.10/pyrsistent                                               
  copying pyrsistent/_field_common.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                
  copying pyrsistent/__init__.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                     
  copying pyrsistent/_pvector.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                     
  copying pyrsistent/_transformations.py -> build/lib.linux-x86_64-3.10/pyrsistent                                             
  copying pyrsistent/_pdeque.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                      
  copying pyrsistent/_pmap.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                        
  copying pyrsistent/_toolz.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                       
  copying pyrsistent/_pclass.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                      
  copying pyrsistent/_plist.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                       
  copying pyrsistent/_pset.py -> build/lib.linux-x86_64-3.10/pyrsistent                                                        
  copying pyrsistent/py.typed -> build/lib.linux-x86_64-3.10/pyrsistent                                                        
  copying pyrsistent/__init__.pyi -> build/lib.linux-x86_64-3.10/pyrsistent                                                    
  copying pyrsistent/typing.pyi -> build/lib.linux-x86_64-3.10/pyrsistent                                                      
  running build_ext                                            
  creating build/temp.linux-x86_64-3.10                                                                                        
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wf
ormat -Werror=format-security -fPIC -I/home/xxx/src/pyrsistent-check/venv/include -I/usr/include/python3.10 -c pvectorcmodule.
c -o build/temp.linux-x86_64-3.10/pvectorcmodule.o                                                                             
  pvectorcmodule.c: In function ‘nodeFor’:                     
  pvectorcmodule.c:152:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign
-compare]                                                                                                                      
    152 |   if((i >= 0) && (i < self->count)) {                
        |                     ^                                                                                                
  pvectorcmodule.c:153:10: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign
-compare]                                                      
    153 |     if(i >= TAIL_OFF(self)) {                                                                                        
        |          ^~     
  pvectorcmodule.c: In function ‘PVector_repeat’:                                                                              
  pvectorcmodule.c:428:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign
-compare]                                                                                                                      
    428 |       for(j=0; j<self->count; j++) {                 
        |                 ^                                                                                                    
  pvectorcmodule.c: In function ‘extendWithItem’:                                                                              
  pvectorcmodule.c:145:52: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign
-compare]                                                                                                                      
    145 | #define ROOT_NODE_FULL(vec) ((vec->count >> SHIFT) > (1 << vec->shift))                                              
        |                                                    ^
  pvectorcmodule.c:769:8: note: in expansion of macro ‘ROOT_NODE_FULL’                  
      769 |     if(ROOT_NODE_FULL(newVec)) {                     
        |        ^~~~~~~~~~~~~~                                                                                                
  pvectorcmodule.c: In function ‘PVector_append’:
  pvectorcmodule.c:145:52: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign
-compare]
    145 | #define ROOT_NODE_FULL(vec) ((vec->count >> SHIFT) > (1 << vec->shift))
        |                                                    ^
  pvectorcmodule.c:919:6: note: in expansion of macro ‘ROOT_NODE_FULL’
    919 |   if(ROOT_NODE_FULL(self)) {
        |      ^~~~~~~~~~~~~~
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux
-x86_64-3.10/pvectorcmodule.o -L/usr/lib -o build/lib.linux-x86_64-3.10/pvectorc.cpython-310-x86_64-linux-gnu.so
  running install
  Traceback (most recent call last):
    File "/home/xxx/src/pyrsistent-check/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line
 363, in <module>
      main()
    File "/home/xxx/src/pyrsistent-check/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line
 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/xxx/src/pyrsistent-check/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line
 261, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 230, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl', 
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 215, in _build_with_
temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 53, in <module>
      setup(
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
      return run_commands(dist) 
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_com
mands
      dist.run_commands()
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_com
mands
      self.run_command(cmd)
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_com
mand
      cmd_obj.run()
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 335, in run
      self.run_command('install')
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_comm
and
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 985, in run_com
mand
      cmd_obj.ensure_finalized()
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_f
inalized
      self.finalize_options()
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/command/install.py", line 45, in finalize
_options
      orig.install.finalize_options(self)
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 366,
 in finalize_options
      self.finalize_unix()
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 539,
 in finalize_unix
      self.select_scheme("posix_prefix")
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 564,
 in select_scheme
      _select_scheme(self, name)
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 127,
 in _select_scheme
      vars(ob).update(_remove_set(ob, _scheme_attrs(_resolve_scheme(name))))
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 153,
 in _scheme_attrs
      return {
    File "/tmp/pip-build-env-qpka2wgb/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 154,
 in <dictcomp>
      f'install_{key}': scheme[key]
  KeyError: 'headers'
  ----------------------------------------
  ERROR: Failed building wheel for pyrsistent
Failed to build pyrsistent
ERROR: Could not build wheels for pyrsistent, which is required to install pyproject.toml-based projects
@cvmvxunm
Copy link
Author

On further investigation it appears limited only to Python 3.10 which you do not claim to support, so perhaps I should change the issue title to be a feature request.

@cvmvxunm cvmvxunm changed the title pip install pyrsistent fails in Ubuntu 20.04 Feature request: support for Python 3.10 Dec 22, 2021
@tobgu
Copy link
Owner

tobgu commented Jan 12, 2022

Thanks for reporting this, I'll look into it!

@tobgu tobgu closed this as completed in 311653d Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants