File tree 4 files changed +14
-32
lines changed
4 files changed +14
-32
lines changed Original file line number Diff line number Diff line change @@ -85,16 +85,26 @@ jobs:
85
85
python -m pytest tests
86
86
python -m coverage xml
87
87
- name : Upload coverage
88
- uses : codecov/codecov-action@v3
88
+ uses : codecov/codecov-action@v4
89
89
with :
90
90
file : ./coverage.xml
91
91
flags : unit
92
92
fail_ci_if_error : false
93
93
94
+ test-summary :
95
+ if : always()
96
+ needs : [lint, test]
97
+ runs-on : ubuntu-latest
98
+ steps :
99
+ - name : Test matrix status
100
+ uses : re-actors/alls-green@release/v1
101
+ with :
102
+ jobs : ${{ toJSON(needs) }}
103
+
94
104
deploy :
95
105
name : Deploy
96
106
runs-on : ubuntu-latest
97
- needs : test
107
+ needs : test-summary
98
108
# Run only on pushing a tag
99
109
if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
100
110
steps :
Original file line number Diff line number Diff line change
1
+ Drop deprecated sync context manager support, use ``async with timeout(...): ... `` instead.
Original file line number Diff line number Diff line change 1
1
import asyncio
2
2
import enum
3
3
import sys
4
- import warnings
5
4
from types import TracebackType
6
- from typing import Optional , Type
7
-
8
-
9
- from typing import final
5
+ from typing import Optional , Type , final
10
6
11
7
12
8
if sys .version_info >= (3 , 11 ):
@@ -107,24 +103,6 @@ def __init__(
107
103
else :
108
104
self .update (deadline )
109
105
110
- def __enter__ (self ) -> "Timeout" :
111
- warnings .warn (
112
- "with timeout() is deprecated, use async with timeout() instead" ,
113
- DeprecationWarning ,
114
- stacklevel = 2 ,
115
- )
116
- self ._do_enter ()
117
- return self
118
-
119
- def __exit__ (
120
- self ,
121
- exc_type : Optional [Type [BaseException ]],
122
- exc_val : Optional [BaseException ],
123
- exc_tb : Optional [TracebackType ],
124
- ) -> Optional [bool ]:
125
- self ._do_exit (exc_type )
126
- return None
127
-
128
106
async def __aenter__ (self ) -> "Timeout" :
129
107
self ._do_enter ()
130
108
return self
Original file line number Diff line number Diff line change @@ -360,10 +360,3 @@ async def test_enter_twice() -> None:
360
360
with pytest .raises (RuntimeError , match = "invalid state EXIT" ):
361
361
async with t :
362
362
await asyncio .sleep (0 )
363
-
364
-
365
- @pytest .mark .asyncio
366
- async def test_deprecated_with () -> None :
367
- with pytest .warns (DeprecationWarning ):
368
- with timeout (1 ):
369
- await asyncio .sleep (0 )
You can’t perform that action at this time.
0 commit comments