Allows removing a "mypy: disallow-untyped-defs=False" comment.
To workaround a mypy bug, map(os.path.basename, distribution_files) was
changed to use a generator expression. See:
https://github.com/python/mypy/issues/9864
To verify correct usage of the nox API, it is now a dependency during
pre-commit mypy runs.
The mypy configuration "follow_imports = silent" allowed erroneous code
to pass, so it has been removed. Now, all imports must be available
during type.
The stdlib module has been available since Python 3.5 and the
TYPE_CHECKING constant has been available since 3.5.2.
By using stdlib, this removes the need for pip to maintain its own
Python 2 typing compatibility shim.
Since Python 3.3, the following classes have merged into OSError. They
remain as aliases for backward compatibility.
- EnvironmentError
- IOError
- WindowsError
https://docs.python.org/3/library/exceptions.html#OSError
Python 3 also has subclasses of OSError to help identify more specific
errors. For example, FileNotFoundError. This allows simplifying some
except blocks.
Since dropping Python 2 support, the wheel is no longer universal. See
the wheel docs:
https://wheel.readthedocs.io/en/stable/user_guide.html#building-wheels
> If your project … is expected to work on both Python 2 and 3, you will
> want to tell wheel to produce universal wheels by adding this to your
> setup.cfg file:
This handles:
* Sub-processes within unit tests (thanks pytest-cov)
* Our pytest-fixture-based virtual environments and subprocesses
therein
* Running with xdist (e.g. `-n auto`)
* Combining results from all of the above using paths rooted with
`src/pip/*`
This doesn't handle:
* Platform-specific branches
* Python 2
* CI integration
Add pip._vendor as a third party package
Use the indentation style that the project uses
Add pip and tests as a known first party packages
Change default section to THIRDPARTY