Confine async-timeout to Python before 3.11
ProprietaryFor a project that still supports Python before 3.11, use asyncio.timeout from 3.11 and async-timeout only before it: each import of async_timeout is chosen by sys.version_info, and the dependency is declared with the marker python_version < "3.11", so that it is not installed on 3.11 or later. The imports it could not guard are marked, and a project with one keeps its declaration as it is, since that import needs the package on every Python. org.openrewrite.python.migrate.UpgradeToPython311 later removes the fallback and the dependency.
org. openrewrite. python. migrate. FenceAsyncTimeoutmod run . --recipe= org. openrewrite. python. migrate. FenceAsyncTimeoutInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.