Commit 4340e54
authored
fix: Stop unconditionally importing
Use the existing `_get_contextvars()` compatibility helper. The thread-local fallback is still needed for Python 3.6 because `contextvars` was added to the standard library in Python 3.7.
The `ImportError` is a regression introduced by 2604409. That commit ported code from a branch where the minimum supported Python version had already been raised to 3.7.contextvars (#6625)1 parent dafa2bd commit 4340e54
1 file changed
Lines changed: 20 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | 86 | | |
111 | 87 | | |
112 | 88 | | |
| |||
1468 | 1444 | | |
1469 | 1445 | | |
1470 | 1446 | | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1471 | 1467 | | |
1472 | 1468 | | |
1473 | 1469 | | |
| |||
0 commit comments