Skip to content

Commit b28a19d

Browse files
authored
Merge pull request #3098 from pypa/debt/bump-packaging
Bump packaging to 21.3
2 parents 5831708 + 30abf4e commit b28a19d

31 files changed

+75
-118
lines changed

changelog.d/3098.change.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump vendored packaging to 21.3.

pkg_resources/_vendor/packaging-21.2.dist-info/METADATA renamed to pkg_resources/_vendor/packaging-21.3.dist-info/METADATA

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: packaging
3-
Version: 21.2
3+
Version: 21.3
44
Summary: Core utilities for Python packages
55
Home-page: https://github.com/pypa/packaging
66
Author: Donald Stufft and individual contributors
@@ -26,7 +26,7 @@ Description-Content-Type: text/x-rst
2626
License-File: LICENSE
2727
License-File: LICENSE.APACHE
2828
License-File: LICENSE.BSD
29-
Requires-Dist: pyparsing (<3,>=2.0.2)
29+
Requires-Dist: pyparsing (!=3.0.5,>=2.0.2)
3030

3131
packaging
3232
=========
@@ -105,6 +105,13 @@ recent changes and project history.
105105
Changelog
106106
---------
107107

108+
21.3 - 2021-11-17
109+
~~~~~~~~~~~~~~~~~
110+
111+
* Add a ``pp3-none-any`` tag (`#311 <https://github.com/pypa/packaging/issues/311>`__)
112+
* Replace the blank pyparsing 3 exclusion with a 3.0.5 exclusion (`#481 <https://github.com/pypa/packaging/issues/481>`__, `#486 <https://github.com/pypa/packaging/issues/486>`__)
113+
* Fix a spelling mistake (`#479 <https://github.com/pypa/packaging/issues/479>`__)
114+
108115
21.2 - 2021-10-29
109116
~~~~~~~~~~~~~~~~~
110117

Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
packaging-21.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2-
packaging-21.2.dist-info/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
3-
packaging-21.2.dist-info/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
4-
packaging-21.2.dist-info/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
5-
packaging-21.2.dist-info/METADATA,sha256=N4A8uSYrQwV9byem7YuI9OtVkbqiNzFlDhcDVT-suAo,14754
6-
packaging-21.2.dist-info/RECORD,,
7-
packaging-21.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8-
packaging-21.2.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
9-
packaging-21.2.dist-info/top_level.txt,sha256=zFdHrhWnPslzsiP455HutQsqPB6v0KCtNUMtUtrefDw,10
10-
packaging/__about__.py,sha256=IIRHpOsJlJSgkjq1UoeBoMTqhvNp3gN9FyMb5Kf8El4,661
1+
packaging-21.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2+
packaging-21.3.dist-info/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
3+
packaging-21.3.dist-info/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
4+
packaging-21.3.dist-info/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
5+
packaging-21.3.dist-info/METADATA,sha256=KuKIy6qDLP3svIt6ejCbxBDhvq11ebkgUN55MeyKFyc,15147
6+
packaging-21.3.dist-info/RECORD,,
7+
packaging-21.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8+
packaging-21.3.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
9+
packaging-21.3.dist-info/top_level.txt,sha256=zFdHrhWnPslzsiP455HutQsqPB6v0KCtNUMtUtrefDw,10
10+
packaging/__about__.py,sha256=ugASIO2w1oUyH8_COqQ2X_s0rDhjbhQC3yJocD03h2c,661
1111
packaging/__init__.py,sha256=b9Kk5MF7KxhhLgcDmiUWukN-LatWFxPdNug0joPhHSk,497
1212
packaging/__pycache__/__about__.cpython-310.pyc,,
1313
packaging/__pycache__/__init__.cpython-310.pyc,,
@@ -21,12 +21,12 @@ packaging/__pycache__/tags.cpython-310.pyc,,
2121
packaging/__pycache__/utils.cpython-310.pyc,,
2222
packaging/__pycache__/version.cpython-310.pyc,,
2323
packaging/_manylinux.py,sha256=XcbiXB-qcjv3bcohp6N98TMpOP4_j3m-iOA8ptK2GWY,11488
24-
packaging/_musllinux.py,sha256=z5yeG1ygOPx4uUyLdqj-p8Dk5UBb5H_b0NIjW9yo8oA,4378
25-
packaging/_structures.py,sha256=TMiAgFbdUOPmIfDIfiHc3KFhSJ8kMjof2QS5I-2NyQ8,1629
24+
packaging/_musllinux.py,sha256=_KGgY_qc7vhMGpoqss25n2hiLCNKRtvz9mCrS7gkqyc,4378
25+
packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431
2626
packaging/markers.py,sha256=Fygi3_eZnjQ-3VJizW5AhI5wvo0Hb6RMk4DidsKpOC0,8475
2727
packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2828
packaging/requirements.py,sha256=rjaGRCMepZS1mlYMjJ5Qh6rfq3gtsCRQUQmftGZ_bu8,4664
29-
packaging/specifiers.py,sha256=MZ-fYcNL3u7pNrt-6g2EQO7AbRXkjc-SPEYwXMQbLmc,30964
30-
packaging/tags.py,sha256=vGybAUQYlPKMcukzX_2e65fmafnFFuMbD25naYTEwtc,15710
29+
packaging/specifiers.py,sha256=LRQ0kFsHrl5qfcFNEEJrIFYsnIHQUJXY9fIsakTrrqE,30110
30+
packaging/tags.py,sha256=lmsnGNiJ8C4D_Pf9PbM0qgbZvD9kmB9lpZBQUZa3R_Y,15699
3131
packaging/utils.py,sha256=dJjeat3BS-TYn1RrUFVwufUMasbtzLfYRoy_HXENeFQ,4200
3232
packaging/version.py,sha256=_fLRNrFrxYcHVfyo8vk9j8s6JM8N_xsSxVFr6RJyco8,14665

