Skip to content

Commit 5f151cb

Browse files
authored
Merge branch 'master' into 2020-06-11-raise-from
2 parents a9eb9e7 + a877dab commit 5f151cb

File tree

146 files changed

+24879
-381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+24879
-381
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 47.3.0
2+
current_version = 48.0.0
33
commit = True
44
tag = True
55

.coveragerc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[run]
2+
source=
3+
pkg_resources
4+
setuptools
5+
omit=
6+
*/_vendor/*
7+
8+
[report]

.github/workflows/python-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,3 @@ jobs:
9898
python -m
9999
tox
100100
--parallel auto
101-
--
102-
--cov

.travis.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ jobs:
55
fast_finish: true
66
include:
77
- python: pypy3
8-
env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow).
98
- python: 3.5
109
- python: 3.6
1110
- python: 3.7
@@ -15,12 +14,12 @@ jobs:
1514
env: LANG=C
1615
- python: 3.8-dev
1716
- <<: *latest_py3
18-
env: TOXENV=docs DISABLE_COVERAGE=1
17+
env: TOXENV=docs
1918
allow_failures:
2019
# suppress failures due to pypa/setuptools#2000
2120
- python: pypy3
2221
- <<: *latest_py3
23-
env: TOXENV=docs DISABLE_COVERAGE=1
22+
env: TOXENV=docs
2423

2524
cache: pip
2625

@@ -39,22 +38,8 @@ install:
3938

4039
script:
4140
- export NETWORK_REQUIRED=1
42-
- |
43-
( # Run testsuite.
44-
if [ -z "$DISABLE_COVERAGE" ]
45-
then
46-
tox -- --cov
47-
else
48-
tox
49-
fi
50-
)
41+
- tox
5142

5243
after_success:
53-
- |
54-
( # Upload coverage data.
55-
if [ -z "$DISABLE_COVERAGE" ]
56-
then
57-
export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME
58-
tox -e coverage,codecov
59-
fi
60-
)
44+
- export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME
45+
- tox -e coverage,codecov

CHANGES.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
v48.0.0
2+
-------
3+
4+
* #2143: Setuptools adopts distutils from the Python 3.9 standard library and no longer depends on distutils in the standard library. When importing ``setuptools`` or ``setuptools.distutils_patch``, Setuptools will expose its bundled version as a top-level ``distutils`` package (and unload any previously-imported top-level distutils package), retaining the expectation that ``distutils``' objects are actually Setuptools objects. Although this change is not expected to break any use cases, it will likely affect tool chains that are monkey-patching distutils or relying on Setuptools' own monkey-patching of distutils.
5+
6+
7+
v47.3.2
8+
-------
9+
10+
* #2071: Replaced references to the deprecated imp package with references to importlib
11+
12+
13+
v47.3.1
14+
-------
15+
16+
* #1973: Removed ``pkg_resources.py31compat.makedirs`` in favor of the stdlib. Use ``os.makedirs()`` instead.
17+
* #2198: Restore ``__requires__`` directive in easy-install wrapper scripts.
18+
19+
120
v47.3.0
221
-------
322

changelog.d/1973.breaking.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog.d/2137.change.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed (private) pkg_resources.RequirementParseError, now replaced by packaging.requirements.InvalidRequirement. Kept the name for compatibility, but users should catch InvalidRequirement instead.

changelog.d/2165.breaking.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Setuptools no longer installs a site.py file during easy_install or develop installs. As a result, .eggs on PYTHONPATH will no longer take precedence over other packages on sys.path. If this issue affects your production environment, please reach out to the maintainers at #2165.

changelog.d/2180.change.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update vendored packaging in pkg_resources to 19.2.

conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def pytest_addoption(parser):
1414
collect_ignore = [
1515
'tests/manual_test.py',
1616
'setuptools/tests/mod_with_constant.py',
17+
'setuptools/_distutils',
1718
]
1819

1920

docs/developer-guide.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,5 @@ setuptools from source. Eventually, this limitation may be lifted as
145145
PEP 517/518 reach ubiquitous adoption, but for now, Setuptools
146146
cannot declare dependencies other than through
147147
``setuptools/_vendor/vendored.txt`` and
148-
``pkg_reosurces/_vendor/vendored.txt`` and refreshed by way of
148+
``pkg_resources/_vendor/vendored.txt`` and refreshed by way of
149149
``paver update_vendored`` (pavement.py).

pkg_resources/__init__.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,8 @@ def run_script(self, script_name, namespace):
14581458
script_filename = self._fn(self.egg_info, script)
14591459
namespace['__file__'] = script_filename
14601460
if os.path.exists(script_filename):
1461-
source = open(script_filename).read()
1461+
with open(script_filename) as fid:
1462+
source = fid.read()
14621463
code = compile(source, script_filename, 'exec')
14631464
exec(code, namespace, namespace)
14641465
else:
@@ -3076,11 +3077,6 @@ def issue_warning(*args, **kw):
30763077
warnings.warn(stacklevel=level + 1, *args, **kw)
30773078

30783079

3079-
class RequirementParseError(ValueError):
3080-
def __str__(self):
3081-
return ' '.join(self.args)
3082-
3083-
30843080
def parse_requirements(strs):
30853081
"""Yield ``Requirement`` objects for each specification in `strs`
30863082
@@ -3103,13 +3099,14 @@ def parse_requirements(strs):
31033099
yield Requirement(line)
31043100

31053101

3102+
class RequirementParseError(packaging.requirements.InvalidRequirement):
3103+
"Compatibility wrapper for InvalidRequirement"
3104+
3105+
31063106
class Requirement(packaging.requirements.Requirement):
31073107
def __init__(self, requirement_string):
31083108
"""DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
3109-
try:
3110-
super(Requirement, self).__init__(requirement_string)
3111-
except packaging.requirements.InvalidRequirement as e:
3112-
raise RequirementParseError(str(e)) from e
3109+
super(Requirement, self).__init__(requirement_string)
31133110
self.unsafe_name = self.name
31143111
project_name = safe_name(self.name)
31153112
self.project_name, self.key = project_name, project_name.lower()

pkg_resources/_vendor/packaging/__about__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@
44
from __future__ import absolute_import, division, print_function
55

66
__all__ = [
7-
"__title__", "__summary__", "__uri__", "__version__", "__author__",
8-
"__email__", "__license__", "__copyright__",
7+
"__title__",
8+
"__summary__",
9+
"__uri__",
10+
"__version__",
11+
"__author__",
12+
"__email__",
13+
"__license__",
14+
"__copyright__",
915
]
1016

1117
__title__ = "packaging"
1218
__summary__ = "Core utilities for Python packages"
1319
__uri__ = "https://github.com/pypa/packaging"
1420

15-
__version__ = "16.8"
21+
__version__ = "19.2"
1622

1723
__author__ = "Donald Stufft and individual contributors"
1824
__email__ = "[email protected]"
1925

2026
__license__ = "BSD or Apache License, Version 2.0"
21-
__copyright__ = "Copyright 2014-2016 %s" % __author__
27+
__copyright__ = "Copyright 2014-2019 %s" % __author__

pkg_resources/_vendor/packaging/__init__.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,23 @@
44
from __future__ import absolute_import, division, print_function
55

66
from .__about__ import (
7-
__author__, __copyright__, __email__, __license__, __summary__, __title__,
8-
__uri__, __version__
7+
__author__,
8+
__copyright__,
9+
__email__,
10+
__license__,
11+
__summary__,
12+
__title__,
13+
__uri__,
14+
__version__,
915
)
1016

1117
__all__ = [
12-
"__title__", "__summary__", "__uri__", "__version__", "__author__",
13-
"__email__", "__license__", "__copyright__",
18+
"__title__",
19+
"__summary__",
20+
"__uri__",
21+
"__version__",
22+
"__author__",
23+
"__email__",
24+
"__license__",
25+
"__copyright__",
1426
]

pkg_resources/_vendor/packaging/_compat.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# flake8: noqa
1313

1414
if PY3:
15-
string_types = str,
15+
string_types = (str,)
1616
else:
17-
string_types = basestring,
17+
string_types = (basestring,)
1818

1919

2020
def with_metaclass(meta, *bases):
@@ -27,4 +27,5 @@ def with_metaclass(meta, *bases):
2727
class metaclass(meta):
2828
def __new__(cls, name, this_bases, d):
2929
return meta(name, bases, d)
30-
return type.__new__(metaclass, 'temporary_class', (), {})
30+
31+
return type.__new__(metaclass, "temporary_class", (), {})

pkg_resources/_vendor/packaging/_structures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class Infinity(object):
8-
98
def __repr__(self):
109
return "Infinity"
1110

@@ -33,11 +32,11 @@ def __ge__(self, other):
3332
def __neg__(self):
3433
return NegativeInfinity
3534

35+
3636
Infinity = Infinity()
3737

3838

3939
class NegativeInfinity(object):
40-
4140
def __repr__(self):
4241
return "-Infinity"
4342

@@ -65,4 +64,5 @@ def __ge__(self, other):
6564
def __neg__(self):
6665
return Infinity
6766

67+
6868
NegativeInfinity = NegativeInfinity()

0 commit comments

Comments
 (0)