It is generally discouraged to import from conftest. Things are now
moved to tests.lib and imported from there instead.
Also did some cleanup to remove the no-longer-needed nullcontext shim.
Use the tool com2ann to automatically convert most type comments to type
annotations. Some type comments continue to exist where any work beyond
the automatic conversion was required (for example, additional
formatting or circular references).
For additional information on the com2ann tool, see:
https://github.com/ilevkivskyi/com2ann
Removes the vendored contextlib2.
ExitStack and suppress are available from stdlib contextlib on all
supported Python versions.
The nullcontext context manager which isn't available in Python 3.6, but
the function is simple to implement. Once Python 3.6 support is dropped,
so too can the compat shim.