Hello community,

here is the log from the commit of package python3-setuptools for 
openSUSE:Factory checked in at 2015-01-30 11:00:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2015-01-27 09:08:36.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python3-setuptools.new/python3-setuptools.changes   
    2015-01-30 11:00:05.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Jan 28 16:20:53 UTC 2015 - [email protected]
+
+- update to version 12.0.5:
+  * Issue #339: Correct Attribute reference in "cant_write_to_target".
+
+-------------------------------------------------------------------

Old:
----
  setuptools-12.0.4.tar.gz

New:
----
  setuptools-12.0.5.tar.gz

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

Other differences:
------------------
++++++ python3-setuptools.spec ++++++
--- /var/tmp/diff_new_pack.pOjZ5x/_old  2015-01-30 11:00:06.000000000 +0100
+++ /var/tmp/diff_new_pack.pOjZ5x/_new  2015-01-30 11:00:06.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python3-setuptools
-Version:        12.0.4
+Version:        12.0.5
 Release:        0
 Url:            http://pypi.python.org/pypi/setuptools
 Summary:        Easily download, build, install, upgrade, and uninstall Python 
packages

++++++ setuptools-12.0.4.tar.gz -> setuptools-12.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/CHANGES.txt 
new/setuptools-12.0.5/CHANGES.txt
--- old/setuptools-12.0.4/CHANGES.txt   2015-01-21 04:05:52.000000000 +0100
+++ new/setuptools-12.0.5/CHANGES.txt   2015-01-26 14:32:57.000000000 +0100
@@ -3,6 +3,12 @@
 =======
 
 ------
+12.0.5
+------
+
+* Issue #339: Correct Attribute reference in ``cant_write_to_target``.
+
+------
 12.0.4
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/PKG-INFO 
new/setuptools-12.0.5/PKG-INFO
--- old/setuptools-12.0.4/PKG-INFO      2015-01-21 04:10:37.000000000 +0100
+++ new/setuptools-12.0.5/PKG-INFO      2015-01-26 14:35:10.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: setuptools
-Version: 12.0.4
+Version: 12.0.5
 Summary: Easily download, build, install, upgrade, and uninstall Python 
packages
 Home-page: https://bitbucket.org/pypa/setuptools
 Author: Python Packaging Authority
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/docs/index.txt 
new/setuptools-12.0.5/docs/index.txt
--- old/setuptools-12.0.4/docs/index.txt        2015-01-19 00:48:57.000000000 
+0100
+++ new/setuptools-12.0.5/docs/index.txt        2015-01-22 16:26:07.000000000 
+0100
@@ -19,7 +19,6 @@
    history
    roadmap
    python3
-   using
    setuptools
    easy_install
    pkg_resources
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/docs/using.txt 
new/setuptools-12.0.5/docs/using.txt
--- old/setuptools-12.0.4/docs/using.txt        2015-01-19 00:48:57.000000000 
+0100
+++ new/setuptools-12.0.5/docs/using.txt        1970-01-01 01:00:00.000000000 
+0100
@@ -1,13 +0,0 @@
-================================
-Using Setuptools in your project
-================================
-
-To use Setuptools in your project, the recommended way is to ship
-`ez_setup.py` alongside your `setup.py` script and call
-it at the very beginning of `setup.py` like this::
-
-    from ez_setup import use_setuptools
-    use_setuptools()
-
-More info on `ez_setup.py` can be found at `the project home page
-<https://pypy.python.org/pypi/setuptools>`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/ez_setup.py 
new/setuptools-12.0.5/ez_setup.py
--- old/setuptools-12.0.4/ez_setup.py   2015-01-19 02:49:13.000000000 +0100
+++ new/setuptools-12.0.5/ez_setup.py   2015-01-22 16:26:13.000000000 +0100
@@ -1,18 +1,11 @@
 #!/usr/bin/env python
-"""Bootstrap setuptools installation
 
-To use setuptools in your package's setup.py, include this
-file in the same directory and add this to the top of your setup.py::
-
-    from ez_setup import use_setuptools
-    use_setuptools()
-
-To require a specific version of setuptools, set a download
-mirror, or use an alternate download directory, simply supply
-the appropriate options to ``use_setuptools()``.
+"""
+Setuptools bootstrapping installer.
 
