Hello community,
here is the log from the commit of package python3-setuptools for
openSUSE:Factory checked in at 2016-05-16 12:01:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-setuptools (Old)
and /work/SRC/openSUSE:Factory/.python3-setuptools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-setuptools"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-setuptools/python3-setuptools.changes
2016-04-16 22:07:13.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python3-setuptools.new/python3-setuptools.changes
2016-05-16 12:01:12.000000000 +0200
@@ -1,0 +2,47 @@
+Wed May 11 06:20:38 UTC 2016 - [email protected]
+
+- update to version 21.0.0:
+ * Removed ez_setup.py from Setuptools sdist. The bootstrap script
+ will be maintained in its own branch and should be generally be
+ retrieved from its canonical location at
+ https://bootstrap.pypa.io/ez_setup.py.
+
+-------------------------------------------------------------------
+Sun May 8 07:06:14 UTC 2016 - [email protected]
+
+- specfile:
+ * updated source url to files.pythonhosted.org
+
+-------------------------------------------------------------------
+Thu Apr 28 16:17:48 UTC 2016 - [email protected]
+
+- update to version 20.10.1:
+ (no changelog available)
+
+- changes from version 20.10.0:
+ * #553: egg_info section is now generated in a deterministic order,
+ matching the order generated by earlier versions of
+ Python. Except on Python 2.6, order is preserved when existing
+ settings are present.
+ * #556: Update to Packaging 16.7, restoring support for deprecated
+ python_implmentation marker.
+ * #555: Upload command now prompts for a password when uploading to
+ PyPI (or other repository) if no password is present in .pypirc
+ or in the keyring.
+
+-------------------------------------------------------------------
+Thu Apr 21 01:09:36 UTC 2016 - [email protected]
+
+- update to version 20.9.0:
+ * #548: Update certify version to 2016.2.28
+ * #545: Safely handle deletion of non-zip eggs in rotate command.
+
+- changes from version 20.8.1:
+ * Issue #544: Fix issue with extra environment marker processing in
+ WorkingSet due to refactor in v20.7.0.
+
+- changes from version 20.8.0:
+ * Issue #543: Re-release so that latest release doesn't cause déjà
+ vu with distribute and setuptools 0.7 in older environments.
+
+-------------------------------------------------------------------
Old:
----
setuptools-20.7.0.tar.gz
New:
----
setuptools-21.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-setuptools.spec ++++++
--- /var/tmp/diff_new_pack.JaZXDq/_old 2016-05-16 12:01:14.000000000 +0200
+++ /var/tmp/diff_new_pack.JaZXDq/_new 2016-05-16 12:01:14.000000000 +0200
@@ -17,13 +17,13 @@
Name: python3-setuptools
-Version: 20.7.0
+Version: 21.0.0
Release: 0
Url: http://pypi.python.org/pypi/setuptools
Summary: Easily download, build, install, upgrade, and uninstall Python
packages
License: Python-2.0 or ZPL-2.0
Group: Development/Languages/Python
-Source:
https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
+Source:
https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
Source1: psfl.txt
Source2: zpl.txt
Patch1: setuptools-0.6c9-create-sitedir.patch
++++++ setuptools-20.7.0.tar.gz -> setuptools-21.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/MANIFEST.in
new/setuptools-21.0.0/MANIFEST.in
--- old/setuptools-20.7.0/MANIFEST.in 2016-04-10 21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/MANIFEST.in 2016-05-02 15:40:28.000000000 +0200
@@ -2,7 +2,6 @@
recursive-include tests *.py
recursive-include setuptools/tests *.html
recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile
indexsidebar.html
-recursive-include _markerlib *.py
recursive-include setuptools/_vendor *
recursive-include pkg_resources *.py *.txt
include *.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/PKG-INFO
new/setuptools-21.0.0/PKG-INFO
--- old/setuptools-20.7.0/PKG-INFO 2016-04-10 21:24:12.000000000 +0200
+++ new/setuptools-21.0.0/PKG-INFO 2016-05-02 15:42:05.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: setuptools
-Version: 20.7.0
+Version: 21.0.0
Summary: Easily download, build, install, upgrade, and uninstall Python
packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/docs/releases.txt
new/setuptools-21.0.0/docs/releases.txt
--- old/setuptools-20.7.0/docs/releases.txt 2016-04-10 21:22:56.000000000
+0200
+++ new/setuptools-21.0.0/docs/releases.txt 2016-05-02 15:40:28.000000000
+0200
@@ -10,23 +10,20 @@
To cut a release, install and run ``bumpversion {part}`` where ``part``
is major, minor, or patch based on the scope of the changes in the
release. Then, push the commits to the master branch. If tests pass,
-the release will be uploaded to PyPI.
+the release will be uploaded to PyPI (from the Python 3.5 tests).
-Bootstrap Bookmark
-------------------
+Bootstrap Branch
+----------------
-Setuptools has a bootstrap script (ez_setup.py) which is hosted in the
-repository and must be updated with each release (to bump the default version).
-The "published" version of the script is the one indicated by the ``bootstrap``
-branch.
+Setuptools has a bootstrap script (ez_setup.py), which is hosted in the
+repository in the ``bootstrap`` branch.
-Therefore, the latest bootstrap script can be retrieved by checking out the
-repository at that bookmark. It's also possible to get the bootstrap script for
-any particular release by grabbing the script from that tagged release.
+Therefore, the latest bootstrap script can be retrieved by checking out
+that branch.
The officially-published location of the bootstrap script is hosted on Python
infrastructure (#python-infra on freenode) at https://bootstrap.pypa.io and
-is updated every fifteen minutes from the bootstrap script. Sometimes,
+is updated every fifteen minutes from the bootstrap branch. Sometimes,
especially when the bootstrap script is rolled back, this
process doesn't work as expected and requires manual intervention.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/docs/setuptools.txt
new/setuptools-21.0.0/docs/setuptools.txt
--- old/setuptools-20.7.0/docs/setuptools.txt 2016-04-10 21:22:56.000000000
+0200
+++ new/setuptools-21.0.0/docs/setuptools.txt 2016-05-02 15:40:28.000000000
+0200
@@ -1270,7 +1270,8 @@
Setting the ``zip_safe`` flag
-----------------------------
-For maximum performance, Python packages are best installed as zip files.
+For some use cases (such as bundling as part of a larger application), Python
+packages may be run directly from a zip file.
Not all packages, however, are capable of running in compressed form, because
they may expect to be able to access either source code or data files as
normal operating system files. So, ``setuptools`` can install your project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/ez_setup.py
new/setuptools-21.0.0/ez_setup.py
--- old/setuptools-20.7.0/ez_setup.py 2016-04-10 21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/ez_setup.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,417 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Setuptools bootstrapping installer.
-
-Run this script to install or upgrade setuptools.
-"""
-
-import os
-import shutil
-import sys
-import tempfile
-import zipfile
-import optparse
-import subprocess
-import platform
-import textwrap
-import contextlib
-import json
-import codecs
-
-from distutils import log
-
-try:
- from urllib.request import urlopen
-except ImportError:
- from urllib2 import urlopen
-
-try:
- from site import USER_SITE
-except ImportError:
- USER_SITE = None
-
-LATEST = object()
-DEFAULT_VERSION = LATEST
-DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
-DEFAULT_SAVE_DIR = os.curdir
-
-
-def _python_cmd(*args):
- """
- Execute a command.
-
- Return True if the command succeeded.
- """
- args = (sys.executable,) + args
- return subprocess.call(args) == 0
-
-
-def _install(archive_filename, install_args=()):
- """Install Setuptools."""
- with archive_context(archive_filename):
- # installing
- log.warn('Installing Setuptools')
- if not _python_cmd('setup.py', 'install', *install_args):
- log.warn('Something went wrong during the installation.')
- log.warn('See the error message above.')
- # exitcode will be 2
- return 2
-
-
-def _build_egg(egg, archive_filename, to_dir):
- """Build Setuptools egg."""
- with archive_context(archive_filename):
- # building an egg
- log.warn('Building a Setuptools egg in %s', to_dir)
- _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
- # returning the result
- log.warn(egg)
- if not os.path.exists(egg):
- raise IOError('Could not build the egg.')
-
-
-class ContextualZipFile(zipfile.ZipFile):
-
- """Supplement ZipFile class to support context manager for Python 2.6."""
-
- def __enter__(self):
- return self
-
- def __exit__(self, type, value, traceback):
- self.close()
-
- def __new__(cls, *args, **kwargs):
- """Construct a ZipFile or ContextualZipFile as appropriate."""
- if hasattr(zipfile.ZipFile, '__exit__'):
- return zipfile.ZipFile(*args, **kwargs)
- return super(ContextualZipFile, cls).__new__(cls)
-
-
[email protected]
-def archive_context(filename):
- """
- Unzip filename to a temporary directory, set to the cwd.
-
- The unzipped target is cleaned up after.
- """
- tmpdir = tempfile.mkdtemp()
- log.warn('Extracting in %s', tmpdir)
- old_wd = os.getcwd()
- try:
- os.chdir(tmpdir)
- with ContextualZipFile(filename) as archive:
- archive.extractall()
-
- # going in the directory
- subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
- os.chdir(subdir)
- log.warn('Now working in %s', subdir)
- yield
-
- finally:
- os.chdir(old_wd)
- shutil.rmtree(tmpdir)
-
-
-def _do_download(version, download_base, to_dir, download_delay):
- """Download Setuptools."""
- egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg'
- % (version, sys.version_info[0], sys.version_info[1]))
- if not os.path.exists(egg):
- archive = download_setuptools(version, download_base,
- to_dir, download_delay)
- _build_egg(egg, archive, to_dir)
- sys.path.insert(0, egg)
-
- # Remove previously-imported pkg_resources if present (see
- # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details).
- if 'pkg_resources' in sys.modules:
- _unload_pkg_resources()
-
- import setuptools
- setuptools.bootstrap_install_from = egg
-
-
-def use_setuptools(
- version=DEFAULT_VERSION, download_base=DEFAULT_URL,
- to_dir=DEFAULT_SAVE_DIR, download_delay=15):
- """
- Ensure that a setuptools version is installed.
-
- Return None. Raise SystemExit if the requested version
- or later cannot be installed.
- """
- version = _resolve_version(version)
- to_dir = os.path.abspath(to_dir)
-
- # prior to importing, capture the module state for
- # representative modules.
- rep_modules = 'pkg_resources', 'setuptools'
- imported = set(sys.modules).intersection(rep_modules)
-
- try:
- import pkg_resources
- pkg_resources.require("setuptools>=" + version)
- # a suitable version is already installed
- return
- except ImportError:
- # pkg_resources not available; setuptools is not installed; download
- pass
- except pkg_resources.DistributionNotFound:
- # no version of setuptools was found; allow download
- pass
- except pkg_resources.VersionConflict as VC_err:
- if imported:
- _conflict_bail(VC_err, version)
-
- # otherwise, unload pkg_resources to allow the downloaded version to
- # take precedence.
- del pkg_resources
- _unload_pkg_resources()
-
- return _do_download(version, download_base, to_dir, download_delay)
-
-
-def _conflict_bail(VC_err, version):
- """
- Setuptools was imported prior to invocation, so it is
- unsafe to unload it. Bail out.
- """
- conflict_tmpl = textwrap.dedent("""
- The required version of setuptools (>={version}) is not available,
- and can't be installed while this script is running. Please
- install a more recent version first, using
- 'easy_install -U setuptools'.
-
- (Currently using {VC_err.args[0]!r})
- """)
- msg = conflict_tmpl.format(**locals())
- sys.stderr.write(msg)
- sys.exit(2)
-
-
-def _unload_pkg_resources():
- sys.meta_path = [importer for importer in sys.meta_path if
- importer.__class__.__module__ != 'pkg_resources.extern']
- del_modules = [
- name for name in sys.modules
- if name.startswith('pkg_resources')
- ]
- for mod_name in del_modules:
- del sys.modules[mod_name]
-
-
-def _clean_check(cmd, target):
- """
- Run the command to download target.
-
- If the command fails, clean up before re-raising the error.
- """
- try:
- subprocess.check_call(cmd)
- except subprocess.CalledProcessError:
- if os.access(target, os.F_OK):
- os.unlink(target)
- raise
-
-
-def download_file_powershell(url, target):
- """
- Download the file at url to target using Powershell.
-
- Powershell will validate trust.
- Raise an exception if the command cannot complete.
- """
- target = os.path.abspath(target)
- ps_cmd = (
- "[System.Net.WebRequest]::DefaultWebProxy.Credentials = "
- "[System.Net.CredentialCache]::DefaultCredentials; "
- '(new-object System.Net.WebClient).DownloadFile("%(url)s",
"%(target)s")'
- % locals()
- )
- cmd = [
- 'powershell',
- '-Command',
- ps_cmd,
- ]
- _clean_check(cmd, target)
-
-
-def has_powershell():
- """Determine if Powershell is available."""
- if platform.system() != 'Windows':
- return False
- cmd = ['powershell', '-Command', 'echo test']
- with open(os.path.devnull, 'wb') as devnull:
- try:
- subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except Exception:
- return False
- return True
-download_file_powershell.viable = has_powershell
-
-
-def download_file_curl(url, target):
- cmd = ['curl', url, '--silent', '--output', target]
- _clean_check(cmd, target)
-
-
-def has_curl():
- cmd = ['curl', '--version']
- with open(os.path.devnull, 'wb') as devnull:
- try:
- subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except Exception:
- return False
- return True
-download_file_curl.viable = has_curl
-
-
-def download_file_wget(url, target):
- cmd = ['wget', url, '--quiet', '--output-document', target]
- _clean_check(cmd, target)
-
-
-def has_wget():
- cmd = ['wget', '--version']
- with open(os.path.devnull, 'wb') as devnull:
- try:
- subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except Exception:
- return False
- return True
-download_file_wget.viable = has_wget
-
-
-def download_file_insecure(url, target):
- """Use Python to download the file, without connection authentication."""
- src = urlopen(url)
- try:
- # Read all the data in one block.
- data = src.read()
- finally:
- src.close()
-
- # Write all the data in one block to avoid creating a partial file.
- with open(target, "wb") as dst:
- dst.write(data)
-download_file_insecure.viable = lambda: True
-
-
-def get_best_downloader():
- downloaders = (
- download_file_powershell,
- download_file_curl,
- download_file_wget,
- download_file_insecure,
- )
- viable_downloaders = (dl for dl in downloaders if dl.viable())
- return next(viable_downloaders, None)
-
-
-def download_setuptools(
- version=DEFAULT_VERSION, download_base=DEFAULT_URL,
- to_dir=DEFAULT_SAVE_DIR, delay=15,
- downloader_factory=get_best_downloader):
- """
- Download setuptools from a specified location and return its filename.
-
- `version` should be a valid setuptools version number that is available
- as an sdist for download under the `download_base` URL (which should end
- with a '/'). `to_dir` is the directory where the egg will be downloaded.
- `delay` is the number of seconds to pause before an actual download
- attempt.
-
- ``downloader_factory`` should be a function taking no arguments and
- returning a function for downloading a URL to a target.
- """
- version = _resolve_version(version)
- # making sure we use the absolute path
- to_dir = os.path.abspath(to_dir)
- zip_name = "setuptools-%s.zip" % version
- url = download_base + zip_name
- saveto = os.path.join(to_dir, zip_name)
- if not os.path.exists(saveto): # Avoid repeated downloads
- log.warn("Downloading %s", url)
- downloader = downloader_factory()
- downloader(url, saveto)
- return os.path.realpath(saveto)
-
-
-def _resolve_version(version):
- """
- Resolve LATEST version
- """
- if version is not LATEST:
- return version
-
- resp = urlopen('https://pypi.python.org/pypi/setuptools/json')
- with contextlib.closing(resp):
- try:
- charset = resp.info().get_content_charset()
- except Exception:
- # Python 2 compat; assume UTF-8
- charset = 'UTF-8'
- reader = codecs.getreader(charset)
- doc = json.load(reader(resp))
-
- return str(doc['info']['version'])
-
-
-def _build_install_args(options):
- """
- Build the arguments to 'python setup.py install' on the setuptools package.
-
- Returns list of command line arguments.
- """
- return ['--user'] if options.user_install else []
-
-
-def _parse_args():
- """Parse the command line for options."""
- parser = optparse.OptionParser()
- parser.add_option(
- '--user', dest='user_install', action='store_true', default=False,
- help='install in user site package (requires Python 2.6 or later)')
- parser.add_option(
- '--download-base', dest='download_base', metavar="URL",
- default=DEFAULT_URL,
- help='alternative URL from where to download the setuptools package')
- parser.add_option(
- '--insecure', dest='downloader_factory', action='store_const',
- const=lambda: download_file_insecure, default=get_best_downloader,
- help='Use internal, non-validating downloader'
- )
- parser.add_option(
- '--version', help="Specify which version to download",
- default=DEFAULT_VERSION,
- )
- parser.add_option(
- '--to-dir',
- help="Directory to save (and re-use) package",
- default=DEFAULT_SAVE_DIR,
- )
- options, args = parser.parse_args()
- # positional arguments are ignored
- return options
-
-
-def _download_args(options):
- """Return args for download_setuptools function from cmdline args."""
- return dict(
- version=options.version,
- download_base=options.download_base,
- downloader_factory=options.downloader_factory,
- to_dir=options.to_dir,
- )
-
-
-def main():
- """Install or upgrade setuptools and EasyInstall."""
- options = _parse_args()
- archive = download_setuptools(**_download_args(options))
- return _install(archive, _build_install_args(options))
-
-if __name__ == '__main__':
- sys.exit(main())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/pkg_resources/__init__.py
new/setuptools-21.0.0/pkg_resources/__init__.py
--- old/setuptools-20.7.0/pkg_resources/__init__.py 2016-04-10
21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/pkg_resources/__init__.py 2016-05-02
15:40:28.000000000 +0200
@@ -988,9 +988,9 @@
"""
extra_evals = (
req.marker.evaluate({'extra': extra})
- for extra in self.get(req, ())
+ for extra in self.get(req, ()) + (None,)
)
- return not req.marker or any(extra_evals) or req.marker.evaluate()
+ return not req.marker or any(extra_evals)
class Environment(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools-20.7.0/pkg_resources/_vendor/packaging/__about__.py
new/setuptools-21.0.0/pkg_resources/_vendor/packaging/__about__.py
--- old/setuptools-20.7.0/pkg_resources/_vendor/packaging/__about__.py
2016-04-10 21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/pkg_resources/_vendor/packaging/__about__.py
2016-05-02 15:40:28.000000000 +0200
@@ -12,7 +12,7 @@
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"
-__version__ = "16.6"
+__version__ = "16.7"
__author__ = "Donald Stufft and individual contributors"
__email__ = "[email protected]"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools-20.7.0/pkg_resources/_vendor/packaging/markers.py
new/setuptools-21.0.0/pkg_resources/_vendor/packaging/markers.py
--- old/setuptools-20.7.0/pkg_resources/_vendor/packaging/markers.py
2016-04-10 21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/pkg_resources/_vendor/packaging/markers.py
2016-05-02 15:40:28.000000000 +0200
@@ -78,9 +78,18 @@
L("platform.version") | # PEP-345
L("platform.machine") | # PEP-345
L("platform.python_implementation") | # PEP-345
+ L("python_implementation") | # undocumented setuptools legacy
L("extra")
)
-VARIABLE.setParseAction(lambda s, l, t: Variable(t[0].replace('.', '_')))
+ALIASES = {
+ 'os.name': 'os_name',
+ 'sys.platform': 'sys_platform',
+ 'platform.version': 'platform_version',
+ 'platform.machine': 'platform_machine',
+ 'platform.python_implementation': 'platform_python_implementation',
+ 'python_implementation': 'platform_python_implementation'
+}
+VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0])))
VERSION_CMP = (
L("===") |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/pkg_resources/_vendor/vendored.txt
new/setuptools-21.0.0/pkg_resources/_vendor/vendored.txt
--- old/setuptools-20.7.0/pkg_resources/_vendor/vendored.txt 2016-04-10
21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/pkg_resources/_vendor/vendored.txt 2016-05-02
15:40:28.000000000 +0200
@@ -1,3 +1,3 @@
-packaging==16.6
+packaging==16.7
pyparsing==2.0.6
six==1.10.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools-20.7.0/pkg_resources/tests/test_resources.py
new/setuptools-21.0.0/pkg_resources/tests/test_resources.py
--- old/setuptools-20.7.0/pkg_resources/tests/test_resources.py 2016-04-10
21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/pkg_resources/tests/test_resources.py 2016-05-02
15:40:28.000000000 +0200
@@ -189,7 +189,7 @@
def test_environment_marker_evaluation_called(self):
"""
If one package foo requires bar without any extras,
- markers should pass for bar.
+ markers should pass for bar without extras.
"""
parent_req, = parse_requirements("foo")
req, = parse_requirements("bar;python_version>='2'")
@@ -201,14 +201,6 @@
req_extras = pkg_resources._ReqExtras({req: parent_req.extras})
assert req_extras.markers_pass(req)
- # extra should not be present in the marker namespace if
- # no markers were supplied
- parent_req, = parse_requirements("foo")
- req, = parse_requirements("bar;extra==''")
- req_extras = pkg_resources._ReqExtras({req: parent_req.extras})
- with pytest.raises(packaging.markers.UndefinedEnvironmentName):
- req_extras.markers_pass(req)
-
def test_marker_evaluation_with_extras(self):
"""Extras are also evaluated as markers at resolution time."""
ad = pkg_resources.Environment([])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setup.cfg
new/setuptools-21.0.0/setup.cfg
--- old/setuptools-20.7.0/setup.cfg 2016-04-10 21:24:12.000000000 +0200
+++ new/setuptools-21.0.0/setup.cfg 2016-05-02 15:42:05.000000000 +0200
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 20.7.0
+current_version = 21.0.0
commit = True
tag = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setup.py
new/setuptools-21.0.0/setup.py
--- old/setuptools-20.7.0/setup.py 2016-04-10 21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/setup.py 2016-05-02 15:40:28.000000000 +0200
@@ -68,7 +68,7 @@
setup_params = dict(
name="setuptools",
- version="20.7.0",
+ version="21.0.0",
description="Easily download, build, install, upgrade, and uninstall "
"Python packages",
author="Python Packaging Authority",
@@ -146,10 +146,10 @@
""").strip().splitlines(),
extras_require={
"ssl:sys_platform=='win32'": "wincertstore==0.2",
- "certs": "certifi==2015.11.20",
+ "certs": "certifi==2016.2.28",
},
dependency_links=[
-
'https://pypi.python.org/packages/source/c/certifi/certifi-2015.11.20.tar.gz#md5=25134646672c695c1ff1593c2dd75d08',
+
'https://pypi.python.org/packages/source/c/certifi/certifi-2016.2.28.tar.gz#md5=5d672aa766e1f773c75cfeccd02d3650',
'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2',
],
scripts=[],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setuptools/command/egg_info.py
new/setuptools-21.0.0/setuptools/command/egg_info.py
--- old/setuptools-20.7.0/setuptools/command/egg_info.py 2016-04-10
21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/setuptools/command/egg_info.py 2016-05-02
15:40:28.000000000 +0200
@@ -13,6 +13,7 @@
import io
import warnings
import time
+import collections
from setuptools.extern import six
from setuptools.extern.six.moves import map
@@ -66,14 +67,20 @@
self.vtags = None
def save_version_info(self, filename):
- values = dict(
- egg_info=dict(
- tag_svn_revision=0,
- tag_date=0,
- tag_build=self.tags(),
- )
- )
- edit_config(filename, values)
+ """
+ Materialize the values of svn_revision and date into the
+ build tag. Install these keys in a deterministic order
+ to avoid arbitrary reordering on subsequent builds.
+ """
+ # python 2.6 compatibility
+ odict = getattr(collections, 'OrderedDict', dict)
+ egg_info = odict()
+ # follow the order these keys would have been added
+ # when PYTHONHASHSEED=0
+ egg_info['tag_build'] = self.tags()
+ egg_info['tag_date'] = 0
+ egg_info['tag_svn_revision'] = 0
+ edit_config(filename, dict(egg_info=egg_info))
def finalize_options(self):
self.egg_name = safe_name(self.distribution.get_name())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setuptools/command/rotate.py
new/setuptools-21.0.0/setuptools/command/rotate.py
--- old/setuptools-20.7.0/setuptools/command/rotate.py 2016-04-10
21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/setuptools/command/rotate.py 2016-05-02
15:40:28.000000000 +0200
@@ -2,6 +2,7 @@
from distutils import log
from distutils.errors import DistutilsOptionError
import os
+import shutil
from setuptools.extern import six
@@ -59,4 +60,7 @@
for (t, f) in files:
log.info("Deleting %s", f)
if not self.dry_run:
- os.unlink(f)
+ if os.path.isdir(f):
+ shutil.rmtree(f)
+ else:
+ os.unlink(f)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setuptools/command/upload.py
new/setuptools-21.0.0/setuptools/command/upload.py
--- old/setuptools-20.7.0/setuptools/command/upload.py 2016-04-10
21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/setuptools/command/upload.py 2016-05-02
15:40:28.000000000 +0200
@@ -1,15 +1,22 @@
+import getpass
from distutils.command import upload as orig
class upload(orig.upload):
"""
- Override default upload behavior to look up password
- in the keyring if available.
+ Override default upload behavior to obtain password
+ in a variety of different ways.
"""
def finalize_options(self):
orig.upload.finalize_options(self)
- self.password or self._load_password_from_keyring()
+ # Attempt to obtain password. Short circuit evaluation at the first
+ # sign of success.
+ self.password = (
+ self.password or
+ self._load_password_from_keyring() or
+ self._prompt_for_password()
+ )
def _load_password_from_keyring(self):
"""
@@ -17,7 +24,15 @@
"""
try:
keyring = __import__('keyring')
- self.password = keyring.get_password(self.repository,
- self.username)
+ return keyring.get_password(self.repository, self.username)
except Exception:
pass
+
+ def _prompt_for_password(self):
+ """
+ Prompt for a password on the tty. Suppress Exceptions.
+ """
+ try:
+ return getpass.getpass()
+ except (Exception, KeyboardInterrupt):
+ pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setuptools/launch.py
new/setuptools-21.0.0/setuptools/launch.py
--- old/setuptools-20.7.0/setuptools/launch.py 2016-04-10 21:22:56.000000000
+0200
+++ new/setuptools-21.0.0/setuptools/launch.py 2016-05-02 15:40:28.000000000
+0200
@@ -11,25 +11,25 @@
def run():
- """
- Run the script in sys.argv[1] as if it had
- been invoked naturally.
- """
- __builtins__
- script_name = sys.argv[1]
- namespace = dict(
- __file__ = script_name,
- __name__ = '__main__',
- __doc__ = None,
- )
- sys.argv[:] = sys.argv[1:]
+ """
+ Run the script in sys.argv[1] as if it had
+ been invoked naturally.
+ """
+ __builtins__
+ script_name = sys.argv[1]
+ namespace = dict(
+ __file__ = script_name,
+ __name__ = '__main__',
+ __doc__ = None,
+ )
+ sys.argv[:] = sys.argv[1:]
- open_ = getattr(tokenize, 'open', open)
- script = open_(script_name).read()
- norm_script = script.replace('\\r\\n', '\\n')
- code = compile(norm_script, script_name, 'exec')
- exec(code, namespace)
+ open_ = getattr(tokenize, 'open', open)
+ script = open_(script_name).read()
+ norm_script = script.replace('\\r\\n', '\\n')
+ code = compile(norm_script, script_name, 'exec')
+ exec(code, namespace)
if __name__ == '__main__':
- run()
+ run()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setuptools/tests/test_egg_info.py
new/setuptools-21.0.0/setuptools/tests/test_egg_info.py
--- old/setuptools-20.7.0/setuptools/tests/test_egg_info.py 2016-04-10
21:22:56.000000000 +0200
+++ new/setuptools-21.0.0/setuptools/tests/test_egg_info.py 2016-05-02
15:40:28.000000000 +0200
@@ -1,7 +1,11 @@
import os
import glob
+import re
import stat
+import sys
+from setuptools.command.egg_info import egg_info
+from setuptools.dist import Distribution
from setuptools.extern.six.moves import map
import pytest
@@ -59,6 +63,79 @@
})
yield env
+ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env):
+ """
+ When the egg_info section is empty or not present, running
+ save_version_info should add the settings to the setup.cfg
+ in a deterministic order, consistent with the ordering found
+ on Python 2.6 and 2.7 with PYTHONHASHSEED=0.
+ """
+ setup_cfg = os.path.join(env.paths['home'], 'setup.cfg')
+ dist = Distribution()
+ ei = egg_info(dist)
+ ei.initialize_options()
+ ei.save_version_info(setup_cfg)
+
+ with open(setup_cfg, 'r') as f:
+ content = f.read()
+
+ assert '[egg_info]' in content
+ assert 'tag_build =' in content
+ assert 'tag_date = 0' in content
+ assert 'tag_svn_revision = 0' in content
+
+ expected_order = 'tag_build', 'tag_date', 'tag_svn_revision'
+
+ self._validate_content_order(content, expected_order)
+
+ @staticmethod
+ def _validate_content_order(content, expected):
+ """
+ Assert that the strings in expected appear in content
+ in order.
+ """
+ if sys.version_info < (2, 7):
+ # On Python 2.6, expect dict key order.
+ expected = dict.fromkeys(expected).keys()
+
+ pattern = '.*'.join(expected)
+ flags = re.MULTILINE | re.DOTALL
+ assert re.search(pattern, content, flags)
+
+ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env):
+ """
+ When running save_version_info on an existing setup.cfg
+ with the 'default' values present from a previous run,
+ the file should remain unchanged, except on Python 2.6,
+ where the order of the keys will be changed to match the
+ order as found in a dictionary of those keys.
+ """
+ setup_cfg = os.path.join(env.paths['home'], 'setup.cfg')
+ build_files({
+ setup_cfg: DALS("""
+ [egg_info]
+ tag_build =
+ tag_date = 0
+ tag_svn_revision = 0
+ """),
+ })
+ dist = Distribution()
+ ei = egg_info(dist)
+ ei.initialize_options()
+ ei.save_version_info(setup_cfg)
+
+ with open(setup_cfg, 'r') as f:
+ content = f.read()
+
+ assert '[egg_info]' in content
+ assert 'tag_build =' in content
+ assert 'tag_date = 0' in content
+ assert 'tag_svn_revision = 0' in content
+
+ expected_order = 'tag_build', 'tag_date', 'tag_svn_revision'
+
+ self._validate_content_order(content, expected_order)
+
def test_egg_base_installed_egg_info(self, tmpdir_cwd, env):
self._create_project()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setuptools.egg-info/PKG-INFO
new/setuptools-21.0.0/setuptools.egg-info/PKG-INFO
--- old/setuptools-20.7.0/setuptools.egg-info/PKG-INFO 2016-04-10
21:24:12.000000000 +0200
+++ new/setuptools-21.0.0/setuptools.egg-info/PKG-INFO 2016-05-02
15:42:05.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: setuptools
-Version: 20.7.0
+Version: 21.0.0
Summary: Easily download, build, install, upgrade, and uninstall Python
packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setuptools.egg-info/SOURCES.txt
new/setuptools-21.0.0/setuptools.egg-info/SOURCES.txt
--- old/setuptools-20.7.0/setuptools.egg-info/SOURCES.txt 2016-04-10
21:24:12.000000000 +0200
+++ new/setuptools-21.0.0/setuptools.egg-info/SOURCES.txt 2016-05-02
15:42:05.000000000 +0200
@@ -3,7 +3,6 @@
bootstrap.py
conftest.py
easy_install.py
-ez_setup.py
launcher.c
msvc-build-launcher.cmd
pavement.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools-20.7.0/setuptools.egg-info/dependency_links.txt
new/setuptools-21.0.0/setuptools.egg-info/dependency_links.txt
--- old/setuptools-20.7.0/setuptools.egg-info/dependency_links.txt
2016-04-10 21:24:12.000000000 +0200
+++ new/setuptools-21.0.0/setuptools.egg-info/dependency_links.txt
2016-05-02 15:42:05.000000000 +0200
@@ -1,2 +1,2 @@
-https://pypi.python.org/packages/source/c/certifi/certifi-2015.11.20.tar.gz#md5=25134646672c695c1ff1593c2dd75d08
+https://pypi.python.org/packages/source/c/certifi/certifi-2016.2.28.tar.gz#md5=5d672aa766e1f773c75cfeccd02d3650
https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools-20.7.0/setuptools.egg-info/entry_points.txt
new/setuptools-21.0.0/setuptools.egg-info/entry_points.txt
--- old/setuptools-20.7.0/setuptools.egg-info/entry_points.txt 2016-04-10
21:24:12.000000000 +0200
+++ new/setuptools-21.0.0/setuptools.egg-info/entry_points.txt 2016-05-02
15:42:05.000000000 +0200
@@ -1,6 +1,6 @@
[console_scripts]
easy_install = setuptools.command.easy_install:main
-easy_install-2.7 = setuptools.command.easy_install:main
+easy_install-3.5 = setuptools.command.easy_install:main
[distutils.commands]
alias = setuptools.command.alias:alias
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.7.0/setuptools.egg-info/requires.txt
new/setuptools-21.0.0/setuptools.egg-info/requires.txt
--- old/setuptools-20.7.0/setuptools.egg-info/requires.txt 2016-04-10
21:24:12.000000000 +0200
+++ new/setuptools-21.0.0/setuptools.egg-info/requires.txt 2016-05-02
15:42:05.000000000 +0200
@@ -1,6 +1,6 @@
[certs]
-certifi==2015.11.20
+certifi==2016.2.28
[ssl:sys_platform=='win32']
wincertstore==0.2