pkg_resources/_vendor/packaging/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
__summary__ = "Core utilities for Python packages"
1818
__uri__ = "https://github.com/pypa/packaging"
1919

20-
__version__ = "21.2"
20+
__version__ = "21.3"
2121

2222
__author__ = "Donald Stufft and individual contributors"
2323
__email__ = "[email protected]"

pkg_resources/_vendor/packaging/_musllinux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
9898
with contextlib.ExitStack() as stack:
9999
try:
100100
f = stack.enter_context(open(executable, "rb"))
101-
except IOError:
101+
except OSError:
102102
return None
103103
ld = _parse_ld_musl_from_elf(f)
104104
if not ld:

pkg_resources/_vendor/packaging/_structures.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ def __le__(self, other: object) -> bool:
1919
def __eq__(self, other: object) -> bool:
2020
return isinstance(other, self.__class__)
2121

22-
def __ne__(self, other: object) -> bool:
23-
return not isinstance(other, self.__class__)
24-
2522
def __gt__(self, other: object) -> bool:
2623
return True
2724

@@ -51,9 +48,6 @@ def __le__(self, other: object) -> bool:
5148
def __eq__(self, other: object) -> bool:
5249
return isinstance(other, self.__class__)
5350

54-
def __ne__(self, other: object) -> bool:
55-
return not isinstance(other, self.__class__)
56-
5751
def __gt__(self, other: object) -> bool:
5852
return False
5953

pkg_resources/_vendor/packaging/specifiers.py

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ def __eq__(self, other: object) -> bool:
5757
objects are equal.
5858
"""
5959

60-
@abc.abstractmethod
61-
def __ne__(self, other: object) -> bool:
62-
"""
63-
Returns a boolean representing whether or not the two Specifier like
64-
objects are not equal.
65-
"""
66-
6760
@abc.abstractproperty
6861
def prereleases(self) -> Optional[bool]:
6962
"""
@@ -119,7 +112,7 @@ def __repr__(self) -> str:
119112
else ""
120113
)
121114

122-
return "<{}({!r}{})>".format(self.__class__.__name__, str(self), pre)
115+
return f"<{self.__class__.__name__}({str(self)!r}{pre})>"
123116

124117
def __str__(self) -> str:
125118
return "{}{}".format(*self._spec)
@@ -142,17 +135,6 @@ def __eq__(self, other: object) -> bool:
142135

143136
return self._canonical_spec == other._canonical_spec
144137

