Repository navigation
Commit a6e6361
authored
Destructors can run after finalization has cleared the interpreter's
lazy_modules set and lazy_pending_submodules dict. Declaring or
resolving a lazy import from one of them passed NULL to PySet_Add(),
PySet_Discard() or the pending-submodules lookup.
Treat the bookkeeping as a no-op once the state is gone, as the other
readers of this state already do.
1 parent 1b81f4f commit a6e6361
3 files changed
Lines changed: 69 additions & 3 deletions
File tree
- Lib/test/test_lazy_import
- Misc/NEWS.d/next/Core_and_Builtins
- Python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2820 | 2820 | | |
2821 | 2821 | | |
2822 | 2822 | | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
2823 | 2878 | | |
2824 | 2879 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
290 | 293 | | |
291 | 294 | | |
292 | 295 | | |
| |||
4179 | 4182 | | |
4180 | 4183 | | |
4181 | 4184 | | |
4182 | | - | |
| 4185 | + | |
| 4186 | + | |
| 4187 | + | |
| 4188 | + | |
4183 | 4189 | | |
4184 | 4190 | | |
4185 | 4191 | | |
| |||
4213 | 4219 | | |
4214 | 4220 | | |
4215 | 4221 | | |
4216 | | - | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
4217 | 4226 | | |
4218 | 4227 | | |
4219 | 4228 | | |
| |||
5575 | 5584 | | |
5576 | 5585 | | |
5577 | 5586 | | |
5578 | | - | |
| 5587 | + | |
5579 | 5588 | | |
5580 | 5589 | | |
5581 | 5590 | | |
| |||
0 commit comments