python-asyncpg fails to build with Python 3.10.0a7. =================================== FAILURES =================================== ________________________ TestCodecs.test_invalid_input _________________________ > codec.encode(self.settings, writer, arg) asyncpg/protocol/prepared_stmt.pyx:155: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return self.encoder(self, settings, buf, obj) asyncpg/protocol/codecs/base.pyx:193: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > self.c_encoder(settings, buf, obj) asyncpg/protocol/codecs/base.pyx:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > val = cpython.PyLong_AsLong(obj) E TypeError: 'str' object cannot be interpreted as an integer asyncpg/pgproto/codecs/int.pyx:30: TypeError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "asyncpg/protocol/prepared_stmt.pyx", line 155, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg codec.encode(self.settings, writer, arg) File "asyncpg/protocol/codecs/base.pyx", line 193, in asyncpg.protocol.protocol.Codec.encode return self.encoder(self, settings, buf, obj) File "asyncpg/protocol/codecs/base.pyx", line 104, in asyncpg.protocol.protocol.Codec.encode_scalar self.c_encoder(settings, buf, obj) File "asyncpg/pgproto/./codecs/int.pyx", line 30, in asyncpg.pgproto.pgproto.int2_encode val = cpython.PyLong_AsLong(obj) TypeError: 'str' object cannot be interpreted as an integer The above exception was the direct cause of the following exception: asyncpg.exceptions.DataError: invalid input for query argument $1: '2' ('str' object cannot be interpreted as an integer) During handling of the above exception, another exception occurred: self = <tests.test_codecs.TestCodecs testMethod=test_invalid_input> > ??? E AssertionError: "invalid input for query argument \$1:.*an integer is required" does not match "invalid input for query argument $1: '2' ('str' object cannot be interpreted as an integer)" tests/test_codecs.py:-1: AssertionError =========================== short test summary info ============================ FAILED tests/test_codecs.py::TestCodecs::test_invalid_input - AssertionError:... =========== 1 failed, 271 passed, 2 skipped, 1 deselected in 55.35s ============ For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/02148392-python-asyncpg/ For all our attempts to build python-asyncpg with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-asyncpg/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
Reported upstream (https://github.com/MagicStack/asyncpg/issues/750) and patched (see PR https://github.com/MagicStack/asyncpg/pull/751). The latest koji build in Rawhide failed, as did the build in the Python 3.10 COPR—but right now every build with %{pypi_source} in the spec file is failing! I will close this issue after the external problem is fixed and I can get a build done.
Interesting. Looking into the %{pypi_source} problme, might be related to RPM 4.17.
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/YZ3LSY45UPMIU3X3UQLUIJYR52JHUVQG/#POHGBHHZ6U54DRBVWYVBD2LL7DA2OPRP https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/POHGBHHZ6U54DRBVWYVBD2LL7DA2OPRP/
Built in Copr with fixed macros.
Thanks for looking into this. I’ve now built the package in Rawhide too.
Linking the bug for the %{pypi_source} problem for the benefit of any future Bugzilla archaeologists: https://bugzilla.redhat.com/show_bug.cgi?id=1953910