Wiki - https://fedoraproject.org/wiki/Changes/DeprecatePythonAsyncTimeout
Discussion thread -
https://discussion.fedoraproject.org/t/f43-change-proposal-deprecate-python-async-timeout-self-contained/147315

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes
process, proposals are publicly announced in order to receive
community feedback. This proposal will only be implemented if approved
by the Fedora Engineering Steering Committee.

== Summary ==

The {{package|python-async-timeout}}
({{package|python3-async-timeout}}) package will be
[https://docs.fedoraproject.org/en-US/packaging-guidelines/deprecating-packages/
deprecated] in [[Releases/43|Fedora 43]]. The package provides timeout
utilities for asyncio, but as of Python 3.11, its functionality has
been integrated into the standard library. Fedora packages should use
`asyncio.Timeout` instead. Many still depend on `async-timeout`, so we
cannot remove it yet. Packagers are encouraged to work with upstream
to switch to `asyncio.Timeout` if possible. A simple try-import
mechanism can be applied as a temporary (or even permanent) downstream
solution.

== Owner ==

* Name: [[User:lbalhar| Lumír Balhar]]
* Email: lbal...@redhat.com


== Detailed Description ==

The {{package|python-async-timeout}} package provides timeout
utilities for applications using asyncio module. However, starting
from Python 3.11, the core functionality of this package has been
integrated into the standard library, and:

* Version 5.0+ of `async-timeout` provides dual-mode execution on
Python 3.11+, where `asyncio_timeout.Timeout` is fully compatible with
`asyncio.Timeout`.
[https://src.fedoraproject.org/rpms/python-async-timeout/pull-request/5
Update to 5.0.1] in rawhide is in progress.
* The library is no longer actively supported upstream and exists
primarily for backward compatibility and easing migration.

Given that Fedora ships with modern Python versions, using this
library as a separate package is redundant. We'd like to encourage
both downstream packages and upstream projects to switch to
`asyncio.Timeout` instead. Eventually, we aim to remove
{{package|python-async-timeout}} from Fedora entirely. Before
attempting removal, we need to prevent new packages from depending on
it, hence the deprecation.

=== Affected packages ===

As of now (March 2025), there are 29 packages in rawhide depending on
python3-async-timeout:

 $ dnf repoquery --repo=rawhide,rawhide-source --whatrequires
python3-async-timeout
 gns3-server-0:2.2.53-3.fc43.noarch
 python-aioesphomeapi-0:15.0.0-4.fc42.src
 python-aiokafka-0:0.12.0-2.fc42.src
 python-async-upnp-client-0:0.14.15-16.fc42.src
 python-enturclient-0:0.2.1-16.fc42.src
 python-httpx-socks-0:0.10.0-1.fc43.src
 python-pycomfoair-0:0.0.4-15.fc42.src
 python-pygmtools-0:0.5.3-4.fc42.src
 python-pysqueezebox-0:0.5.5-17.fc42.src
 python-socks-0:2.7.1-1.fc43.src
 python3-aioesphomeapi-0:15.0.0-4.fc42.noarch
 python3-aiokafka-0:0.12.0-2.fc42.x86_64
 python3-aiopg-0:1.3.4-10.fc42.noarch
 python3-async-upnp-client-0:0.14.15-16.fc42.noarch
 python3-dingz-0:0.5.0-10.fc42.noarch
 python3-enturclient-0:0.2.1-16.fc42.noarch
 python3-epson-projector-0:0.2.3-15.fc42.noarch
 python3-glances-api-0:0.2.0-23.fc42.noarch
 python3-hole-0:0.7.0-9.fc42.noarch
 python3-httpx-socks+asyncio-0:0.10.0-1.fc43.noarch
 python3-metno-0:0.8.1-15.fc42.noarch
 python3-netdata-0:0.2.0-17.fc42.noarch
 python3-opensensemap-api-0:0.1.5-23.fc42.noarch
 python3-pycomfoair-0:0.0.4-15.fc42.noarch
 python3-pygmtools-0:0.5.3-4.fc42.noarch
 python3-pysqueezebox-0:0.5.5-17.fc42.noarch
 python3-volkszaehler-0:0.2.1-15.fc42.noarch
 python3-waqiasync-0:1.0.0-15.fc42.noarch
 python3-webthing-ws-0:0.1.0-19.fc42.noarch

=== How to migrate to `asyncio.Timeout` ===

For projects that need to maintain compatibility with both old and new
Python versions, performing the following conditional import should be
enough:

 import sys
 if sys.version_info >= (3, 11):
     from asyncio import timeout, timeout_at
 else:
     from async_timeout import timeout, timeout_at

Upstream projects should also depend on `async-timeout` only for
Python releases older than 3.11:

 "async-timeout; python_version < '3.11'"

== Benefit to Fedora ==

Eventually, we might be able to eliminate the need to maintain a
separate timeout library for asyncio, reducing redundancy and
improving compatibility with upstream Python.

== Scope ==

* Proposal owners: Deprecate {{package|python3-async-timeout}} and
update its package description. Provide migration assistance to other
packagers if needed.
* Other developers: No immediate action required, but developers are
encouraged to transition their packages to `asyncio.Timeout` where
possible.
* Release engineering: No impact on Release Engineering is anticipated.
* Policies and guidelines: N/A (not a System Wide Change).
* Trademark approval: N/A (not needed for this Change).
* Alignment with Objectives: N/A (not needed for this Change).

== Upgrade/compatibility impact ==

The package will remain available in Fedora for now, but new packages
should not depend on it. Eventually, when it is retired, we do not
plan to obsolete/provide python3-async-timeout from
{{package|python3-libs}}, since its import name differs. The package
will eventually be obsoleted by {{package|fedora-obsolete-packages}}.

== How To Test ==

  $ repoquery --repo=rawhide --provides python3-async-timeout
  ...
  deprecated()
  ...

== User Experience ==

No immediate changes for end users. Developers should transition to
`asyncio.Timeout` as their codebases update to Python 3.11+.

== Dependencies ==

N/A (not a System Wide Change).

== Contingency Plan ==

* Contingency mechanism: N/A (not a System Wide Change).
* Contingency deadline: N/A (not a System Wide Change).
* Blocks release? No.

== Documentation ==

[https://docs.python.org/3/library/asyncio-task.html#asyncio.timeout
Python asyncio.timeout documentation]

== Release Notes ==

The `python-async-timeout` package has been deprecated in Fedora.
Developers are encouraged to migrate to `asyncio.Timeout` in Python
3.11+ for improved compatibility with the standard library.



--
Aoife Moloney

Fedora Operations Architect

Fedora Project

Matrix: @amoloney:fedora.im

IRC: amoloney

-- 
_______________________________________________
devel-announce mailing list -- devel-annou...@lists.fedoraproject.org
To unsubscribe send an email to devel-announce-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel-annou...@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue
-- 
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to