Skip to content

py3.8/cython build error 'asyncpg.protocol.protocol.Codec' has no attribute '__reduce_cython__ #501

Closed
@cpaelzer

Description

@cpaelzer
  • asyncpg version: 0.19
  • PostgreSQL version: 12
  • **Do you use a PostgreSQL SaaS?: No, issue reproduces at build time
  • Python version: 3.8
  • Platform: x86, armhf, arm64, ppc64el, s390x
  • Do you use pgbouncer?: No
  • Did you install asyncpg with pip?: No
  • If you built asyncpg locally, which version of Cython did you use?: 0.29.13
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : Sorry, I don't know

Hi,
I was looking at build issues of asyncpg in recent Ubuntu versions. After some struggle I decided to go ahead and use asyncpg 0.19 for its release page listing PG-12 support.

It passes the PG-12 related issues it failed on before, but it breaks on some odd cython errors that exceed my python-foo. I wanted to report this here in case it might be known or if there are others affected by the same.

The build errors look like:

==================================== ERRORS ====================================
_ ERROR collecting .pybuild/cpython3_3.8_asyncpg/build/tests/test__environment.py _
Traceback (most recent call last):
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/tests/test__environment.py", line 11, in
import asyncpg
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/asyncpg/init.py", line 8, in
from .connection import connect, Connection # NOQA
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/asyncpg/connection.py", line 20, in
from . import connect_utils
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/asyncpg/connect_utils.py", line 27, in
from . import protocol
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/asyncpg/protocol/init.py", line 8, in
from .protocol import Protocol, Record, NO_TIMEOUT # NOQA
File "asyncpg/protocol/protocol.pyx", line 1, in init asyncpg.protocol.protocol
# Copyright (C) 2016-present the asyncpg authors and contributors
File "asyncpg/pgproto/./uuid.pyx", line 162, in init asyncpg.pgproto.pgproto
class UUID(PgBaseUUID, uuid.UUID):
TypeError: multiple bases have instance lay-out conflict
_ ERROR collecting .pybuild/cpython3_3.8_asyncpg/build/tests/test_adversity.py _
Traceback (most recent call last):
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/tests/test_adversity.py", line 13, in
from asyncpg import _testbase as tb
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/asyncpg/init.py", line 8, in
from .connection import connect, Connection # NOQA
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/asyncpg/connection.py", line 20, in
from . import connect_utils
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/asyncpg/connect_utils.py", line 27, in
from . import protocol
File "/<>/.pybuild/cpython3_3.8_asyncpg/build/asyncpg/protocol/init.py", line 8, in
from .protocol import Protocol, Record, NO_TIMEOUT # NOQA
File "asyncpg/protocol/codecs/base.pyx", line 20, in init asyncpg.protocol.protocol
cdef class Codec:
AttributeError: type object 'asyncpg.protocol.protocol.Codec' has no attribute 'reduce_cython'

The latter one is repeating with different sources and trace paths.
A full log is in pastebin here

Note: I first sumbled about pgptoto being removed from the release tarball in 0.19, but I fused it with head of pgproto at 93f8959 as all commits since the last in the git submodule reference read safe and good. If you'd want me to exchange that for another version let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions