F43 Change Proposal: Deprecate python-async-timeout (self-contained)

Deprecate python-async-timeout

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.

Wiki
Announced

:link: Summary

The python-async-timeout (python3-async-timeout) package will be deprecated in 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.

:link: Owner

:link: Detailed Description

The 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. 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 python-async-timeout from Fedora entirely. Before attempting removal, we need to prevent new packages from depending on it, hence the deprecation.

:link: 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

:link: 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’”

:link: 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.

:link: Scope

  • Proposal owners: Deprecate 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).

:link: 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 python3-libs, since its import name differs. The package will eventually be obsoleted by fedora-obsolete-packages.

:link: How To Test

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

:link: User Experience

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

:link: Dependencies

N/A (not a System Wide Change).

:link: Contingency Plan

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

:link: Documentation

Python asyncio.timeout documentation

:link: 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.

Last edited by @amoloney 2025-03-19T18:22:09Z

Last edited by @amoloney 2025-03-19T18:22:09Z

1 Like

How do you feel about the proposal as written?

  • Strongly in favor
  • In favor, with reservations
  • Neutral
  • Opposed, but could be convinced
  • Strongly opposed
0 voters

If you are in favor but have reservations, or are opposed but something could change your mind, please explain in a reply.

We want everyone to be heard, but many posts repeating the same thing actually makes that harder. If you have something new to say, please say it. If, instead, you find someone has already covered what you’d like to express, please simply give that post a :heart: instead of reiterating. You can even do this by email, by replying with the heart emoji or just “+1”. This will make long topics easier to follow.

Please note that this is an advisory “straw poll” meant to gauge sentiment. It isn’t a vote or a scientific survey. See About the Change Proposals category for more about the Change Process and moderation policy.

This change proposal has now been submitted to FESCo with ticket #3383 for voting.

To find out more, please visit our Changes Policy documentation.

This change has been accepted by FESCo for Fedora Linux 43. A full list of approved changes to date can be found on the Change Set Page.

To find out more about how our changes policy works, please visit our docs site.