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 2203920

Summary: python-uvloop fails to build with Python 3.12: AssertionError: 8 != -1
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-uvloopAssignee: Paul Wouters <paul.wouters>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: aekoroglu, carl, igor.raits, mhroncok, paul.wouters, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-uvloop-0.17.0-7.fc40 python-uvloop-0.17.0-7.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-25 20:58:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2135404, 2220097, 2220131, 2220551, 2226364    

Description Tomáš Hrnčiar 2023-05-15 15:14:10 UTC
python-uvloop fails to build with Python 3.12.0a7.


======================================================================
ERROR: test_process_double_close (tests.test_process.Test_UV_Process.test_process_double_close)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_process.py", line 867, in test_process_double_close
    subprocess.run([sys.executable, '-c', script], check=True)
  File "/usr/lib64/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-c', '\nimport os\nimport sys\nfrom unittest import mock\n\nimport asyncio\n\npipes = []\noriginal_os_pipe = os.pipe\ndef log_pipes():\n    pipe = original_os_pipe()\n    pipes.append(pipe)\n    return pipe\n\ndups = []\noriginal_os_dup = os.dup\ndef log_dups(*args, **kwargs):\n    dup = original_os_dup(*args, **kwargs)\n    dups.append(dup)\n    return dup\n\nwith mock.patch(\n    "os.close", wraps=os.close\n) as os_close, mock.patch(\n    "os.pipe", new=log_pipes\n), mock.patch(\n    "os.dup", new=log_dups\n):\n    import uvloop\n\n\nasync def test():\n    proc = await asyncio.create_subprocess_exec(\n        sys.executable, "-c", "pass"\n    )\n    await proc.communicate()\n\nuvloop.install()\nasyncio.run(test())\n\nstdin, stdout, stderr = dups\n(r, w), = pipes\nassert os_close.mock_calls == [\n    mock.call(w),\n    mock.call(r),\n    mock.call(stderr),\n    mock.call(stdout),\n    mock.call(stdin),\n]\n']' returned non-zero exit status 1.

======================================================================
ERROR: test_aiohttp_graceful_shutdown (tests.test_aiohttp.Test_AIO_AioHTTP.test_aiohttp_graceful_shutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.12/asyncio/tasks.py", line 477, in wait_for
    return await fut
           ^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/aiohttp/web_runner.py", line 293, in cleanup
    await site.stop()
  File "/usr/lib64/python3.12/site-packages/aiohttp/web_runner.py", line 75, in stop
    await self._server.wait_closed()
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 384, in wait_closed
    await waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_aiohttp.py", line 101, in test_aiohttp_graceful_shutdown
    self.loop.run_until_complete(stop())
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_aiohttp.py", line 93, in stop
    await asyncio.wait_for(runner.cleanup(), timeout=0.1)
  File "/usr/lib64/python3.12/asyncio/tasks.py", line 476, in wait_for
    async with timeouts.timeout(timeout):
  File "/usr/lib64/python3.12/asyncio/timeouts.py", line 111, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

======================================================================
FAIL: test_create_unix_server_1 (tests.test_unix.Test_AIO_Unix.test_create_unix_server_1) (func='start_unix_server(host, port)')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_unix.py", line 129, in test_create_unix_server_1
    self.loop.run_until_complete(start_server())
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_unix.py", line 86, in start_server
    self.assertEqual(srv_sock.fileno(), -1)
AssertionError: 6 != -1

======================================================================
FAIL: test_create_unix_server_1 (tests.test_unix.Test_AIO_Unix.test_create_unix_server_1) (func='start_unix_server(sock)')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_unix.py", line 133, in test_create_unix_server_1
    self.loop.run_until_complete(start_server_sock(
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_unix.py", line 121, in start_server_sock
    self.assertEqual(srv_sock.fileno(), -1)
AssertionError: 6 != -1

======================================================================
FAIL: test_create_unix_server_1 (tests.test_unix.Test_AIO_Unix.test_create_unix_server_1) (func='start_server(sock)')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_unix.py", line 141, in test_create_unix_server_1
    self.loop.run_until_complete(start_server_sock(
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_unix.py", line 121, in start_server_sock
    self.assertEqual(srv_sock.fileno(), -1)
AssertionError: 6 != -1

======================================================================
FAIL: test_create_server_1 (tests.test_tcp.Test_AIO_TCP.test_create_server_1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_tcp.py", line 177, in test_create_server_1
    self.loop.run_until_complete(start_server())
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_tcp.py", line 138, in start_server
    self.assertEqual(srv_sock.fileno(), -1)
AssertionError: 8 != -1

======================================================================
FAIL: test_create_server_3 (tests.test_tcp.Test_AIO_TCP.test_create_server_3)
check ephemeral port can be used
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_tcp.py", line 214, in test_create_server_3
    self.loop.run_until_complete(start_server_ephemeral_ports())
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/uvloop-0.17.0/tests/test_tcp.py", line 210, in start_server_ephemeral_ports
    self.assertEqual(srv_sock.fileno(), -1)
AssertionError: 8 != -1

----------------------------------------------------------------------
Ran 506 tests in 75.357s

FAILED (failures=5, errors=2, skipped=33)

https://docs.python.org/3.12/whatsnew/3.12.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05919490-python-uvloop/

For all our attempts to build python-uvloop with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/python-uvloop/

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.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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 Fedora Release Engineering 2023-08-16 07:14:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 2 Fedora Admin user for bugzilla script actions 2023-09-05 00:53:01 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 3 Fedora Admin user for bugzilla script actions 2023-09-06 00:44:19 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 4 Fedora Update System 2023-09-25 20:57:00 UTC
FEDORA-2023-5967d3ecde has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-5967d3ecde

Comment 5 Fedora Update System 2023-09-25 20:58:43 UTC
FEDORA-2023-5967d3ecde has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2023-09-26 03:39:29 UTC
FEDORA-2023-ae19f823c9 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-ae19f823c9

Comment 7 Fedora Update System 2023-09-27 01:25:16 UTC
FEDORA-2023-ae19f823c9 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-ae19f823c9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-ae19f823c9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-10-04 17:15:19 UTC
FEDORA-2023-ae19f823c9 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.