[bumpversion]
-current_version = 46.2.0
+current_version = 46.3.0
commit = True
tag = True
+v46.3.0
+-------
+
+* #2089: Package index functionality no longer attempts to remove an md5 fragment from the index URL. This functionality, added for distribute #163 is no longer relevant.
+* #2041: Preserve file modes during pkg files copying, but clear read only flag for target afterwards.
+* #2105: Filter ``2to3`` deprecation warnings from ``TestDevelop.test_2to3_user_mode``.
+
+
v46.2.0
-------
* #2075: Stop recognizing files ending with ``.dist-info`` as distribution metadata.
* #2086: Deprecate 'use_2to3' functionality. Packagers are encouraged to use single-source solutions or build tool chains to manage conversions outside of setuptools.
* #1698: Added documentation for ``build_meta`` (a bare minimum, not completed).
-* #2082: Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in testes,
+* #2082: Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in tests,
because ``lib2to3`` is `deprecated in Python 3.9 <https://bugs.python.org/issue40360>`_.
+++ /dev/null
-Preserve file modes during pkg files copying, but clear read only flag for target afterwards.
FileExistsError = OSError
from pkg_resources.extern import six
-from pkg_resources.extern.six.moves import urllib, map, filter
+from pkg_resources.extern.six.moves import map, filter
# capture these to bypass sandboxing
from os import utime
return maps
-def _remove_md5_fragment(location):
- if not location:
- return ''
- parsed = urllib.parse.urlparse(location)
- if parsed[-1].startswith('md5='):
- return urllib.parse.urlunparse(parsed[:-1] + ('',))
- return location
-
-
def _version_from_file(lines):
"""
Given an iterable of lines from a Metadata file, return
self.parsed_version,
self.precedence,
self.key,
- _remove_md5_fragment(self.location),
+ self.location,
self.py_version or '',
self.platform or '',
)
def strip_comments(s):
return '\n'.join(
- l for l in s.split('\n')
- if l.strip() and not l.strip().startswith('#')
+ line for line in s.split('\n')
+ if line.strip() and not line.strip().startswith('#')
)
[metadata]
name = setuptools
-version = 46.2.0
+version = 46.3.0
description = Easily download, build, install, upgrade, and uninstall Python packages
author = Python Packaging Authority
author_email = distutils-sig@python.org
__all__ = [
- 'fail_on_ascii', 'py2_only', 'py3_only'
+ 'fail_on_ascii', 'py2_only', 'py3_only', 'ack_2to3'
]
py2_only = pytest.mark.skipif(not PY2, reason="Test runs on Python 2 only")
py3_only = pytest.mark.skipif(not PY3, reason="Test runs on Python 3 only")
+
+ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated')
from setuptools.command.develop import develop
from setuptools.dist import Distribution
+from setuptools.tests import ack_2to3
from . import contexts
from . import namespaces
@pytest.mark.skipif(
in_virtualenv or in_venv,
reason="Cannot run when invoked in a virtualenv or venv")
+ @ack_2to3
def test_2to3_user_mode(self, test_env):
settings = dict(
name='foo',
dep_2_0_url=dep_2_0_url,
dep_2_0_sdist=dep_2_0_sdist,
dep_2_0_python_requires=dep_2_0_python_requires,
- ), 'utf-8')
+ ), 'utf-8')
index_url = path_to_url(str(index))
with contexts.save_pkg_resources_state():
test_pkg = create_setup_requires_package(
import mock
import pytest
-import pkg_resources
import setuptools.package_index
-from setuptools.tests.server import IndexServer
from .textwrap import DALS
url = 'file:///tmp/test_package_index'
assert index.url_ok(url, True)
- def test_links_priority(self):
- """
- Download links from the pypi simple index should be used before
- external download links.
- https://bitbucket.org/tarek/distribute/issue/163
-
- Usecase :
- - someone uploads a package on pypi, a md5 is generated
- - someone manually copies this link (with the md5 in the url) onto an
- external page accessible from the package page.
- - someone reuploads the package (with a different md5)
- - while easy_installing, an MD5 error occurs because the external link
- is used
- -> Setuptools should use the link from pypi, not the external one.
- """
- if sys.platform.startswith('java'):
- # Skip this test on jython because binding to :0 fails
- return
-
- # start an index server
- server = IndexServer()
- server.start()
- index_url = server.base_url() + 'test_links_priority/simple/'
-
- # scan a test index
- pi = setuptools.package_index.PackageIndex(index_url)
- requirement = pkg_resources.Requirement.parse('foobar')
- pi.find_packages(requirement)
- server.stop()
-
- # the distribution has been found
- assert 'foobar' in pi
- # we have only one link, because links are compared without md5
- assert len(pi['foobar']) == 1
- # the link should be from the index
- assert 'correct_md5' in pi['foobar'][0].location
-
def test_parse_bdist_wininst(self):
parse = setuptools.package_index.parse_bdist_wininst
('+ubuntu_0', '+ubuntu.0'),
]
versions = [
- [''.join([e, r, p, l]) for l in ll]
+ [''.join([e, r, p, loc]) for loc in locs]
for e in epoch
for r in releases
for p in sum([pre, post, dev], [''])
- for ll in local]
+ for locs in local]
for v, vc in versions:
dists = list(setuptools.package_index.distros_for_url(
'http://example.com/example.zip#egg=example-' + v))
from setuptools.command.test import test
from setuptools.dist import Distribution
+from setuptools.tests import ack_2to3
from .textwrap import DALS
log.set_verbosity(0)
-ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated')
-
-
@pytest.mark.usefixtures('sample_test', 'quiet_log')
@ack_2to3
def test_test(capfd):