python-curio fails to build with Python 3.9.0a2. ERROR curio.kernel:kernel.py:768 Task Crash: Task(id=598, name='test_async_thread_call.<locals>.main', state='TERMINATED') Traceback (most recent call last): File "/builddir/build/BUILDROOT/python-curio-0.9-5.fc32.x86_64/usr/lib/python3.9/site-packages/curio/kernel.py", line 736, in _run_coro trap = current._send(current.next_value) File "/builddir/build/BUILDROOT/python-curio-0.9-5.fc32.x86_64/usr/lib/python3.9/site-packages/curio/task.py", line 167, in _task_runner return await coro File "/builddir/build/BUILD/curio-0.9/tests/test_thread.py", line 296, in main await coro1() File "/builddir/build/BUILD/curio-0.9/tests/test_thread.py", line 289, in coro1 async with spawn_thread(): File "/builddir/build/BUILDROOT/python-curio-0.9-5.fc32.x86_64/usr/lib/python3.9/site-packages/curio/thread.py", line 186, in __aenter__ raise RuntimeError("async/await not allowed inside an async_thread context block") RuntimeError: async/await not allowed inside an async_thread context block ERROR curio.debug:debug.py:56 Task(id=598, name='test_async_thread_call.<locals>.main', state='TERMINATED') crashed Traceback (most recent call last): File "/builddir/build/BUILDROOT/python-curio-0.9-5.fc32.x86_64/usr/lib/python3.9/site-packages/curio/kernel.py", line 736, in _run_coro trap = current._send(current.next_value) File "/builddir/build/BUILDROOT/python-curio-0.9-5.fc32.x86_64/usr/lib/python3.9/site-packages/curio/task.py", line 167, in _task_runner return await coro File "/builddir/build/BUILD/curio-0.9/tests/test_thread.py", line 296, in main await coro1() File "/builddir/build/BUILD/curio-0.9/tests/test_thread.py", line 289, in coro1 async with spawn_thread(): File "/builddir/build/BUILDROOT/python-curio-0.9-5.fc32.x86_64/usr/lib/python3.9/site-packages/curio/thread.py", line 186, in __aenter__ raise RuntimeError("async/await not allowed inside an async_thread context block") RuntimeError: async/await not allowed inside an async_thread context block I don't know yet where is this coming from. For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01148892-python-curio/ For all our attempts to build python-curio with Python 3.9, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-curio/ 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.9: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/ Let us know here if you have any questions. Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9. 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.
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
Carl, could you please have look and report this upstream if needed? Thanks.
Looks like upstream added tests that make outbound internet connections [0]. I sorted it out with a pytest custom marker, but it looks like upstream doesn't typically accept pull requests. I've opened an issue to see if they're interested [1]. I've added it as a patch in the spec file, and it now builds on Rawhide [2] as well as locally with the @python/python3.9 COPR. [0]: https://github.com/dabeaz/curio/commit/96ed9c5375ef6c24b373870f757994268cae36a8 [1]: https://github.com/dabeaz/curio/issues/320 [2]: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c683439106
Thank You!