# Scheduled ## 3.16 - [ ] Remove `__loader__` once distlib gets updated in pip - [ ] DDrop any mention of ditching `__package__` ## 3.18 - [ ] Remove `Tools/wasm/wasi-env` (and update Buildbot) ## 3.20 - [ ] Remove `Tools/wasm/wasi.py` (and update buildbot) # Plans ## importlib ### Deprecated ### Only use `__spec__` https://github.com/python/cpython/issues/65961 - `__package__` still in use (e.g. pip) - `__loader__` seems to typically be treated as optional #### Drop `__loader__` - [x] Make sure all Python code uses of the attribute fall back on `__spec__` (done in 3.10) - [x] Update C code to fall back to using `__spec__` ([issue](https://bugs.python.org/issue42132)) - [x] Add an `ImportWarning` when the attribute is used but it differs from `__spec__` - [x] Update code to prefer the spec over the attribute, raising `ImportWarning` when having to fall back to the attribute - [x] Update [https://docs.python.org/3/library/types.html#types.ModuleType](https://docs.python.org/3/library/types.html#types.ModuleType) as appropriate - [x] Change `ImportWarning` to `DeprecationWarning` when falling back to the attribute - [x] Update [https://docs.python.org/3/library/types.html#types.ModuleType](https://docs.python.org/3/library/types.html#types.ModuleType) as appropriate - [x] Remove code in `importlib` that used the old attribute - [x] Add a DeprecationWarning when `__loader__ != __spec__.loader` or `__spec__.loader` is not set. - [ ] Remove code in importlib that used the old attribute