MagicStack / asyncpg

A fast PostgreSQL Database Client Library for Python/asyncio.
Apache License 2.0
6.99k stars 404 forks source link

Python 3.13 compatibility #1205

Closed bcapitanu closed 1 week ago

bcapitanu commented 1 week ago

The following fails:

python3.13 -m venv venv && source venv/bin/activate
pip install -U pip && pip install asyncdb

Error is:

        File "/private/var/folders/sx/slyqb94j7533_qcdhwzr_rm80000gn/T/pip-build-env-1ommkovk/overlay/lib/python3.13/site-packages/Cython/Compiler/ExprNodes.py", line 4946, in SliceIndexNode
          get_slice_utility_code = TempitaUtilityCode.load(
              "SliceObject", "ObjectHandling.c", context={'access': 'Get'})
        File "/private/var/folders/sx/slyqb94j7533_qcdhwzr_rm80000gn/T/pip-build-env-1ommkovk/overlay/lib/python3.13/site-packages/Cython/Compiler/Code.py", line 404, in load
          return cls(**kwargs)
        File "/private/var/folders/sx/slyqb94j7533_qcdhwzr_rm80000gn/T/pip-build-env-1ommkovk/overlay/lib/python3.13/site-packages/Cython/Compiler/Code.py", line 649, in __init__
          proto = sub_tempita(proto, context, file, name)
        File "/private/var/folders/sx/slyqb94j7533_qcdhwzr_rm80000gn/T/pip-build-env-1ommkovk/overlay/lib/python3.13/site-packages/Cython/Compiler/Code.py", line 641, in sub_tempita
          from ..Tempita import sub
        File "/private/var/folders/sx/slyqb94j7533_qcdhwzr_rm80000gn/T/pip-build-env-1ommkovk/overlay/lib/python3.13/site-packages/Cython/Tempita/__init__.py", line 4, in <module>
          from ._tempita import *
        File "/private/var/folders/sx/slyqb94j7533_qcdhwzr_rm80000gn/T/pip-build-env-1ommkovk/overlay/lib/python3.13/site-packages/Cython/Tempita/_tempita.py", line 36, in <module>
          import cgi
      ModuleNotFoundError: No module named 'cgi'
      [end of output]
bcapitanu commented 1 week ago

According to Python 3.13 release notes, module cgi was removed in 3.13

elprans commented 1 week ago

You're trying to install asyncdb, this repository is for asyncpg, which is a different library and supports Python 3.13 just fine.

bcapitanu commented 1 week ago

OMG - sorry about the false alarm - my bad.

bcapitanu commented 1 week ago

Haha --- well, turns out I actually meant asyncpg not asyncdb in the report --- and indeed I was getting a problem on 3.13 with installing asyncpg==0.29.0 but that seems to have been resolved in 0.30.0 -- so all is good. Apologies again.