-This file can also be run as a script to install or upgrade setuptools.
+Run this script to install or upgrade setuptools.
 """
+
 import os
 import shutil
 import sys
@@ -23,6 +16,7 @@
 import platform
 import textwrap
 import contextlib
+import warnings
 
 from distutils import log
 
@@ -36,11 +30,14 @@
 except ImportError:
     USER_SITE = None
 
-DEFAULT_VERSION = "12.0.4"
+DEFAULT_VERSION = "12.0.5"
 DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/";
 
+
 def _python_cmd(*args):
     """
+    Execute a command.
+
     Return True if the command succeeded.
     """
     args = (sys.executable,) + args
@@ -48,6 +45,7 @@
 
 
 def _install(archive_filename, install_args=()):
+    """Install Setuptools."""
     with archive_context(archive_filename):
         # installing
         log.warn('Installing Setuptools')
@@ -59,6 +57,7 @@
 
 
 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)
@@ -70,9 +69,8 @@
 
 
 class ContextualZipFile(zipfile.ZipFile):
-    """
-    Supplement ZipFile class to support context manager for Python 2.6
-    """
+
+    """Supplement ZipFile class to support context manager for Python 2.6."""
 
     def __enter__(self):
         return self
@@ -81,9 +79,7 @@
         self.close()
 
     def __new__(cls, *args, **kwargs):
-        """
-        Construct a ZipFile or ContextualZipFile as appropriate
-        """
+        """Construct a ZipFile or ContextualZipFile as appropriate."""
         if hasattr(zipfile.ZipFile, '__exit__'):
             return zipfile.ZipFile(*args, **kwargs)
         return super(ContextualZipFile, cls).__new__(cls)
@@ -91,7 +87,11 @@
 
 @contextlib.contextmanager
 def archive_context(filename):
-    # extracting the archive
+    """
+    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()
@@ -112,6 +112,7 @@
 
 
 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):
@@ -129,11 +130,30 @@
     setuptools.bootstrap_install_from = egg
 
 
-def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
+def use_setuptools(
+        version=DEFAULT_VERSION, download_base=DEFAULT_URL,
         to_dir=os.curdir, download_delay=15):
+    """
+    *deprecated* Download, install, and import Setuptools.
+
+    Return None.
+    """
+    warnings.warn(
+        "`use_setuptools` is deprecated. To enforce a specific "
+        "version of setuptools, use `pkg_resources.require`.",
+        DeprecationWarning,
+    )
     to_dir = os.path.abspath(to_dir)
     rep_modules = 'pkg_resources', 'setuptools'
     imported = set(sys.modules).intersection(rep_modules)
+    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})
+        """)
     try:
         import pkg_resources
     except ImportError:
@@ -145,14 +165,7 @@
         return _do_download(version, download_base, to_dir, download_delay)
     except pkg_resources.VersionConflict as VC_err:
         if imported:
-            msg = 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})
-                """).format(VC_err=VC_err, version=version)
+            msg = conflict_tmpl.format(VC_err=VC_err, version=version)
             sys.stderr.write(msg)
             sys.exit(2)
 
@@ -160,10 +173,12 @@
         del pkg_resources, sys.modules['pkg_resources']
         return _do_download(version, download_base, to_dir, download_delay)
 
+
 def _clean_check(cmd, target):
     """
-    Run the command to download target. If the command fails, clean up before
-    re-raising the error.
+    Run the command to download target.
+
+    If the command fails, clean up before re-raising the error.
     """
     try:
         subprocess.check_call(cmd)
@@ -172,10 +187,13 @@
             os.unlink(target)
         raise
 
+
 def download_file_powershell(url, target):
     """
-    Download the file at url to target using Powershell (which will validate
-    trust). Raise an exception if the command cannot complete.
+    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 = (
@@ -191,7 +209,9 @@
     ]
     _clean_check(cmd, target)
 
+
 def has_powershell():
+    """Determine if Powershell is available."""
     if platform.system() != 'Windows':
         return False
     cmd = ['powershell', '-Command', 'echo test']
@@ -201,13 +221,14 @@
         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:
@@ -216,13 +237,14 @@
         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:
@@ -231,14 +253,11 @@
         except Exception:
             return False
     return True
-
 download_file_wget.viable = has_wget
 
+
 def download_file_insecure(url, target):
-    """
-    Use Python to download the file, even though it cannot authenticate the
-    connection.
-    """
+    """Use Python to download the file, without connection authentication."""
     src = urlopen(url)
     try:
         # Read all the data in one block.
@@ -249,9 +268,9 @@
     # 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,
@@ -262,10 +281,12 @@
     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,
+
+def download_setuptools(
+        version=DEFAULT_VERSION, download_base=DEFAULT_URL,
         to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader):
     """
