# Scheduled ## 3.15 - [ ] Remove `__package__` - [ ] Remove `__cached__` - [ ] Remove `*.load_module()` - [ ] abc - [ ] Loader.load_module() - [ ] InspectLoader.load_module() - [ ] FileLoader.load_module() - [ ] SourceLoader.load_module() - [ ] machinery - [ ] SourceFileLoader.load_module() - [ ] SourcelessFileLoader.load_module() - [ ] Remove `cache_from_source(..., debug_override=...)` ## 3.16 - [ ] Remove `__loader__` ## 3.18 - [ ] Remove `Tools/wasm/wasi-env` (including Buildbot update) ## 3.20 - [ ] Remove `Tools/wasm/wasi.py` # Plans ## importlib ### Deprecated #### 3.10 - abc - ResourceLoader (**docs**) - SourceLoader.path_mtime() (**docs**) - machinery - DEBUG_BYTECODE_SUFFIXES (**docs**) - OPTIMIZED_BYTECODE_SUFFIXES (**docs**) - WindowsRegistryFinder (**docs**) ### Only use `__spec__` https://github.com/python/cpython/issues/65961 #### Drop `__loader__` - [x] Make sure all Python code uses of the attribute fall back on `__spec__` (done in 3.10) - [ ] Update C code to fall back to using `__spec__` ([issue](https://bugs.python.org/issue42132)) - [ ] Add an `ImportWarning` when the attribute is used but it differs from `__spec__` - [ ] Update code to prefer the spec over the attribute, raising `ImportWarning` when having to fall back to the attribute - [ ] Update [https://docs.python.org/3/library/types.html#types.ModuleType](https://docs.python.org/3/library/types.html#types.ModuleType) as appropriate - [ ] Change `ImportWarning` to `DeprecationWarning` when falling back to the attribute - [ ] Update [https://docs.python.org/3/library/types.html#types.ModuleType](https://docs.python.org/3/library/types.html#types.ModuleType) as appropriate - [ ] Remove code in `importlib` that used the old attribute - [ ] Add a DeprecationWarning when `__loader__ != __spec__.loader` or `__spec__.loader` is not set. - [ ] Remove code in importlib that used the old attribute ## Deprecate `pkgutil` https://github.com/python/cpython/issues/64138 https://github.com/python/cpython/issues/69719