Skip to content

Commit b5304f3

Browse files
authored
Merge pull request #9170 from pradyunsg/vendoring/nov-2020-again
2 parents d91b7d9 + 68713c0 commit b5304f3

18 files changed

+340
-201
lines changed

news/9011.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
New Resolver: Rework backtracking and state management, to avoid getting stuck in an infinite loop.

news/9077.feature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support for :pep:`600`: Future 'manylinux' Platform Tags for Portable Linux Built Distributions.

news/9138.feature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support for MacOS Big Sur compatibility tags.

news/packaging.vendor.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade packaging to 20.7

news/resolvelib.vendor.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Upgrade resolvelib to 0.5.2
1+
Upgrade resolvelib to 0.5.3

noxfile.py

+3
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ def pinned_requirements(path):
168168

169169
vendor_txt = Path("src/pip/_vendor/vendor.txt")
170170
for name, old_version in pinned_requirements(vendor_txt):
171+
if name == "setuptools":
172+
continue
173+
171174
# update requirements.txt
172175
session.run("vendoring", "update", ".", name)
173176

src/pip/_vendor/packaging/__about__.py

-27
This file was deleted.

src/pip/_vendor/packaging/__init__.py

+2-23
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
# This file is dual licensed under the terms of the Apache License, Version
22
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
33
# for complete details.
4-
from __future__ import absolute_import, division, print_function
5-
6-
from .__about__ import (
7-
__author__,
8-
__copyright__,
9-
__email__,
10-
__license__,
11-
__summary__,
12-
__title__,
13-
__uri__,
14-
__version__,
15-
)
16-
17-
__all__ = [
18-
"__title__",
19-
"__summary__",
20-
"__uri__",
21-
"__version__",
22-
"__author__",
23-
"__email__",
24-
"__license__",
25-
"__copyright__",
26-
]
4+
"""Core utilities for Python packages"""
5+
__version__ = "20.7"

src/pip/_vendor/packaging/requirements.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,22 @@
55

66
import string
77
import re
8+
import sys
89

910
from pip._vendor.pyparsing import stringStart, stringEnd, originalTextFor, ParseException
1011
from pip._vendor.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine
1112
from pip._vendor.pyparsing import Literal as L # noqa
12-
from pip._vendor.six.moves.urllib import parse as urlparse
1313

1414
from ._typing import TYPE_CHECKING
1515
from .markers import MARKER_EXPR, Marker
1616
from .specifiers import LegacySpecifier, Specifier, SpecifierSet
1717

18+
if sys.version_info[0] >= 3:
19+
from urllib import parse as urlparse # pragma: no cover
20+
else: # pragma: no cover
21+
import urlparse
22+
23+
1824
if TYPE_CHECKING: # pragma: no cover
1925
from typing import List
2026

src/pip/_vendor/packaging/specifiers.py

+14-13
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,15 @@
77
import functools
88
import itertools
99
import re
10+
import warnings
1011

1112
from ._compat import string_types, with_metaclass
1213
from ._typing import TYPE_CHECKING
1314
from .utils import canonicalize_version
1415
from .version import Version, LegacyVersion, parse
1516

1617
if TYPE_CHECKING: # pragma: no cover
17-
from typing import (
18-
List,
19-
Dict,
20-
Union,
21-
Iterable,
22-
Iterator,
23-
Optional,
24-
Callable,
25-
Tuple,
26-
FrozenSet,
27-
)
18+
from typing import List, Dict, Union, Iterable, Iterator, Optional, Callable, Tuple
2819

2920
ParsedVersion = Union[Version, LegacyVersion]
3021
UnparsedVersion = Union[Version, LegacyVersion, str]
@@ -285,6 +276,16 @@ class LegacySpecifier(_IndividualSpecifier):
285276
">": "greater_than",
286277
}
287278

279+
def __init__(self, spec="", prereleases=None):
280+
# type: (str, Optional[bool]) -> None
281+
super(LegacySpecifier, self).__init__(spec, prereleases)
282+
283+
warnings.warn(
284+
"Creating a LegacyVersion has been deprecated and will be "
285+
"removed in the next major release",
286+
DeprecationWarning,
287+
)
288+
288289
def _coerce_version(self, version):
289290
# type: (Union[ParsedVersion, str]) -> LegacyVersion
290291
if not isinstance(version, LegacyVersion):
@@ -317,7 +318,7 @@ def _compare_greater_than(self, prospective, spec):
317318

318319

319320
def _require_version_compare(
320-
fn # type: (Callable[[Specifier, ParsedVersion, str], bool])
321+
fn, # type: (Callable[[Specifier, ParsedVersion, str], bool])
321322
):
322323
# type: (...) -> Callable[[Specifier, ParsedVersion, str], bool]
323324
@functools.wraps(fn)
@@ -750,7 +751,7 @@ def __len__(self):
750751
return len(self._specs)
751752

752753
def __iter__(self):
753-
# type: () -> Iterator[FrozenSet[_IndividualSpecifier]]
754+
# type: () -> Iterator[_IndividualSpecifier]
754755
return iter(self._specs)
755756

756757
@property

0 commit comments

Comments
 (0)