benoitc / benoitc/http-parser

Support for python 3.11

Open
#98 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
C
Stars
345
Forks
94
PR merge metrics
No merged PRs in 30d

Description

Hi,

Looks like the pip install for python 3.11 is failing with the below error

Is it because there is no support for python3.11?

Please help me overcome this issue.

Thanks in advance.

```
http-parser$ python3.11 -m pip install http-parser
Defaulting to user installation because normal site-packages is not writeable
Collecting http-parser
Using cached http-parser-0.9.0.tar.gz (167 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: http-parser
Building wheel for http-parser (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
/tmp/pip-install-87f67s16/http-parser_70fb4870541b4fc9ac3bfe953fb58d23/setup.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
from imp import load_source
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.11
creating build/lib.linux-x86_64-3.11/http_parser
copying http_parser/__init__.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/reader.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/util.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/_socketio.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/pyparser.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/http.py -> build/lib.linux-x86_64-3.11/http_parser
running build_ext
building 'http_parser.parser' extension
creating build/temp.linux-x86_64-3.11
creating build/temp.linux-x86_64-3.11/http_parser
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iparser -I/usr/include/python3.11 -c http_parser/http_parser.c -o build/temp.linux-x86_64-3.11/http_parser/http_parser.o
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iparser -I/usr/include/python3.11 -c http_parser/parser.c -o build/temp.linux-x86_64-3.11/http_parser/parser.o
http_parser/parser.c:4:10: fatal error: Python.h: No such file or directory
4 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for http-parser
Running setup.py clean for http-parser
Failed to build http-parser
Installing collected packages: http-parser
Running setup.py install for http-parser ... error
error: subprocess-exited-with-error

× Running setup.py install for http-parser did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
/tmp/pip-install-87f67s16/http-parser_70fb4870541b4fc9ac3bfe953fb58d23/setup.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
from imp import load_source
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.11
creating build/lib.linux-x86_64-3.11/http_parser
copying http_parser/__init__.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/reader.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/util.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/_socketio.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/pyparser.py -> build/lib.linux-x86_64-3.11/http_parser
copying http_parser/http.py -> build/lib.linux-x86_64-3.11/http_parser
running build_ext
building 'http_parser.parser' extension
creating build/temp.linux-x86_64-3.11
creating build/temp.linux-x86_64-3.11/http_parser
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iparser -I/usr/include/python3.11 -c http_parser/http_parser.c -o build/temp.linux-x86_64-3.11/http_parser/http_parser.o
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iparser -I/usr/include/python3.11 -c http_parser/parser.c -o build/temp.linux-x86_64-3.11/http_parser/parser.o
http_parser/parser.c:4:10: fatal error: Python.h: No such file or directory
4 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> http-parser

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.