Skip to content

Python 3.11 support #632

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

Closed
gen-xu opened this issue Oct 26, 2022 · 2 comments · Fixed by #646
Closed

Python 3.11 support #632

gen-xu opened this issue Oct 26, 2022 · 2 comments · Fixed by #646
Assignees

Comments

@gen-xu
Copy link
Contributor

gen-xu commented Oct 26, 2022

python 3.11 is released on 2022-10-24 this Monday. Current pip install with Python 3.11 fails and gives this failure

      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/__init__.py -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/schema.py -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/wiring.py -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/resources.py -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/errors.py -> build/lib.linux-x86_64-cpython-311/dependency_injector
      creating build/lib.linux-x86_64-cpython-311/dependency_injector/ext
      copying src/dependency_injector/ext/__init__.py -> build/lib.linux-x86_64-cpython-311/dependency_injector/ext
      copying src/dependency_injector/ext/aiohttp.py -> build/lib.linux-x86_64-cpython-311/dependency_injector/ext
      copying src/dependency_injector/ext/flask.py -> build/lib.linux-x86_64-cpython-311/dependency_injector/ext
      copying src/dependency_injector/containers.pxd -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/providers.pxd -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/providers.pyi -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/__init__.pyi -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/containers.pyi -> build/lib.linux-x86_64-cpython-311/dependency_injector
      copying src/dependency_injector/py.typed -> build/lib.linux-x86_64-cpython-311/dependency_injector
      running build_ext
      building 'dependency_injector.containers' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/dependency_injector
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/local/include/python3.11 -c src/dependency_injector/containers.c -o build/temp.linux-x86_64-cpython-311/src/dependency_injector/containers.o -O2
      src/dependency_injector/containers.c:198:12: fatal error: longintrepr.h: No such file or directory
        198 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
@rmk135 rmk135 self-assigned this Oct 26, 2022
@theobouwman
Copy link

theobouwman commented Dec 8, 2022

I am getting this issue with tiangolo/uvicorn-gunicorn:python3.11-slim:

    creating build/temp.linux-x86_64-cpython-311/src/dependency_injector
#8 53.96       gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/local/include/python3.11 -c src/dependency_injector/containers.c -o build/temp.linux-x86_64-cpython-311/src/dependency_injector/containers.o -O2
#8 53.96       error: command 'gcc' failed: No such file or directory
#8 53.96       [end of output]
#8 53.96   
#8 53.96   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 53.96 error: legacy-install-failure
#8 53.96 
#8 53.96 × Encountered error while trying to install package.
#8 53.96 ╰─> dependency-injector
#8 53.96 

@rmk135
Copy link
Member

rmk135 commented Dec 19, 2022

Added Python 3.11 support in 4.41.0. Thanks @gen-xu for the help!

@rmk135 rmk135 closed this as completed Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants