Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1913435 - python-ZEO fails to build with Python 3.10: gather() got an unexpected keyword argument 'loop' (in uvloop, fixed upstream)
Summary: python-ZEO fails to build with Python 3.10: gather() got an unexpected keywor...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ZEO
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2021-01-06 18:42 UTC by Miro Hrončok
Modified: 2021-01-07 16:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-07 10:04:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2021-01-06 18:42:04 UTC
python-ZEO fails to build with Python 3.10.0a4.

Client storage should work with multi-processing. ... SERVER FAILED TO START
Exit status 0
ERROR

======================================================================
ERROR: test_work_with_multiprocessing (ZEO.tests.testZEO.MultiprocessingTests)
Client storage should work with multi-processing.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/tests/testZEO.py", line 1634, in test_work_with_multiprocessing
    addr, adminaddr = self.globs['start_server']()
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/tests/forker.py", line 141, in start_server
    addr, stop = start_zeo_server(
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/_forker.py", line 245, in start_zeo_server
    addr = qout.get(timeout=start_timeout)
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/_forker.py", line 292, in get
    raise Empty()
_queue.Empty

----------------------------------------------------------------------
Ran 6 tests in 33.043s

FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=6 errors=1 failures=0>

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01865287-python-ZEO/

For all our attempts to build python-ZEO with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-ZEO/

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.

Comment 1 Jerry James 2021-01-06 19:09:33 UTC
The server is failing to start:

ERROR    ZEO.tests.forker:_forker.py:154 In server thread
Traceback (most recent call last):
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/_forker.py", line 121, in runner
    server.create_server()
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/runzeo.py", line 249, in create_server
    self.server = create_server(self.storages, self.options)
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/runzeo.py", line 344, in create_server
    return StorageServer(
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/StorageServer.py", line 757, in __init__
    self.acceptor = Acceptor(self, addr, ssl, msgpack)
  File "/builddir/build/BUILD/ZEO-5.2.2/src/ZEO/asyncio/server.py", line 235, in __init__
    server = loop.run_until_complete(f)
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1685, in create_server
TypeError: gather() got an unexpected keyword argument 'loop'

It looks like ZEO expects a several years old version of uvloop.  I'll have to see if we can port forward to a more recent version.

Comment 2 Jerry James 2021-01-06 22:11:35 UTC
src/ZEO/asyncio/compat.py does this:

if PY3:
    import asyncio
    try:
        from uvloop import new_event_loop
    except ImportError:
        from asyncio import new_event_loop

I have verified that if I remove the uvloop BR, forcing the use of asyncio, that all tests pass.  So the problem is definitely related to uvloop somehow.  But isn't uvloop supposed to be a drop-in replacement for asyncio?  The code above is the only explicit mention of uvloop in the sources.  Does that mean there is a bug in uvloop, since asyncio works as expected?

Comment 3 Jerry James 2021-01-06 22:16:19 UTC
Line 1685 of /usr/lib64/python3.10/site-packages/uvloop/loop.pyx:

            infos = await aio_gather(*fs, loop=self)

There's the unexpected 'loop' keyword argument right there.

Comment 4 Miro Hrončok 2021-01-07 09:40:10 UTC
> Does that mean there is a bug in uvloop, since asyncio works as expected?

It seems so. If you want to open a bugzilla for uvloov, please mark it as blocking this one, but do not reassign this bugzilla (we use it for tracking purposes).

Fixed upstream in https://github.com/MagicStack/uvloop/commit/2870219558eba983813aeab249e08371266ab524

Comment 6 Fedora Update System 2021-01-07 10:04:12 UTC
FEDORA-2021-a3274e88eb has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Jerry James 2021-01-07 16:39:27 UTC
Thank you for the diagnosis and fix, Miro!


Note You need to log in before you can comment on or make changes to this bug.