Support for python 3.11

Aperta
#98 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
c, python
Ambito
backend

Direzione di ricerca

Inizia riproducendo il comando di installazione pip per Python 3.11 e ispeziona setup.py, http_parser/http_parser.c e http_parser/parser.c nella parte relativa alla compilazione dell’estensione. Verifica se l’errore è dovuto all’incompatibilità del pacchetto o all’assenza dell’header di sviluppo Python.h, quindi verifica che l’installazione venga completata correttamente su Python 3.11.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
C
Stelle
345
Fork
93
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di benoitc/http-parser

Tutte le issue di benoitc/http-parser

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.