145-
def __ne__(self, other: object) -> bool:
146-
if isinstance(other, str):
147-
try:
148-
other = self.__class__(str(other))
149-
except InvalidSpecifier:
150-
return NotImplemented
151-
elif not isinstance(other, self.__class__):
152-
return NotImplemented
153-
154-
return self._spec != other._spec
155-
156138
def _get_operator(self, op: str) -> CallableOperator:
157139
operator_callable: CallableOperator = getattr(
158140
self, f"_compare_{self._operators[op]}"
@@ -667,7 +649,7 @@ def __repr__(self) -> str:
667649
else ""
668650
)
669651

670-
return "<SpecifierSet({!r}{})>".format(str(self), pre)
652+
return f"<SpecifierSet({str(self)!r}{pre})>"
671653

672654
def __str__(self) -> str:
673655
return ",".join(sorted(str(s) for s in self._specs))
@@ -706,14 +688,6 @@ def __eq__(self, other: object) -> bool:
706688

707689
return self._specs == other._specs
708690

709-
def __ne__(self, other: object) -> bool:
710-
if isinstance(other, (str, _IndividualSpecifier)):
711-
other = SpecifierSet(str(other))
712-
elif not isinstance(other, SpecifierSet):
713-
return NotImplemented
714-
715-
return self._specs != other._specs
716-
717691
def __len__(self) -> int:
718692
return len(self._specs)
719693

pkg_resources/_vendor/packaging/tags.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __str__(self) -> str:
9090
return f"{self._interpreter}-{self._abi}-{self._platform}"
9191

9292
def __repr__(self) -> str:
93-
return "<{self} @ {self_id}>".format(self=self, self_id=id(self))
93+
return f"<{self} @ {id(self)}>"
9494

9595

