File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change
1
+ import asyncio
1
2
import threading
2
3
from types import TracebackType
3
4
from typing import Optional , Type
@@ -64,7 +65,7 @@ def setup(self) -> None:
64
65
if self ._backend == "trio" :
65
66
self ._trio_lock = trio .Lock ()
66
67
elif self ._backend == "asyncio" :
67
- self ._anyio_lock = anyio .Lock ()
68
+ self ._anyio_lock = anyio .Lock (fast_acquire = True )
68
69
69
70
async def __aenter__ (self ) -> "AsyncLock" :
70
71
if not self ._backend :
@@ -167,7 +168,7 @@ def setup(self) -> None:
167
168
)
168
169
elif self ._backend == "asyncio" :
169
170
self ._anyio_semaphore = anyio .Semaphore (
170
- initial_value = self ._bound , max_value = self ._bound
171
+ initial_value = self ._bound , max_value = self ._bound , fast_acquire = True
171
172
)
172
173
173
174
async def acquire (self ) -> None :
Original file line number Diff line number Diff line change @@ -44,9 +44,12 @@ trio = [
44
44
" trio>=0.22.0,<0.26.0" ,
45
45
]
46
46
asyncio = [
47
- " anyio>=4.0,<5.0 " ,
47
+ " anyio @ {root:parent:uri}/anyio " ,
48
48
]
49
49
50
+ [tool .hatch .metadata ]
51
+ allow-direct-references = true
52
+
50
53
[project .urls ]
51
54
Documentation = " https://www.encode.io/httpcore"
52
55
Homepage = " https://www.encode.io/httpcore/"
You can’t perform that action at this time.
0 commit comments