File tree Expand file tree Collapse file tree 5 files changed +279
-171
lines changed
Expand file tree Collapse file tree 5 files changed +279
-171
lines changed Original file line number Diff line number Diff line change 11[mypy]
2- files = async_timeout, tests
2+ files = async_timeout
33check_untyped_defs = True
44follow_imports_for_stubs = True
55disallow_any_decorated = True
Original file line number Diff line number Diff line change 1+ Make ``asyncio_timeout `` fully compatible with the standard ``asyncio.Timeout `` but keep backward compatibility with existing ``asyncio_timeout.Timeout `` API.
Original file line number Diff line number Diff line change @@ -17,21 +17,18 @@ asyncio-compatible timeout context manager.
1717DEPRECATED
1818----------
1919
20- This library has effectively been upstreamed into Python 3.11+. Therefore this library
21- is considered deprecated and no longer supported. We'll keep the project open in the
22- unlikely case of security issues until Python 3.10 is officially unsupported.
20+ This library has effectively been upstreamed into Python 3.11+.
2321
24- To migrate a project that needs to support multiple Python versions, we suggest
25- using this code (used in our other projects, such as aiohttp)::
22+ Therefore this library is considered deprecated and no longer actively supported.
2623
27- if sys.version_info >= (3, 11):
28- import asyncio as async_timeout
29- else:
30- import async_timeout
24+ Version 5.0+ provides dual-mode when executed on Python 3.11+:
25+ ``asyncio_timeout.Timeout `` is fully compatible with ``asyncio.Timeout `` *and * old
26+ versions of the library.
3127
32- Then in your dependencies, use::
28+ Anyway, using upstream is highly recommended. ``asyncio_timeout `` exists only for the
29+ sake of backward compatibility, easy supporting both old and new Python by the same
30+ code, and easy misgration.
3331
34- async-timeout >= 4; python_version < "3.11"
3532
3633Usage example
3734-------------
You can’t perform that action at this time.
0 commit comments