Commit 857bdba
authored
Entries may be added or removed from `sys.meta_path` concurrently. For
example, setuptools temporarily adds and removes the `distutils` finder from
the beginning of the list. The local copy ensures that we don't skip over any
entries.
Some packages modify `sys.modules` during import. For example, `collections`
inserts the entry for `collections.abc` into `sys.modules` during import. We
need to ensure that we re-check `sys.modules` *after* the parent module is
fully initialized.
1 parent 8207454 commit 857bdba
File tree
2 files changed
+14
-3
lines changed- Lib/importlib
- Misc/NEWS.d/next/Core_and_Builtins
2 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1247 | 1250 | | |
1248 | 1251 | | |
1249 | 1252 | | |
| |||
1298 | 1301 | | |
1299 | 1302 | | |
1300 | 1303 | | |
1301 | | - | |
1302 | 1304 | | |
1303 | 1305 | | |
1304 | 1306 | | |
| |||
1308 | 1310 | | |
1309 | 1311 | | |
1310 | 1312 | | |
1311 | | - | |
1312 | | - | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1313 | 1316 | | |
1314 | 1317 | | |
1315 | 1318 | | |
1316 | 1319 | | |
1317 | 1320 | | |
1318 | 1321 | | |
1319 | 1322 | | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1320 | 1329 | | |
1321 | 1330 | | |
1322 | 1331 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments