This implementation uses tests.lib.make_wheel, which allows more
flexible wheel configuration in a more structured way.
Output-wise this should be almost identical to the previous
implementation, with the following exceptions:
* Metadata-Version is bumped from 2.0 (previous implementation) to 2.1
(from make_wheel).
* Fields previously supplied as UNKNOWN are now omitted since they are
not significant to tests.
* The DESCRIPTION file is omitted (since the description field is now
missing, see previous point).
By default, make_archive uses str paths on Python 2, which causes it to
skip files with unencodable names. By passing in a unicode base_dir
explicitly, it is smart enough to use unicode all the way down instead.
We now extract all metadata files from the wheel directly into memory
and make them available to the wrapping pkg_resources.Distribution via
the DictMetadata introduced earlier.
Previously we were copying an existing wheel to a file with a
different distribution name. When using stricter metadata parsing this
would fail, so now we use a more conformant dummy wheel function.
Previously we were restricting to a single .dist-info directory anywhere
in the unpacked wheel directory. That was incorrect since only a
top-level .dist-info directory indicates a contained "package". Now we
limit our restriction to top-level .dist-info directories.
* Add option to silence warnings related to deprecation of Python versions
* Move skip_if_python2 and skip_if_not_python2 decorator declaratios to test/lib/__init__.py and use them in test_warning.py
* Add tests to ensure that python version deprecation warning is shown correctly and can be silenced by a flag.
* Add new test to ensure that --no-python-version-warning flag does nothing if python version is not 2