-    Download setuptools from a specified location and return its filename
+    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
@@ -287,16 +308,18 @@
         downloader(url, saveto)
     return os.path.realpath(saveto)
 
+
 def _build_install_args(options):
     """
-    Build the arguments to 'python setup.py install' on the setuptools package
+    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
-    """
+    """Parse the command line for options."""
     parser = optparse.OptionParser()
     parser.add_option(
         '--user', dest='user_install', action='store_true', default=False,
@@ -318,8 +341,9 @@
     # positional arguments are ignored
     return options
 
+
 def main():
-    """Install or upgrade setuptools and EasyInstall"""
+    """Install or upgrade setuptools and EasyInstall."""
     options = _parse_args()
     archive = download_setuptools(
         version=options.version,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/setuptools/command/easy_install.py 
new/setuptools-12.0.5/setuptools/command/easy_install.py
--- old/setuptools-12.0.4/setuptools/command/easy_install.py    2015-01-21 
03:46:27.000000000 +0100
+++ new/setuptools-12.0.5/setuptools/command/easy_install.py    2015-01-26 
14:32:09.000000000 +0100
@@ -483,7 +483,7 @@
         """).lstrip()
 
     def cant_write_to_target(self):
-        msg = self._cant_write_msg % (sys.exc_info()[1], self.install_dir,)
+        msg = self.__cant_write_msg % (sys.exc_info()[1], self.install_dir,)
 
         if not os.path.exists(self.install_dir):
             msg += '\n' + self.__not_exists_id
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/setuptools-12.0.4/setuptools/tests/test_easy_install.py 
new/setuptools-12.0.5/setuptools/tests/test_easy_install.py
--- old/setuptools-12.0.4/setuptools/tests/test_easy_install.py 2015-01-21 
03:13:37.000000000 +0100
+++ new/setuptools-12.0.5/setuptools/tests/test_easy_install.py 2015-01-26 
14:31:14.000000000 +0100
@@ -13,6 +13,7 @@
 import tarfile
 import logging
 import itertools
+import distutils.errors
 
 import pytest
 try:
@@ -110,6 +111,16 @@
         keys = sorted(cmd.package_index.scanned_urls.keys())
         assert keys == ['link1', 'link2']
 
+    def test_write_exception(self):
+        """
+        Test that `cant_write_to_target` is rendered as a DistutilsError.
+        """
+        dist = Distribution()
+        cmd = ei.easy_install(dist)
+        cmd.install_dir = os.getcwd()
+        with pytest.raises(distutils.errors.DistutilsError):
+            cmd.cant_write_to_target()
+
 
 class TestPTHFileWriter:
     def test_add_from_cwd_site_sets_dirty(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/setuptools/version.py 
new/setuptools-12.0.5/setuptools/version.py
--- old/setuptools-12.0.4/setuptools/version.py 2015-01-19 02:49:13.000000000 
+0100
+++ new/setuptools-12.0.5/setuptools/version.py 2015-01-21 14:18:58.000000000 
+0100
@@ -1 +1 @@
-__version__ = '12.0.4'
+__version__ = '12.0.5'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/setuptools.egg-info/PKG-INFO 
new/setuptools-12.0.5/setuptools.egg-info/PKG-INFO
--- old/setuptools-12.0.4/setuptools.egg-info/PKG-INFO  2015-01-21 
04:09:44.000000000 +0100
+++ new/setuptools-12.0.5/setuptools.egg-info/PKG-INFO  2015-01-26 
14:35:08.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: setuptools
-Version: 12.0.4
+Version: 12.0.5
 Summary: Easily download, build, install, upgrade, and uninstall Python 
packages
 Home-page: https://bitbucket.org/pypa/setuptools
 Author: Python Packaging Authority
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/setuptools-12.0.4/setuptools.egg-info/SOURCES.txt 
new/setuptools-12.0.5/setuptools.egg-info/SOURCES.txt
--- old/setuptools-12.0.4/setuptools.egg-info/SOURCES.txt       2015-01-21 
04:10:27.000000000 +0100
+++ new/setuptools-12.0.5/setuptools.egg-info/SOURCES.txt       2015-01-26 
14:35:10.000000000 +0100
@@ -29,7 +29,6 @@
 docs/releases.txt
 docs/roadmap.txt
 docs/setuptools.txt
-docs/using.txt
 docs/_templates/indexsidebar.html
 docs/_theme/nature/theme.conf
 docs/_theme/nature/static/nature.css_t

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to