MagicStack / MagicStack/asyncpg

asyncpg does not install with python 3.12-dev

Ouverte
#1,003 13 commentaires 4 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Python
Étoiles
8.1k
Forks
468
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

See Github CI trace

  • asyncpg version: latest
  • PostgreSQL version: latest
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    : No / Does not apply
  • Python version: 3.12-dev
  • Platform: Github CI
  • Do you use pgbouncer?: No
  • Did you install asyncpg with pip?: Just trying, it fails.
  • If you built asyncpg locally, which version of Cython did you use?: 312
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : I do not know.

Python 3.12, under development, seems to have changed a structure:

      asyncpg/pgproto/pgproto.c: In function ‘__Pyx_PyInt_As_int’:
      asyncpg/pgproto/pgproto.c:40800:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      40800 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~

Also, there are two repeated warnings:

gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12 -c asyncpg/pgproto/pgproto.c -o build/temp.linux-x86_64-cpython-312/asyncpg/pgproto/pgproto.o -O2 -fsigned-char -Wall -Wsign-compare -Wconversion
      asyncpg/pgproto/pgproto.c: In function ‘__pyx_pf_7asyncpg_7pgproto_7pgproto_11WriteBuffer_2__dealloc__’:
      asyncpg/pgproto/pgproto.c:3127:5: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
       3127 |     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BufferError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error)
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12/dictobject.h:90,
                       from /opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12/Python.h:61,
                       from asyncpg/pgproto/pgproto.c:31:
      /opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12/cpython/dictobject.h:22:34: note: declared here
         22 |     Py_DEPRECATED(3.12) uint64_t ma_version_tag;
            |                                  ^~~~~~~~~~~~~~

 /opt/hostedtoolcache/Python/3.12.0-alpha.5/x64/include/python3.12/internal/pycore_code.h:434:41: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Wsign-conversion]
        434 |     return adaptive_counter_bits(value, backoff);
            |                                         ^~~~~~~

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par la trace GitHub CI liée et le fichier généré en échec asyncpg/pgproto/pgproto.c, en reproduisant l’installation avec Python 3.12-dev. Étudiez l’erreur de compilation PyLongObject ob_digit signalée et vérifiez que asyncpg s’installe correctement sur cette version de Python sans l’échec de build signalé.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
postgresql, python
Domaine
databases
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.