Commit bdbb491
committed
Use thread inheritable contextvars.
Change `warnings` and `decimal` to use thread inheritable context vars.
This means new threads will start with bindings for these variables from
the starter thread, rather than having empty bindings (no matter the
value of the thread_inherit_context flag).1 parent 1f146e6 commit bdbb491
5 files changed
Lines changed: 9 additions & 8 deletions
File tree
- Lib
- test/test_warnings
- Modules/_decimal
- Python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1807 | 1807 | | |
1808 | 1808 | | |
1809 | 1809 | | |
1810 | | - | |
1811 | | - | |
| 1810 | + | |
| 1811 | + | |
1812 | 1812 | | |
1813 | 1813 | | |
1814 | | - | |
1815 | | - | |
| 1814 | + | |
1816 | 1815 | | |
1817 | 1816 | | |
1818 | 1817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7931 | 7931 | | |
7932 | 7932 | | |
7933 | 7933 | | |
7934 | | - | |
| 7934 | + | |
7935 | 7935 | | |
7936 | 7936 | | |
7937 | 7937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
0 commit comments