Bug 2019853 - python-ratelimiter fails to build with Python 3.11: AttributeError: module 'asyncio' has no attribute 'coroutine'
Summary: python-ratelimiter fails to build with Python 3.11: AttributeError: module 'a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ratelimiter
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Aniket Pradhan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F36FTBFS PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2021-11-03 13:42 UTC by Tomáš Hrnčiar
Modified: 2021-11-13 01:12 UTC (History)
5 users (show)

Fixed In Version: python-ratelimiter-1.2.0-5.post0.fc35 python-ratelimiter-1.2.0-5.post0.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-13 01:06:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-11-03 13:42:11 UTC
python-ratelimiter fails to build with Python 3.11.0a1.

==================================== ERRORS ====================================
______________________ ERROR collecting tests/test_aio.py ______________________
tests/test_aio.py:3: in <module>
    from ratelimiter import RateLimiter
ratelimiter.py:36: in <module>
    class RateLimiter(object):
ratelimiter.py:127: in RateLimiter
    __aexit__ = asyncio.coroutine(__exit__)
E   AttributeError: module 'asyncio' has no attribute 'coroutine'
__________________ ERROR collecting tests/test_ratelimiter.py __________________
tests/test_ratelimiter.py:21: in <module>
    from ratelimiter import RateLimiter
ratelimiter.py:36: in <module>
    class RateLimiter(object):
ratelimiter.py:127: in RateLimiter
    __aexit__ = asyncio.coroutine(__exit__)
E   AttributeError: module 'asyncio' has no attribute 'coroutine'
=============================== warnings summary ===============================
tests/conftest.py:9
  /builddir/build/BUILD/ratelimiter-1.2.0.post0/tests/conftest.py:9: PytestDeprecationWarning: pytest.collect.File was moved to pytest.File
  Please update to the new name.
    class DummyCollector(pytest.collect.File):

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR tests/test_aio.py - AttributeError: module 'asyncio' has no attribute '...
ERROR tests/test_ratelimiter.py - AttributeError: module 'asyncio' has no att...
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 2 errors in 0.08s =========================

The @asyncio.coroutine decorator enabling legacy generator-based coroutines to be compatible with async/await code. The function has been deprecated since Python 3.8 and the removal was initially scheduled for Python 3.10. Use async def instead. (Contributed by Illia Volochii in bpo-43216.)

https://bugs.python.org/issue43216
https://docs.python.org/3.11/whatsnew/3.11.html 

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/02910574-python-ratelimiter/

For all our attempts to build python-ratelimiter with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-ratelimiter/

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

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 Ben Beasley 2021-11-03 16:05:38 UTC
Upstream issue for (previously deprecated, now removed) asyncio.coroutine decorator: https://github.com/RazerM/ratelimiter/issues/10

Candidate fix: https://github.com/RazerM/ratelimiter/pull/11/files

Comment 2 Ben Beasley 2021-11-03 16:30:02 UTC
PR to fix, based on upstream PR#11:
https://src.fedoraproject.org/rpms/python-ratelimiter/pull-request/1

Python 3.11 COPR build for the above PR:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/build/2920283/

Comment 3 Fedora Update System 2021-11-04 12:01:36 UTC
FEDORA-2021-c742d65ec6 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2021-c742d65ec6

Comment 4 Fedora Update System 2021-11-04 12:03:25 UTC
FEDORA-2021-c742d65ec6 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Aniket Pradhan 2021-11-04 12:49:43 UTC
Thanks a lot for the PR Ben... I have merged it and submitted the builds! :cheers:

Comment 6 Fedora Update System 2021-11-04 12:50:48 UTC
FEDORA-2021-0c8a4e4d20 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-0c8a4e4d20

Comment 7 Fedora Update System 2021-11-04 12:50:49 UTC
FEDORA-2021-87a649552e has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-87a649552e

Comment 8 Fedora Update System 2021-11-05 01:21:57 UTC
FEDORA-2021-87a649552e has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-87a649552e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-87a649552e

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

Comment 9 Fedora Update System 2021-11-05 01:38:12 UTC
FEDORA-2021-0c8a4e4d20 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-0c8a4e4d20`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-0c8a4e4d20

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

Comment 10 Fedora Update System 2021-11-13 01:06:25 UTC
FEDORA-2021-87a649552e has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2021-11-13 01:12:54 UTC
FEDORA-2021-0c8a4e4d20 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


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