File tree 5 files changed +279
-171
lines changed
5 files changed +279
-171
lines changed Original file line number Diff line number Diff line change 1
1
[mypy]
2
- files = async_timeout, tests
2
+ files = async_timeout
3
3
check_untyped_defs = True
4
4
follow_imports_for_stubs = True
5
5
disallow_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.
17
17
DEPRECATED
18
18
----------
19
19
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+.
23
21
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.
26
23
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.
31
27
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.
33
31
34
- async-timeout >= 4; python_version < "3.11"
35
32
36
33
Usage example
37
34
-------------
You can’t perform that action at this time.
0 commit comments