File tree Expand file tree Collapse file tree 4 files changed +14
-32
lines changed
Expand file tree Collapse file tree 4 files changed +14
-32
lines changed Original file line number Diff line number Diff line change @@ -85,16 +85,26 @@ jobs:
8585 python -m pytest tests
8686 python -m coverage xml
8787 - name : Upload coverage
88- uses : codecov/codecov-action@v3
88+ uses : codecov/codecov-action@v4
8989 with :
9090 file : ./coverage.xml
9191 flags : unit
9292 fail_ci_if_error : false
9393
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+
94104 deploy :
95105 name : Deploy
96106 runs-on : ubuntu-latest
97- needs : test
107+ needs : test-summary
98108 # Run only on pushing a tag
99109 if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
100110 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 11import asyncio
22import enum
33import sys
4- import warnings
54from types import TracebackType
6- from typing import Optional , Type
7-
8-
9- from typing import final
5+ from typing import Optional , Type , final
106
117
128if sys .version_info >= (3 , 11 ):
@@ -107,24 +103,6 @@ def __init__(
107103 else :
108104 self .update (deadline )
109105
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-
128106 async def __aenter__ (self ) -> "Timeout" :
129107 self ._do_enter ()
130108 return self
Original file line number Diff line number Diff line change @@ -360,10 +360,3 @@ async def test_enter_twice() -> None:
360360 with pytest .raises (RuntimeError , match = "invalid state EXIT" ):
361361 async with t :
362362 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