Skip to content

Commit

Permalink
Merge pull request #9170 from pradyunsg/vendoring/nov-2020-again
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg authored Nov 29, 2020
2 parents d91b7d9 + 68713c0 commit b5304f3
Show file tree
Hide file tree
Showing 18 changed files with 340 additions and 201 deletions.
1 change: 1 addition & 0 deletions news/9011.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New Resolver: Rework backtracking and state management, to avoid getting stuck in an infinite loop.
1 change: 1 addition & 0 deletions news/9077.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for :pep:`600`: Future 'manylinux' Platform Tags for Portable Linux Built Distributions.
1 change: 1 addition & 0 deletions news/9138.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for MacOS Big Sur compatibility tags.
1 change: 1 addition & 0 deletions news/packaging.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade packaging to 20.7
2 changes: 1 addition & 1 deletion news/resolvelib.vendor.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Upgrade resolvelib to 0.5.2
Upgrade resolvelib to 0.5.3
3 changes: 3 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def pinned_requirements(path):

vendor_txt = Path("src/pip/_vendor/vendor.txt")
for name, old_version in pinned_requirements(vendor_txt):
if name == "setuptools":
continue

# update requirements.txt
session.run("vendoring", "update", ".", name)

Expand Down
27 changes: 0 additions & 27 deletions src/pip/_vendor/packaging/__about__.py

This file was deleted.

25 changes: 2 additions & 23 deletions src/pip/_vendor/packaging/__init__.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

from .__about__ import (
__author__,
__copyright__,
__email__,
__license__,
__summary__,
__title__,
__uri__,
__version__,
)

__all__ = [
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
"__copyright__",
]
"""Core utilities for Python packages"""
__version__ = "20.7"
8 changes: 7 additions & 1 deletion src/pip/_vendor/packaging/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@

import string
import re
import sys

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

from ._typing import TYPE_CHECKING
from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet

if sys.version_info[0] >= 3:
from urllib import parse as urlparse # pragma: no cover
else: # pragma: no cover
import urlparse


if TYPE_CHECKING: # pragma: no cover
from typing import List

Expand Down
27 changes: 14 additions & 13 deletions src/pip/_vendor/packaging/specifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,15 @@
import functools
import itertools
import re
import warnings

from ._compat import string_types, with_metaclass
from ._typing import TYPE_CHECKING
from .utils import canonicalize_version
from .version import Version, LegacyVersion, parse

if TYPE_CHECKING: # pragma: no cover
from typing import (
List,
Dict,
Union,
Iterable,
Iterator,
Optional,
Callable,
Tuple,
FrozenSet,
)
from typing import List, Dict, Union, Iterable, Iterator, Optional, Callable, Tuple

ParsedVersion = Union[Version, LegacyVersion]
UnparsedVersion = Union[Version, LegacyVersion, str]
Expand Down Expand Up @@ -285,6 +276,16 @@ class LegacySpecifier(_IndividualSpecifier):
">": "greater_than",
}

def __init__(self, spec="", prereleases=None):
# type: (str, Optional[bool]) -> None
super(LegacySpecifier, self).__init__(spec, prereleases)

warnings.warn(
"Creating a LegacyVersion has been deprecated and will be "
"removed in the next major release",
DeprecationWarning,
)

def _coerce_version(self, version):
# type: (Union[ParsedVersion, str]) -> LegacyVersion
if not isinstance(version, LegacyVersion):
Expand Down Expand Up @@ -317,7 +318,7 @@ def _compare_greater_than(self, prospective, spec):


def _require_version_compare(
fn # type: (Callable[[Specifier, ParsedVersion, str], bool])
fn, # type: (Callable[[Specifier, ParsedVersion, str], bool])
):
# type: (...) -> Callable[[Specifier, ParsedVersion, str], bool]
@functools.wraps(fn)
Expand Down Expand Up @@ -750,7 +751,7 @@ def __len__(self):
return len(self._specs)

def __iter__(self):
# type: () -> Iterator[FrozenSet[_IndividualSpecifier]]
# type: () -> Iterator[_IndividualSpecifier]
return iter(self._specs)

@property
Expand Down
Loading

0 comments on commit b5304f3

Please sign in to comment.