Bug report
After installing matplotlib, import importlib causes importlib.machinery to be available.
Before installing matplotlib (or after uninstalling it), import importlib.machinery is necessary to access the machinery module.
This may seem benign (after all, I'm not saying matplotlib breaks importlib) but I lost a chunk of time tracing down the source of the inconsistency. I can't see any reason why this package should change importlib's behavior.
Code for reproduction
Expected behavior
$ python -c 'import importlib; print(importlib.machinery)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'importlib' has no attribute 'machinery'
Actual behavior
$ pip install matplotlib
Looking in indexes: https://pypi.org/simple
Collecting matplotlib
Using cached matplotlib-3.3.4-cp38-cp38-manylinux1_x86_64.whl (11.6 MB)
...
Successfully installed matplotlib-3.3.4
$ python -c 'import importlib; print(importlib.machinery)'
<module 'importlib.machinery' from '/opt/python/Python-3.8.1/Lib/importlib/machinery.py'>
Matplotlib version
- Operating system: confirmed on linux (ubuntu 14.04, 18.04) and macos 10.15
- Matplotlib version: 3.3.4
- Python version: 3.8.6
Bug report
After installing matplotlib,
import importlibcausesimportlib.machineryto be available.Before installing matplotlib (or after uninstalling it),
import importlib.machineryis necessary to access themachinerymodule.This may seem benign (after all, I'm not saying matplotlib breaks importlib) but I lost a chunk of time tracing down the source of the inconsistency. I can't see any reason why this package should change importlib's behavior.
Code for reproduction
Expected behavior
Actual behavior
Matplotlib version