# Scheduled ## 3.16 - [ ] `__loader__` - [ ] Drop `__loader__` from pip - [x] distlib - [ ] [pkg_resources](https://github.com/pypa/pip/blob/4b71f36fb4dfbc87ce65ac4710eeccf81d379f55/src/pip/_vendor/pkg_resources/__init__.py#L140) - [ ] Stop setting it - [ ] Stop using it - [ ] `__package__` - [ ] Drop `__package__` from pip - [ ] [Rich patch](https://github.com/pypa/pip/blob/4b71f36fb4dfbc87ce65ac4710eeccf81d379f55/tools/vendoring/patches/rich.patch#L8) ([project](https://github.com/Textualize/rich/blob/3a109ccdffe5b2d0e30684a304fbd388e99ce57b/rich/_unicode_data/__init__.py#L84)) - [ ] [urllib3](https://github.com/pypa/pip/blob/4b71f36fb4dfbc87ce65ac4710eeccf81d379f55/src/pip/_vendor/urllib3/contrib/emscripten/fetch.py#L205) ([project](https://github.com/urllib3/urllib3/blob/3db5970fcc56666ed5e7d450816ece9cce55589f/src/urllib3/contrib/emscripten/fetch.py#L205)) - [ ] [pyproject_hooks](https://github.com/pypa/pip/blob/4b71f36fb4dfbc87ce65ac4710eeccf81d379f55/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py#L14) ([project](https://github.com/pypa/pyproject-hooks/blob/184c9f56a87ede1276a5b33f5024204adb792cd2/src/pyproject_hooks/_in_process/__init__.py#L14)) - [ ] Stop using it - [ ] Stop setting it ## 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