pythondistdeps.py: Compare extras as lowercase
- New test sources tarball with added test data
This commit is contained in:
parent
103464475f
commit
b44c808358
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/test-sources-2020-04-29.tar.gz
|
/test-sources-2020-04-29.tar.gz
|
||||||
/tests/__pycache__/
|
/tests/__pycache__/
|
||||||
/tests/data/scripts_pythondistdeps/usr/
|
/tests/data/scripts_pythondistdeps/usr/
|
||||||
|
/test-sources-2021-03-11.tar.gz
|
||||||
|
@ -21,6 +21,26 @@ from warnings import warn
|
|||||||
|
|
||||||
from packaging.requirements import Requirement as Requirement_
|
from packaging.requirements import Requirement as Requirement_
|
||||||
from packaging.version import parse
|
from packaging.version import parse
|
||||||
|
import packaging.markers
|
||||||
|
|
||||||
|
# Monkey patching packaging.markers to handle extras names in a
|
||||||
|
# case-insensitive manner:
|
||||||
|
# pip considers dnspython[DNSSEC] and dnspython[dnssec] to be equal, but
|
||||||
|
# packaging markers treat extras in a case-sensitive manner. To solve this
|
||||||
|
# issue, we introduce a comparison operator that compares case-insensitively
|
||||||
|
# if both sides of the comparison are strings. And then we inject this
|
||||||
|
# operator into packaging.markers to be used when comparing names of extras.
|
||||||
|
# Fedora BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1936875
|
||||||
|
# Upstream issue: https://discuss.python.org/t/what-extras-names-are-treated-as-equal-and-why/7614
|
||||||
|
# - After it's established upstream what is the canonical form of an extras
|
||||||
|
# name, we plan to open an issue with packaging to hopefully solve this
|
||||||
|
# there without having to resort to monkeypatching.
|
||||||
|
def str_lower_eq(a, b):
|
||||||
|
if isinstance(a, str) and isinstance(b, str):
|
||||||
|
return a.lower() == b.lower()
|
||||||
|
else:
|
||||||
|
return a == b
|
||||||
|
packaging.markers._operators["=="] = str_lower_eq
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from importlib.metadata import PathDistribution
|
from importlib.metadata import PathDistribution
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (test-sources-2020-04-29.tar.gz) = a5539fbe05a4f7128b4f82e960c3f1392a55ad53086dfd7fbc436d2743feaf64784e08667237baed3a32f149db25bc63e4ab3efc2b0270f969c59550b75102b1
|
SHA512 (test-sources-2021-03-11.tar.gz) = 6f34c8151625be489a6a4d56d1fd3d39b7908bd31402c9703cb65918385320dfad35f35a32920c816fb85a829f44aaf04dc1d0654ccf512e26e87e95dbf87430
|
||||||
|
@ -1118,6 +1118,40 @@
|
|||||||
python3dist(backports-range) = 3.7.2
|
python3dist(backports-range) = 3.7.2
|
||||||
python3dist(backports.range) = 3.7.2
|
python3dist(backports.range) = 3.7.2
|
||||||
requires: python(abi) = 3.7
|
requires: python(abi) = 3.7
|
||||||
|
--requires --normalized-names-format pep503 --package-name python3-dns+DNSSEC:
|
||||||
|
--provides --majorver-provides --normalized-names-format pep503 --package-name python3-dns+DNSSEC:
|
||||||
|
usr/lib/python3.9/site-packages/dnspython-2.1.0-py3.9.egg-info:
|
||||||
|
provides: |-
|
||||||
|
python3.9dist(dnspython[dnssec]) = 2.1
|
||||||
|
python3dist(dnspython[dnssec]) = 2.1
|
||||||
|
requires: |-
|
||||||
|
python(abi) = 3.9
|
||||||
|
python3.9dist(cryptography) >= 2.6
|
||||||
|
--requires --normalized-names-format pep503 --package-name python3-dns+Dnssec:
|
||||||
|
--provides --majorver-provides --normalized-names-format pep503 --package-name python3-dns+Dnssec:
|
||||||
|
usr/lib/python3.9/site-packages/dnspython-2.1.0-py3.9.egg-info:
|
||||||
|
provides: |-
|
||||||
|
python3.9dist(dnspython[dnssec]) = 2.1
|
||||||
|
python3dist(dnspython[dnssec]) = 2.1
|
||||||
|
requires: |-
|
||||||
|
python(abi) = 3.9
|
||||||
|
python3.9dist(cryptography) >= 2.6
|
||||||
|
--requires --normalized-names-format pep503 --package-name python3-dns+dnssec:
|
||||||
|
--provides --majorver-provides --normalized-names-format pep503 --package-name python3-dns+dnssec:
|
||||||
|
usr/lib/python3.9/site-packages/dnspython-2.1.0-py3.9.egg-info:
|
||||||
|
provides: |-
|
||||||
|
python3.9dist(dnspython[dnssec]) = 2.1
|
||||||
|
python3dist(dnspython[dnssec]) = 2.1
|
||||||
|
requires: |-
|
||||||
|
python(abi) = 3.9
|
||||||
|
python3.9dist(cryptography) >= 2.6
|
||||||
|
usr/lib/python3.9/site-packages/dnspython-2.1.0.dist-info:
|
||||||
|
provides: |-
|
||||||
|
python3.9dist(dnspython[dnssec]) = 2.1
|
||||||
|
python3dist(dnspython[dnssec]) = 2.1
|
||||||
|
requires: |-
|
||||||
|
python(abi) = 3.9
|
||||||
|
python3.9dist(cryptography) >= 2.6
|
||||||
--requires --normalized-names-format pep503 --package-name python3-setuptools+certs:
|
--requires --normalized-names-format pep503 --package-name python3-setuptools+certs:
|
||||||
--provides --majorver-provides --normalized-names-format pep503 --package-name python3-setuptools+certs:
|
--provides --majorver-provides --normalized-names-format pep503 --package-name python3-setuptools+certs:
|
||||||
usr/lib/python3.9/site-packages/setuptools-41.6.0.dist-info:
|
usr/lib/python3.9/site-packages/setuptools-41.6.0.dist-info:
|
||||||
|
@ -95,3 +95,8 @@ fsleyes:
|
|||||||
taskotron-python-versions:
|
taskotron-python-versions:
|
||||||
wheel:
|
wheel:
|
||||||
'0.1.dev6': ['3.9']
|
'0.1.dev6': ['3.9']
|
||||||
|
dnspython:
|
||||||
|
sdist:
|
||||||
|
'2.1.0': ['3.9']
|
||||||
|
wheel:
|
||||||
|
'2.1.0': ['3.9']
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Requirements:
|
# Requirements:
|
||||||
# - pip >= 20.0.1
|
# - pip >= 20.0.1
|
||||||
|
# - poetry # Due to bug: https://github.com/pypa/pip/issues/9701
|
||||||
#
|
#
|
||||||
|
|
||||||
# First prune old test data
|
# First prune old test data
|
||||||
|
Loading…
Reference in New Issue
Block a user