Hello community,

here is the log from the commit of package python3-setuptools for 
openSUSE:Factory checked in at 2016-11-08 18:25:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-11-03 12:58:16.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python3-setuptools.new/python3-setuptools.changes   
    2016-11-08 18:25:21.000000000 +0100
@@ -1,0 +2,10 @@
+Sat Nov  5 17:38:30 UTC 2016 - a...@gmx.de
+
+- update to version 28.8.0:
+  * #629: Per the discussion, refine the sorting to use version value
+    order for more accurate detection of the latest available version
+    when scanning for packages. See also #829.
+  * #837: Rely on the config var "SO" for Python 3.3.0 only when
+    determining the ext filename.
+
+-------------------------------------------------------------------

Old:
----
  setuptools-28.7.1.tar.gz

New:
----
  setuptools-28.8.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-setuptools.spec ++++++
--- /var/tmp/diff_new_pack.EnbJUX/_old  2016-11-08 18:25:22.000000000 +0100
+++ /var/tmp/diff_new_pack.EnbJUX/_new  2016-11-08 18:25:22.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python3-setuptools
-Version:        28.7.1
+Version:        28.8.0
 Release:        0
 Url:            http://pypi.python.org/pypi/setuptools
 Summary:        Easily download, build, install, upgrade, and uninstall Python 
packages

++++++ setuptools-28.7.1.tar.gz -> setuptools-28.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/CHANGES.rst 
new/setuptools-28.8.0/CHANGES.rst
--- old/setuptools-28.7.1/CHANGES.rst   2016-10-30 03:39:27.000000000 +0100
+++ new/setuptools-28.8.0/CHANGES.rst   2016-11-04 20:37:16.000000000 +0100
@@ -2,6 +2,17 @@
 CHANGES
 =======
 
+v28.8.0
+-------
+
+* #629: Per the discussion, refine the sorting to use version
+  value order for more accurate detection of the latest
+  available version when scanning for packages. See also
+  #829.
+
+* #837: Rely on the config var "SO" for Python 3.3.0 only
+  when determining the ext filename.
+
 v28.7.1
 -------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/PKG-INFO 
new/setuptools-28.8.0/PKG-INFO
--- old/setuptools-28.7.1/PKG-INFO      2016-10-30 03:40:44.000000000 +0100
+++ new/setuptools-28.8.0/PKG-INFO      2016-11-04 20:38:51.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: setuptools
-Version: 28.7.1
+Version: 28.8.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-28.7.1/conftest.py 
new/setuptools-28.8.0/conftest.py
--- old/setuptools-28.7.1/conftest.py   2016-10-30 03:39:27.000000000 +0100
+++ new/setuptools-28.8.0/conftest.py   2016-11-04 20:37:16.000000000 +0100
@@ -1 +1,8 @@
+import pytest
+
 pytest_plugins = 'setuptools.tests.fixtures'
+
+def pytest_addoption(parser):
+      parser.addoption("--package_name", action="append", default=[],
+                       help="list of package_name to pass to test functions")
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/pkg_resources/__init__.py 
new/setuptools-28.8.0/pkg_resources/__init__.py
--- old/setuptools-28.7.1/pkg_resources/__init__.py     2016-10-30 
03:39:27.000000000 +0100
+++ new/setuptools-28.8.0/pkg_resources/__init__.py     2016-11-04 
20:37:16.000000000 +0100
@@ -36,6 +36,7 @@
 import email.parser
 import tempfile
 import textwrap
+import itertools
 from pkgutil import get_importer
 
 try:
@@ -1966,6 +1967,32 @@
 register_finder(object, find_nothing)
 
 
+def _by_version_descending(names):
+    """
+    Given a list of filenames, return them in descending order
+    by version number.
+
+    >>> names = 'bar', 'foo', 'Python-2.7.10.egg', 'Python-2.7.2.egg'
+    >>> _by_version_descending(names)
+    ['Python-2.7.10.egg', 'Python-2.7.2.egg', 'foo', 'bar']
+    >>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.egg'
+    >>> _by_version_descending(names)
+    ['Setuptools-1.2.3.egg', 'Setuptools-1.2.3b1.egg']
+    >>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.post1.egg'
+    >>> _by_version_descending(names)
+    ['Setuptools-1.2.3.post1.egg', 'Setuptools-1.2.3b1.egg']
+    """
+    def _by_version(name):
+        """
+        Parse each component of the filename
+        """
+        name, ext = os.path.splitext(name)
+        parts = itertools.chain(name.split('-'), [ext])
+        return [packaging.version.parse(part) for part in parts]
+
+    return sorted(names, key=_by_version, reverse=True)
+
+
 def find_on_path(importer, path_item, only=False):
     """Yield distributions accessible on a sys.path directory"""
     path_item = _normalize_cached(path_item)
