Commit f947140
authored
fix: Use
* fix: Use `asyncio.new_event_loop()` to create event loop for tests
Replace the use of `asyncio.get_event_loop()` with more appropriate
`asyncio.new_event_loop()` to create event loops for testing.
The former used to be a wrapper that either returned the currently
running event loop or created a new one, but the latter behavior was
deprecated and removed in Python 3.14. Since the tests are always run
in a synchronous context, and they always run the obtained event loop
to completion, just always create a new event loop.
Fixes #1137
Signed-off-by: Michał Górny <[email protected]>
* fix: Remove obsolete asgiref pin
Remove the `asgiref` pin linked to #1020. I can't reproduce the issue
anymore with the current `asgiref` versions, and the pin actually
breaks the tests with the `asyncio` event loop fixes.
Signed-off-by: Michał Górny <[email protected]>
---------
Signed-off-by: Michał Górny <[email protected]>asyncio.new_event_loop() to create event loop for tests (#1138)1 parent b9e78a3 commit f947140
2 files changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
0 commit comments