9696
def parse_tag(tag: str) -> FrozenSet[Tag]:
@@ -192,7 +192,7 @@ def cpython_tags(
192192
if not python_version:
193193
python_version = sys.version_info[:2]
194194

195-
interpreter = "cp{}".format(_version_nodot(python_version[:2]))
195+
interpreter = f"cp{_version_nodot(python_version[:2])}"
196196

197197
if abis is None:
198198
if len(python_version) > 1:
@@ -268,11 +268,11 @@ def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
268268
all previous versions of that major version.
269269
"""
270270
if len(py_version) > 1:
271-
yield "py{version}".format(version=_version_nodot(py_version[:2]))
272-
yield "py{major}".format(major=py_version[0])
271+
yield f"py{_version_nodot(py_version[:2])}"
272+
yield f"py{py_version[0]}"
273273
if len(py_version) > 1:
274274
for minor in range(py_version[1] - 1, -1, -1):
275-
yield "py{version}".format(version=_version_nodot((py_version[0], minor)))
275+
yield f"py{_version_nodot((py_version[0], minor))}"
276276

277277

278278
def compatible_tags(
@@ -481,4 +481,7 @@ def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
481481
else:
482482
yield from generic_tags()
483483

484-
yield from compatible_tags()
484+
if interp_name == "pp":
485+
yield from compatible_tags(interpreter="pp3")
486+
else:
487+
yield from compatible_tags()

pkg_resources/_vendor/vendored.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packaging==21.2
1+
packaging==21.3
22
pyparsing==2.2.1
33
appdirs==1.4.3
44
jaraco.text==3.7.0

setuptools/_vendor/packaging-21.2.dist-info/METADATA renamed to setuptools/_vendor/packaging-21.3.dist-info/METADATA

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: packaging
3-
Version: 21.2
3+
Version: 21.3
44
Summary: Core utilities for Python packages
55
Home-page: https://github.com/pypa/packaging
66
Author: Donald Stufft and individual contributors
@@ -26,7 +26,7 @@ Description-Content-Type: text/x-rst
2626
License-File: LICENSE
2727
License-File: LICENSE.APACHE
2828
License-File: LICENSE.BSD
29-
Requires-Dist: pyparsing (<3,>=2.0.2)
29+
Requires-Dist: pyparsing (!=3.0.5,>=2.0.2)
3030

3131
packaging
3232
=========
@@ -105,6 +105,13 @@ recent changes and project history.
105105
Changelog
106106
---------
107107

108+
21.3 - 2021-11-17
109+
~~~~~~~~~~~~~~~~~
110+
111+
* Add a ``pp3-none-any`` tag (`#311 <https://github.com/pypa/packaging/issues/311>`__)
112+
* Replace the blank pyparsing 3 exclusion with a 3.0.5 exclusion (`#481 <https://github.com/pypa/packaging/issues/481>`__, `#486 <https://github.com/pypa/packaging/issues/486>`__)
113+
* Fix a spelling mistake (`#479 <https://github.com/pypa/packaging/issues/479>`__)
114+
108115
21.2 - 2021-10-29
109116
~~~~~~~~~~~~~~~~~
110117

Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
packaging-21.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2-
packaging-21.2.dist-info/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
3-
packaging-21.2.dist-info/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
4-
packaging-21.2.dist-info/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
5-
packaging-21.2.dist-info/METADATA,sha256=N4A8uSYrQwV9byem7YuI9OtVkbqiNzFlDhcDVT-suAo,14754
6-
packaging-21.2.dist-info/RECORD,,
7-
packaging-21.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8-
packaging-21.2.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
9-
packaging-21.2.dist-info/top_level.txt,sha256=zFdHrhWnPslzsiP455HutQsqPB6v0KCtNUMtUtrefDw,10
10-
packaging/__about__.py,sha256=IIRHpOsJlJSgkjq1UoeBoMTqhvNp3gN9FyMb5Kf8El4,661
1+
packaging-21.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2+
packaging-21.3.dist-info/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
3+
packaging-21.3.dist-info/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
4+
packaging-21.3.dist-info/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
5+
packaging-21.3.dist-info/METADATA,sha256=KuKIy6qDLP3svIt6ejCbxBDhvq11ebkgUN55MeyKFyc,15147
6+
packaging-21.3.dist-info/RECORD,,
7+
packaging-21.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8+
packaging-21.3.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
9+
packaging-21.3.dist-info/top_level.txt,sha256=zFdHrhWnPslzsiP455HutQsqPB6v0KCtNUMtUtrefDw,10
10+
packaging/__about__.py,sha256=ugASIO2w1oUyH8_COqQ2X_s0rDhjbhQC3yJocD03h2c,661
1111
packaging/__init__.py,sha256=b9Kk5MF7KxhhLgcDmiUWukN-LatWFxPdNug0joPhHSk,497
1212
packaging/__pycache__/__about__.cpython-310.pyc,,
1313
packaging/__pycache__/__init__.cpython-310.pyc,,
@@ -21,12 +21,12 @@ packaging/__pycache__/tags.cpython-310.pyc,,
2121
packaging/__pycache__/utils.cpython-310.pyc,,
2222
packaging/__pycache__/version.cpython-310.pyc,,
2323
packaging/_manylinux.py,sha256=XcbiXB-qcjv3bcohp6N98TMpOP4_j3m-iOA8ptK2GWY,11488
24-
packaging/_musllinux.py,sha256=z5yeG1ygOPx4uUyLdqj-p8Dk5UBb5H_b0NIjW9yo8oA,4378
25-
packaging/_structures.py,sha256=TMiAgFbdUOPmIfDIfiHc3KFhSJ8kMjof2QS5I-2NyQ8,1629
24+
packaging/_musllinux.py,sha256=_KGgY_qc7vhMGpoqss25n2hiLCNKRtvz9mCrS7gkqyc,4378
25+
packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431
2626
packaging/markers.py,sha256=Fygi3_eZnjQ-3VJizW5AhI5wvo0Hb6RMk4DidsKpOC0,8475
2727
packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2828
packaging/requirements.py,sha256=rjaGRCMepZS1mlYMjJ5Qh6rfq3gtsCRQUQmftGZ_bu8,4664
29-
packaging/specifiers.py,sha256=MZ-fYcNL3u7pNrt-6g2EQO7AbRXkjc-SPEYwXMQbLmc,30964
30-
packaging/tags.py,sha256=vGybAUQYlPKMcukzX_2e65fmafnFFuMbD25naYTEwtc,15710
29+
packaging/specifiers.py,sha256=LRQ0kFsHrl5qfcFNEEJrIFYsnIHQUJXY9fIsakTrrqE,30110
30+
packaging/tags.py,sha256=lmsnGNiJ8C4D_Pf9PbM0qgbZvD9kmB9lpZBQUZa3R_Y,15699
3131
packaging/utils.py,sha256=dJjeat3BS-TYn1RrUFVwufUMasbtzLfYRoy_HXENeFQ,4200
3232
packaging/version.py,sha256=_fLRNrFrxYcHVfyo8vk9j8s6JM8N_xsSxVFr6RJyco8,14665

setuptools/_vendor/packaging/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
__summary__ = "Core utilities for Python packages"
1818
__uri__ = "https://github.com/pypa/packaging"
1919

20-
__version__ = "21.2"
20+
__version__ = "21.3"
2121

2222
__author__ = "Donald Stufft and individual contributors"
2323
__email__ = "[email protected]"

setuptools/_vendor/packaging/_musllinux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
9898
with contextlib.ExitStack() as stack:
9999
try:
100100
f = stack.enter_context(open(executable, "rb"))
101-
except IOError:
101+
except OSError:
102102
return None
103103
ld = _parse_ld_musl_from_elf(f)
104104
if not ld:

setuptools/_vendor/packaging/_structures.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ def __le__(self, other: object) -> bool:
1919
def __eq__(self, other: object) -> bool:
2020
return isinstance(other, self.__class__)
2121

22-
def __ne__(self, other: object) -> bool:
23-
return not isinstance(other, self.__class__)
24-
2522
def __gt__(self, other: object) -> bool:
2623
return True
2724

@@ -51,9 +48,6 @@ def __le__(self, other: object) -> bool:
5148
def __eq__(self, other: object) -> bool:
5249
return isinstance(other, self.__class__)
5350

54-
def __ne__(self, other: object) -> bool:
55-
return not isinstance(other, self.__class__)
56-
5751
def __gt__(self, other: object) -> bool:
5852
return False
5953

setuptools/_vendor/packaging/specifiers.py

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ def __eq__(self, other: object) -> bool:
5757
objects are equal.
5858
"""
5959

60-
@abc.abstractmethod
61-
def __ne__(self, other: object) -> bool:
62-
"""
63-
Returns a boolean representing whether or not the two Specifier like
64-
objects are not equal.
65-
"""
66-
6760
@abc.abstractproperty
6861
def prereleases(self) -> Optional[bool]:
6962
"""
@@ -119,7 +112,7 @@ def __repr__(self) -> str:
119112
else ""
120113
)
121114

122-
return "<{}({!r}{})>".format(self.__class__.__name__, str(self), pre)
115+
return f"<{self.__class__.__name__}({str(self)!r}{pre})>"
123116

124117
def __str__(self) -> str:
125118
return "{}{}".format(*self._spec)
@@ -142,17 +135,6 @@ def __eq__(self, other: object) -> bool:
142135

143136
return self._canonical_spec == other._canonical_spec
144137

145-
def __ne__(self, other: object) -> bool:
146-
if isinstance(other, str):
147-
try:
148-
other = self.__class__(str(other))
149-
except InvalidSpecifier:
150-
return NotImplemented
151-
elif not isinstance(other, self.__class__):
152-
return NotImplemented
153-
154-
return self._spec != other._spec
155-
156138
def _get_operator(self, op: str) -> CallableOperator:
157139
operator_callable: CallableOperator = getattr(
158140
self, f"_compare_{self._operators[op]}"
@@ -667,7 +649,7 @@ def __repr__(self) -> str:
667649
else ""
668650
)
669651

670-
return "<SpecifierSet({!r}{})>".format(str(self), pre)
652+
return f"<SpecifierSet({str(self)!r}{pre})>"
671653

672654
def __str__(self) -> str:
673655
return ",".join(sorted(str(s) for s in self._specs))
@@ -706,14 +688,6 @@ def __eq__(self, other: object) -> bool:
706688

707689
return self._specs == other._specs
708690

709-
def __ne__(self, other: object) -> bool:
710-
if isinstance(other, (str, _IndividualSpecifier)):
711-
other = SpecifierSet(str(other))
712-
elif not isinstance(other, SpecifierSet):
713-
return NotImplemented
714-
715-
return self._specs != other._specs
716-
717691
def __len__(self) -> int:
718692
return len(self._specs)
719693

0 commit comments

Comments
 (0)