@@ -1979,11 +2006,7 @@
             )
         else:
             # scan for .egg and .egg-info in directory
-
-            path_item_entries = os.listdir(path_item)
-            # Reverse so we find the newest version of a distribution,
-            path_item_entries.sort()
-            path_item_entries.reverse()
+            path_item_entries = _by_version_descending(os.listdir(path_item))
             for entry in path_item_entries:
                 lower = entry.lower()
                 if lower.endswith('.egg-info') or lower.endswith('.dist-info'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/pytest.ini 
new/setuptools-28.8.0/pytest.ini
--- old/setuptools-28.7.1/pytest.ini    2016-10-30 03:39:27.000000000 +0100
+++ new/setuptools-28.8.0/pytest.ini    2016-11-04 20:37:16.000000000 +0100
@@ -1,5 +1,5 @@
 [pytest]
-addopts=--doctest-modules --ignore release.py --ignore 
setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore 
tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore 
scripts/upload-old-releases-as-zip.py --ignore pavement.py
+addopts=--doctest-modules --ignore release.py --ignore 
setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore 
tests/test_pypi.py --ignore tests/shlib_test 
--doctest-glob=pkg_resources/api_tests.txt --ignore 
scripts/upload-old-releases-as-zip.py --ignore pavement.py
 norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .*
 flake8-ignore =
     setuptools/site-patch.py F821
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/setup.cfg 
new/setuptools-28.8.0/setup.cfg
--- old/setuptools-28.7.1/setup.cfg     2016-10-30 03:40:44.000000000 +0100
+++ new/setuptools-28.8.0/setup.cfg     2016-11-04 20:38:51.000000000 +0100
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 28.7.1
+current_version = 28.8.0
 commit = True
 tag = True
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/setup.py 
new/setuptools-28.8.0/setup.py
--- old/setuptools-28.7.1/setup.py      2016-10-30 03:39:27.000000000 +0100
+++ new/setuptools-28.8.0/setup.py      2016-11-04 20:37:16.000000000 +0100
@@ -85,7 +85,7 @@
 
 setup_params = dict(
     name="setuptools",
-    version="28.7.1",
+    version="28.8.0",
     description="Easily download, build, install, upgrade, and uninstall "
         "Python packages",
     author="Python Packaging Authority",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/setuptools/command/build_ext.py 
new/setuptools-28.8.0/setuptools/command/build_ext.py
--- old/setuptools-28.7.1/setuptools/command/build_ext.py       2016-10-30 
03:39:27.000000000 +0100
+++ new/setuptools-28.8.0/setuptools/command/build_ext.py       2016-11-04 
20:37:16.000000000 +0100
@@ -109,7 +109,7 @@
                 and get_abi3_suffix()
             )
             if use_abi3:
-                so_ext = get_config_var('EXT_SUFFIX')
+                so_ext = _get_config_var_837('EXT_SUFFIX')
                 filename = filename[:-len(so_ext)]
                 filename = filename + get_abi3_suffix()
             if isinstance(ext, Library):
@@ -316,3 +316,13 @@
         self.create_static_lib(
             objects, basename, output_dir, debug, target_lang
         )
+
+
+def _get_config_var_837(name):
+    """
+    In https://github.com/pypa/setuptools/pull/837, we discovered
+    Python 3.3.0 exposes the extension suffix under the name 'SO'.
+    """
+    if sys.version_info < (3, 3, 1):
+        name = 'SO'
+    return get_config_var(name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/setuptools.egg-info/PKG-INFO 
new/setuptools-28.8.0/setuptools.egg-info/PKG-INFO
--- old/setuptools-28.7.1/setuptools.egg-info/PKG-INFO  2016-10-30 
03:40:44.000000000 +0100
+++ new/setuptools-28.8.0/setuptools.egg-info/PKG-INFO  2016-11-04 
20:38:51.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: setuptools
-Version: 28.7.1
+Version: 28.8.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-28.7.1/setuptools.egg-info/SOURCES.txt 
new/setuptools-28.8.0/setuptools.egg-info/SOURCES.txt
--- old/setuptools-28.7.1/setuptools.egg-info/SOURCES.txt       2016-10-30 
03:40:44.000000000 +0100
+++ new/setuptools-28.8.0/setuptools.egg-info/SOURCES.txt       2016-11-04 
20:38:51.000000000 +0100
@@ -143,4 +143,5 @@
 setuptools/tests/textwrap.py
 setuptools/tests/indexes/test_links_priority/external.html
 setuptools/tests/indexes/test_links_priority/simple/foobar/index.html
-tests/manual_test.py
\ No newline at end of file
+tests/manual_test.py
+tests/test_pypi.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-28.7.1/tests/test_pypi.py 
new/setuptools-28.8.0/tests/test_pypi.py
--- old/setuptools-28.7.1/tests/test_pypi.py    1970-01-01 01:00:00.000000000 
+0100
+++ new/setuptools-28.8.0/tests/test_pypi.py    2016-11-04 20:37:17.000000000 
+0100
@@ -0,0 +1,82 @@
+import os
+import subprocess
+
+import virtualenv
+from setuptools.extern.six.moves import http_client
+from setuptools.extern.six.moves import xmlrpc_client
+
+TOP = 200
+PYPI_HOSTNAME = 'pypi.python.org'
+
+
+def rpc_pypi(method, *args):
+    """Call an XML-RPC method on the Pypi server."""
+    conn = http_client.HTTPSConnection(PYPI_HOSTNAME)
+    headers = {'Content-Type': 'text/xml'}
+    payload = xmlrpc_client.dumps(args, method)
+
+    conn.request("POST", "/pypi", payload, headers)
+    response = conn.getresponse()
+    if response.status == 200:
+        result = xmlrpc_client.loads(response.read())[0][0]
+        return result
+    else:
+        raise RuntimeError("Unable to download the list of top "
+                           "packages from Pypi.")
+
+
+def get_top_packages(limit):
+    """Collect the name of the top packages on Pypi."""
+    packages = rpc_pypi('top_packages')
+    return packages[:limit]
+
+
+def _package_install(package_name, tmp_dir=None, local_setuptools=True):
+    """Try to install a package and return the exit status.
+
+    This function creates a virtual environment, install setuptools using pip
+    and then install the required package. If local_setuptools is True, it
+    will install the local version of setuptools.
+    """
+    package_dir = os.path.join(tmp_dir, "test_%s" % package_name)
+    if not local_setuptools:
+        package_dir = package_dir + "_baseline"
+
+    virtualenv.create_environment(package_dir)
+
+    pip_path = os.path.join(package_dir, "bin", "pip")
+    if local_setuptools:
+        subprocess.check_call([pip_path, "install", "."])
+    returncode = subprocess.call([pip_path, "install", package_name])
+    return returncode
+
+
+def test_package_install(package_name, tmpdir):
+    """Test to verify the outcome of installing a package.
+
+    This test compare that the return code when installing a package is the
+    same as with the current stable version of setuptools.
+    """
+    new_exit_status = _package_install(package_name, tmp_dir=str(tmpdir))
+    if new_exit_status:
+        print("Installation failed, testing against stable setuptools",
+              package_name)
+        old_exit_status = _package_install(package_name, tmp_dir=str(tmpdir),
+                                           local_setuptools=False)
+        assert new_exit_status == old_exit_status
+
+
+def pytest_generate_tests(metafunc):
+    """Generator function for test_package_install.
+
+    This function will generate calls to test_package_install. If a package
+    list has been specified on the command line, it will be used. Otherwise,
+    Pypi will be queried to get the current list of top packages.
+    """
+    if "package_name" in metafunc.fixturenames:
+        if not metafunc.config.option.package_name:
+            packages = get_top_packages(TOP)
+            packages = [name for name, downloads in packages]
+        else:
+            packages = metafunc.config.option.package_name
+        metafunc.parametrize("package_name", packages)


Reply via email to