Bug 2175138 - python-async-generator fails to build with Python 3.12: RuntimeError: cannot reuse already awaited coroutine
Summary: python-async-generator fails to build with Python 3.12: RuntimeError: cannot ...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: python-async-generator
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carl George 🤠
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2023-03-03 10:34 UTC by Tomáš Hrnčiar
Modified: 2023-09-11 00:23 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-09-11 00:23:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2023-03-03 10:34:47 UTC
python-async-generator fails to build with Python 3.12.0a5.

=================================== FAILURES ===================================
______________________ test_aclose_on_unstarted_generator ______________________

    async def test_aclose_on_unstarted_generator():
        aiter = close_me_aiter([None])
        await aiter.aclose()
>       async for obj in aiter:

async_generator/_tests/test_async_generator.py:313: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
async_generator/_impl.py:366: in step
    return await ANextIter(self._it, start_fn, *args)
async_generator/_impl.py:197: in __next__
    return self._invoke(first_fn, *first_args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <async_generator._impl.ANextIter object at 0x7f76798f9df0>
fn = <method-wrapper '__next__' of coroutine_wrapper object at 0x7f76798f9ed0>
args = ()

    def _invoke(self, fn, *args):
        try:
>           result = fn(*args)
E           RuntimeError: cannot reuse already awaited coroutine

async_generator/_impl.py:209: RuntimeError
=============================== warnings summary ===============================
async_generator/_tests/test_async_generator.py: 31 warnings
async_generator/_tests/test_util.py: 14 warnings
  /builddir/build/BUILD/async_generator-1.10/async_generator/_impl.py:209: DeprecationWarning: the (type, exc, tb) signature of throw() is deprecated, use the single-arg signature instead.
    result = fn(*args)

async_generator/_tests/test_util.py::test_native_contextmanager_do_not_unchain_non_stopiteration_exceptions
async_generator/_tests/test_util.py::test_native_contextmanager_do_not_unchain_non_stopiteration_exceptions
async_generator/_tests/test_util.py::test_native_contextmanager_do_not_unchain_non_stopiteration_exceptions
  /builddir/build/BUILD/async_generator-1.10/async_generator/_util.py:53: DeprecationWarning: the (type, exc, tb) signature of athrow() is deprecated, use the single-arg signature instead.
    await self._agen.athrow(type, value, traceback)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED async_generator/_tests/test_async_generator.py::test_aclose_on_unstarted_generator
================== 1 failed, 42 passed, 48 warnings in 0.21s ===================

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/05573809-python-async-generator/

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

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 Orion Poplawski 2023-06-23 14:13:04 UTC
Time to work towards dropping this package?  See https://github.com/python-trio/async_generator/issues/35

Comment 2 Miro Hrončok 2023-07-01 15:10:19 UTC
$ repoquery -q --repo=rawhide{,-source} --whatrequires python3-async-generator
postfix-mta-sts-resolver-0:1.1.4-2.fc38.noarch
postfix-mta-sts-resolver-0:1.1.4-2.fc38.src
python-aiohttp-0:3.8.4-2.fc39.src DROPPED https://src.fedoraproject.org/rpms/python-aiohttp/c/80a443ee6ee1414c3a943133ad5abfa84bef2240?branch=rawhide
python-geopy-0:2.1.0-9.fc38.src
python-pytest-trio-0:0.8.0-2.fc38.src DROPPED https://src.fedoraproject.org/rpms/python-pytest-trio/c/f078ee67e05c0128024c2f16a3d205c99968968a?branch=rawhide
python-trio-0:0.22.0-2.fc38.src DROPPED https://src.fedoraproject.org/rpms/python-trio/c/ea34afa411dfe61d93c529526feb1fbb7c71206b?branch=rawhide
python3-trio-0:0.22.0-2.fc38.noarch DROPPED as above

Comment 3 Ben Beasley 2023-07-01 15:21:21 UTC
(In reply to Miro Hrončok from comment #2)
> python-geopy-0:2.1.0-9.fc38.src

The dependency on async_generator was dropped upstream in https://github.com/geopy/geopy/commit/9ef1a06814c1aedb30dd4a932eb15cfb4a9a5e06, released in https://github.com/geopy/geopy/releases/tag/2.3.0. Fedora is at 2.1.0, probably because release-monitoring.org wasn’t set up for the package. I fixed that (https://release-monitoring.org/project/69417/) and will work on a PR to update python-geopy when I have a chance. Release 2.2.0 has a breaking change (“Removed GeocodeFarm class: the service is very unstable”), so any update would be Rawhide-only.

Comment 4 Ben Beasley 2023-07-01 16:36:13 UTC
@sanjay.ankur https://src.fedoraproject.org/rpms/python-geopy/pull-request/2

Comment 5 Ben Beasley 2023-07-06 14:49:38 UTC
python-geopy-0:2.1.0-9.fc38.src DROPPED https://src.fedoraproject.org/rpms/python-geopy/c/c023afe8cffd4bd5db9469c962b1448f691649aa?branch=rawhide

Now:

$ repoquery -q --repo=rawhide{,-source} --whatrequires python3-async-generator
postfix-mta-sts-resolver-0:1.1.4-2.fc38.noarch
postfix-mta-sts-resolver-0:1.1.4-2.fc38.src

Comment 6 Orion Poplawski 2023-07-16 20:42:17 UTC
The postfix-mta-sts-resolver dep on async-generator is vestigial.  I've filed https://src.fedoraproject.org/rpms/postfix-mta-sts-resolver/pull-request/1

Comment 7 Fedora Release Engineering 2023-08-16 07:10:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 8 Carl George 🤠 2023-09-11 00:23:49 UTC
The package has been retired.  See bug 2220121 for more details.


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