Hello community,
here is the log from the commit of package python3-setuptools for
openSUSE:Factory checked in at 2016-09-30 15:25: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-09-23 11:24:42.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python3-setuptools.new/python3-setuptools.changes
2016-09-30 15:25:09.000000000 +0200
@@ -1,0 +2,13 @@
+Wed Sep 28 04:45:54 UTC 2016 - [email protected]
+
+- update to version 28.0.0:
+ * #733: Do not search excluded directories for packages. This
+ introduced a backwards incompatible change in find_packages() so
+ that find_packages(exclude=['foo']) == [], excluding subpackages
+ of foo. Previously, find_packages(exclude=['foo']) ==
+ ['foo.bar'], even though the parent foo package was excluded.
+ * #795: Bump certifi.
+ * #719: Suppress decoding errors and instead log a warning when
+ metadata cannot be decoded.
+
+-------------------------------------------------------------------
Old:
----
setuptools-27.3.0.tar.gz
New:
----
setuptools-28.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-setuptools.spec ++++++
--- /var/tmp/diff_new_pack.Bz7Pn1/_old 2016-09-30 15:25:10.000000000 +0200
+++ /var/tmp/diff_new_pack.Bz7Pn1/_new 2016-09-30 15:25:10.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-setuptools
-Version: 27.3.0
+Version: 28.0.0
Release: 0
Url: http://pypi.python.org/pypi/setuptools
Summary: Easily download, build, install, upgrade, and uninstall Python
packages
++++++ setuptools-27.3.0.tar.gz -> setuptools-28.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-27.3.0/CHANGES.rst
new/setuptools-28.0.0/CHANGES.rst
--- old/setuptools-27.3.0/CHANGES.rst 2016-09-21 03:22:50.000000000 +0200
+++ new/setuptools-28.0.0/CHANGES.rst 2016-09-27 21:53:44.000000000 +0200
@@ -2,6 +2,29 @@
CHANGES
=======
+v28.0.0
+-------
+
+* #733: Do not search excluded directories for packages.
+ This introduced a backwards incompatible change in ``find_packages()``
+ so that ``find_packages(exclude=['foo']) == []``, excluding subpackages of
``foo``.
+ Previously, ``find_packages(exclude=['foo']) == ['foo.bar']``,
+ even though the parent ``foo`` package was excluded.
+
+* #795: Bump certifi.
+
+* #719: Suppress decoding errors and instead log a warning
+ when metadata cannot be decoded.
+
+v27.3.1
+-------
+
+* #790: In MSVC monkeypatching, explicitly patch each
+ function by name in the target module instead of inferring
+ the module from the function's ``__module__``. Improves
+ compatibility with other packages that might have previously
+ patched distutils functions (i.e. NumPy).
+
v27.3.0
-------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-27.3.0/PKG-INFO
new/setuptools-28.0.0/PKG-INFO
--- old/setuptools-27.3.0/PKG-INFO 2016-09-21 03:23:11.000000000 +0200
+++ new/setuptools-28.0.0/PKG-INFO 2016-09-27 21:54:06.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: setuptools
-Version: 27.3.0
+Version: 28.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-27.3.0/pkg_resources/__init__.py
new/setuptools-28.0.0/pkg_resources/__init__.py
--- old/setuptools-27.3.0/pkg_resources/__init__.py 2016-09-21
03:22:50.000000000 +0200
+++ new/setuptools-28.0.0/pkg_resources/__init__.py 2016-09-27
21:53:44.000000000 +0200
@@ -1,3 +1,5 @@
+# coding: utf-8
+
"""
Package resource API
--------------------
@@ -1857,17 +1859,21 @@
return name == 'PKG-INFO' and os.path.isfile(self.path)
def get_metadata(self, name):
- if name == 'PKG-INFO':
- with io.open(self.path, encoding='utf-8') as f:
- try:
- metadata = f.read()
- except UnicodeDecodeError as exc:
- # add path context to error message
- tmpl = " in {self.path}"
- exc.reason += tmpl.format(self=self)
- raise
- return metadata
- raise KeyError("No metadata except PKG-INFO is available")
+ if name != 'PKG-INFO':
+ raise KeyError("No metadata except PKG-INFO is available")
+
+ with io.open(self.path, encoding='utf-8', errors="replace") as f:
+ metadata = f.read()
+ self._warn_on_replacement(metadata)
+ return metadata
+
+ def _warn_on_replacement(self, metadata):
+ # Python 2.6 and 3.2 compat for: replacement_char = '�'
+ replacement_char = b'\xef\xbf\xbd'.decode('utf-8')
+ if replacement_char in metadata:
+ tmpl = "{self.path} could not be properly decoded in UTF-8"
+ msg = tmpl.format(**locals())
+ warnings.warn(msg)
def get_metadata_lines(self, name):
return yield_lines(self.get_metadata(name))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-27.3.0/setup.cfg
new/setuptools-28.0.0/setup.cfg
--- old/setuptools-27.3.0/setup.cfg 2016-09-21 03:23:11.000000000 +0200
+++ new/setuptools-28.0.0/setup.cfg 2016-09-27 21:54:06.000000000 +0200
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 27.3.0
+current_version = 28.0.0
commit = True
tag = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-27.3.0/setup.py
new/setuptools-28.0.0/setup.py
--- old/setuptools-27.3.0/setup.py 2016-09-21 03:22:50.000000000 +0200
+++ new/setuptools-28.0.0/setup.py 2016-09-27 21:53:44.000000000 +0200
@@ -88,7 +88,7 @@
setup_params = dict(
name="setuptools",
- version="27.3.0",
+ version="28.0.0",
description="Easily download, build, install, upgrade, and uninstall "
"Python packages",
author="Python Packaging Authority",
@@ -167,11 +167,11 @@
""").strip().splitlines(),
extras_require={
"ssl:sys_platform=='win32'": "wincertstore==0.2",
- "certs": "certifi==2016.8.8",
+ "certs": "certifi==2016.8.31",
},
dependency_links=[
pypi_link(
- 'certifi-2016.8.8.tar.gz#md5=b57513f7670482da45bb350b792f659e',
+ 'certifi-2016.8.31.tar.gz#md5=2f22d484a36d38d98be74f9eeb2846ec',
),
pypi_link(
'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-27.3.0/setuptools/__init__.py
new/setuptools-28.0.0/setuptools/__init__.py
--- old/setuptools-27.3.0/setuptools/__init__.py 2016-09-21
03:22:50.000000000 +0200
+++ new/setuptools-28.0.0/setuptools/__init__.py 2016-09-27
21:53:44.000000000 +0200
@@ -7,7 +7,7 @@
from distutils.util import convert_path
from fnmatch import fnmatchcase
-from setuptools.extern.six.moves import filterfalse, map
+from setuptools.extern.six.moves import filter, filterfalse, map
import setuptools.version
from setuptools.extension import Extension
@@ -32,13 +32,18 @@
class PackageFinder(object):
+ """
+ Generate a list of all Python packages found within a directory
+ """
@classmethod
def find(cls, where='.', exclude=(), include=('*',)):
"""Return a list all Python packages found within directory 'where'
- 'where' should be supplied as a "cross-platform" (i.e. URL-style)
- path; it will be converted to the appropriate local path syntax.
+ 'where' is the root directory which will be searched for packages. It
+ should be supplied as a "cross-platform" (i.e. URL-style) path; it will
+ be converted to the appropriate local path syntax.
+
'exclude' is a sequence of package names to exclude; '*' can be used
as a wildcard in the names, such that 'foo.*' will exclude all
subpackages of 'foo' (but not 'foo' itself).
@@ -47,65 +52,47 @@
specified, only the named packages will be included. If it's not
specified, all found packages will be included. 'include' can contain
shell style wildcard patterns just like 'exclude'.
-
- The list of included packages is built up first and then any
- explicitly excluded packages are removed from it.
- """
- out = cls._find_packages_iter(convert_path(where))
- out = cls.require_parents(out)
- includes = cls._build_filter(*include)
- excludes = cls._build_filter('ez_setup', '*__pycache__', *exclude)
- out = filter(includes, out)
- out = filterfalse(excludes, out)
- return list(out)
-
- @staticmethod
- def require_parents(packages):
"""
- Exclude any apparent package that apparently doesn't include its
- parent.
- For example, exclude 'foo.bar' if 'foo' is not present.
- """
- found = []
- for pkg in packages:
- base, sep, child = pkg.rpartition('.')
- if base and base not in found:
- continue
- found.append(pkg)
- yield pkg
+ return list(cls._find_packages_iter(
+ convert_path(where),
+ cls._build_filter('ez_setup', '*__pycache__', *exclude),
+ cls._build_filter(*include)))
- @staticmethod
- def _candidate_dirs(base_path):
+ @classmethod
+ def _find_packages_iter(cls, where, exclude, include):
"""
- Return all dirs in base_path that might be packages.
+ All the packages found in 'where' that pass the 'include' filter, but
+ not the 'exclude' filter.
"""
- has_dot = lambda name: '.' in name
- for root, dirs, files in os.walk(base_path, followlinks=True):
- # Exclude directories that contain a period, as they cannot be
- # packages. Mutate the list to avoid traversal.
- dirs[:] = filterfalse(has_dot, dirs)
- for dir in dirs:
- yield os.path.relpath(os.path.join(root, dir), base_path)
-
- @classmethod
- def _find_packages_iter(cls, base_path):
- candidates = cls._candidate_dirs(base_path)
- return (
- path.replace(os.path.sep, '.')
- for path in candidates
- if cls._looks_like_package(os.path.join(base_path, path))
- )
+ for root, dirs, files in os.walk(where, followlinks=True):
+ # Copy dirs to iterate over it, then empty dirs.
+ all_dirs = dirs[:]
+ dirs[:] = []
+
+ for dir in all_dirs:
+ full_path = os.path.join(root, dir)
+ rel_path = os.path.relpath(full_path, where)
+ package = rel_path.replace(os.path.sep, '.')
+
+ # Check if the directory is a package and passes the filters
+ if ('.' not in dir
+ and include(package)
+ and not exclude(package)
+ and cls._looks_like_package(full_path)):
+ yield package
+ dirs.append(dir)
@staticmethod
def _looks_like_package(path):
+ """Does a directory look like a package?"""
return os.path.isfile(os.path.join(path, '__init__.py'))
@staticmethod
def _build_filter(*patterns):
"""
Given a list of patterns, return a callable that will be true only if
- the input matches one of the patterns.
+ the input matches at least one of the patterns.
"""
return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-27.3.0/setuptools/monkey.py
new/setuptools-28.0.0/setuptools/monkey.py
--- old/setuptools-27.3.0/setuptools/monkey.py 2016-09-21 03:22:50.000000000
+0200
+++ new/setuptools-28.0.0/setuptools/monkey.py 2016-09-27 21:53:44.000000000
+0200
@@ -6,6 +6,7 @@
import distutils.filelist
import platform
import types
+import functools
from .py26compat import import_module
from setuptools.extern import six
@@ -115,16 +116,21 @@
)
-def patch_func(replacement, original):
- # first set the 'unpatched' attribute on the replacement to
+def patch_func(replacement, target_mod, func_name):
+ """
+ Patch func_name in target_mod with replacement
+
+ Important - original must be resolved by name to avoid
+ patching an already patched function.
+ """
+ original = getattr(target_mod, func_name)
+
+ # set the 'unpatched' attribute on the replacement to
# point to the original.
vars(replacement).setdefault('unpatched', original)
- # next resolve the module in which the original func resides
- target_mod = import_module(original.__module__)
-
- # finally replace the function in the original module
- setattr(target_mod, original.__name__, replacement)
+ # replace the function in the original module
+ setattr(target_mod, func_name, replacement)
def get_unpatched_function(candidate):
@@ -139,37 +145,43 @@
# import late to avoid circular imports on Python < 3.5
msvc = import_module('setuptools.msvc')
- try:
- # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4)
- import distutils.msvc9compiler as msvc9compiler
- except ImportError:
- pass
-
- try:
- # Distutil file for MSVC++ 14.0 and upper (Python 3.5+)
- import distutils._msvccompiler as msvc14compiler
- except ImportError:
- pass
-
if platform.system() != 'Windows':
# Compilers only availables on Microsoft Windows
return
+ def patch_params(mod_name, func_name):
+ """
+ Prepare the parameters for patch_func to patch indicated function.
+ """
+ repl_prefix = 'msvc9_' if 'msvc9' in mod_name else 'msvc14_'
+ repl_name = repl_prefix + func_name.lstrip('_')
+ repl = getattr(msvc, repl_name)
+ mod = import_module(mod_name)
+ if not hasattr(mod, func_name):
+ raise ImportError(func_name)
+ return repl, mod, func_name
+
+ # Python 2.7 to 3.4
+ msvc9 = functools.partial(patch_params, 'distutils.msvc9compiler')
+
+ # Python 3.5+
+ msvc14 = functools.partial(patch_params, 'distutils._msvccompiler')
+
try:
# Patch distutils.msvc9compiler
- patch_func(msvc.msvc9_find_vcvarsall, msvc9compiler.find_vcvarsall)
- patch_func(msvc.msvc9_query_vcvarsall, msvc9compiler.query_vcvarsall)
- except NameError:
+ patch_func(*msvc9('find_vcvarsall'))
+ patch_func(*msvc9('query_vcvarsall'))
+ except ImportError:
pass
try:
# Patch distutils._msvccompiler._get_vc_env
- patch_func(msvc.msvc14_get_vc_env, msvc14compiler._get_vc_env)
- except NameError:
+ patch_func(*msvc14('_get_vc_env'))
+ except ImportError:
pass
try:
# Patch distutils._msvccompiler.gen_lib_options for Numpy
- patch_func(msvc.msvc14_gen_lib_options, msvc14compiler.gen_lib_options)
- except NameError:
+ patch_func(*msvc14('gen_lib_options'))
+ except ImportError:
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools-27.3.0/setuptools/tests/test_find_packages.py
new/setuptools-28.0.0/setuptools/tests/test_find_packages.py
--- old/setuptools-27.3.0/setuptools/tests/test_find_packages.py
2016-09-21 03:22:50.000000000 +0200
+++ new/setuptools-28.0.0/setuptools/tests/test_find_packages.py
2016-09-27 21:53:44.000000000 +0200
@@ -98,6 +98,15 @@
packages = find_packages(self.dist_dir, exclude=('pkg.*',))
assert packages == ['pkg']
+ def test_exclude_recursive(self):
+ """
+ Excluding a parent package should exclude all child packages as well.
+ """
+ self._touch('__init__.py', self.pkg_dir)
+ self._touch('__init__.py', self.sub_pkg_dir)
+ packages = find_packages(self.dist_dir, exclude=('pkg',))
+ assert packages == []
+
def test_include_excludes_other(self):
"""
If include is specified, other packages should be excluded.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-27.3.0/setuptools.egg-info/PKG-INFO
new/setuptools-28.0.0/setuptools.egg-info/PKG-INFO
--- old/setuptools-27.3.0/setuptools.egg-info/PKG-INFO 2016-09-21
03:23:11.000000000 +0200
+++ new/setuptools-28.0.0/setuptools.egg-info/PKG-INFO 2016-09-27
21:54:05.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: setuptools
-Version: 27.3.0
+Version: 28.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-27.3.0/setuptools.egg-info/dependency_links.txt
new/setuptools-28.0.0/setuptools.egg-info/dependency_links.txt
--- old/setuptools-27.3.0/setuptools.egg-info/dependency_links.txt
2016-09-21 03:23:11.000000000 +0200
+++ new/setuptools-28.0.0/setuptools.egg-info/dependency_links.txt
2016-09-27 21:54:05.000000000 +0200
@@ -1,2 +1,2 @@
-https://pypi.python.org/packages/source/c/certifi/certifi-2016.8.8.tar.gz#md5=b57513f7670482da45bb350b792f659e
+https://pypi.python.org/packages/source/c/certifi/certifi-2016.8.31.tar.gz#md5=2f22d484a36d38d98be74f9eeb2846ec
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-27.3.0/setuptools.egg-info/requires.txt
new/setuptools-28.0.0/setuptools.egg-info/requires.txt
--- old/setuptools-27.3.0/setuptools.egg-info/requires.txt 2016-09-21
03:23:11.000000000 +0200
+++ new/setuptools-28.0.0/setuptools.egg-info/requires.txt 2016-09-27
21:54:05.000000000 +0200
@@ -1,6 +1,6 @@
[certs]
-certifi==2016.8.8
+certifi==2016.8.31
[ssl:sys_platform=='win32']
wincertstore==0.2