Imported Upstream version 36.1.0 upstream/36.1.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 14 Jan 2019 01:33:03 +0000 (10:33 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 14 Jan 2019 01:33:03 +0000 (10:33 +0900)
CHANGES.rst
bootstrap.py
docs/releases.txt
pkg_resources/__init__.py
pkg_resources/py31compat.py [new file with mode: 0644]
setup.cfg
setup.py
setuptools/command/upload_docs.py

index b2d1ed9..1bae3f2 100644 (file)
@@ -1,3 +1,17 @@
+v36.1.0
+-------
+
+* #1083: Avoid race condition on directory creation in
+  ``pkg_resources.ensure_directory``.
+
+* Removed deprecation of and restored support for
+  ``upload_docs`` command for sites other than PyPI.
+  Only warehouse is dropping support, but services like
+  `devpi <http://doc.devpi.net/latest/>`_ continue to
+  support docs built by setuptools' plugins. See
+  `this comment <https://bitbucket.org/hpk42/devpi/issues/388/support-rtd-model-for-building-uploading#comment-34292423>`_
+  for more context on the motivation for this change.
+
 v36.0.1
 -------
 
index 24d7093..f3a12c0 100644 (file)
@@ -9,6 +9,7 @@ import os
 import sys
 import textwrap
 import subprocess
+import io
 
 
 minimal_egg_info = textwrap.dedent("""
@@ -41,7 +42,7 @@ def build_egg_info():
     """
 
     os.mkdir('setuptools.egg-info')
-    with open('setuptools.egg-info/entry_points.txt', 'w') as ep:
+    with io.open('setuptools.egg-info/entry_points.txt', 'w') as ep:
         ep.write(minimal_egg_info)
 
 
index c84ddd7..30ea084 100644 (file)
@@ -7,25 +7,20 @@ mechanical technique for releases, enacted by Travis following a
 successful build of a tagged release per
 `PyPI deployment <https://docs.travis-ci.com/user/deployment/pypi>`_.
 
-To cut a release, install and run ``bumpversion {part}`` where ``part``
+Prior to cutting a release, please check that the CHANGES.rst reflects
+the summary of changes since the last release.
+Ideally, these changelog entries would have been added
+along with the changes, but it's always good to check.
+Think about it from the
+perspective of a user not involved with the development--what would
+that person want to know about what has changed--or from the
+perspective of your future self wanting to know when a particular
+change landed.
+
+To cut a release, install and run ``bump2version {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 (from the Python 3.5 tests).
-
-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
-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 branch. Sometimes,
-especially when the bootstrap script is rolled back, this
-process doesn't work as expected and requires manual intervention.
+the release will be uploaded to PyPI (from the Python 3.6 tests).
 
 Release Frequency
 -----------------
index 2ed07c3..51b4749 100644 (file)
@@ -67,6 +67,7 @@ try:
 except ImportError:
     importlib_machinery = None
 
+from . import py31compat
 from pkg_resources.extern import appdirs
 from pkg_resources.extern import packaging
 __import__('pkg_resources.extern.packaging.version')
@@ -74,6 +75,7 @@ __import__('pkg_resources.extern.packaging.specifiers')
 __import__('pkg_resources.extern.packaging.requirements')
 __import__('pkg_resources.extern.packaging.markers')
 
+
 if (3, 0) < sys.version_info < (3, 3):
     raise RuntimeError("Python 3.3 or later is required")
 
@@ -2958,8 +2960,7 @@ def _find_adapter(registry, ob):
 def ensure_directory(path):
     """Ensure that the parent directory of `path` exists"""
     dirname = os.path.dirname(path)
-    if not os.path.isdir(dirname):
-        os.makedirs(dirname)
+    py31compat.makedirs(dirname, exist_ok=True)
 
 
 def _bypass_ensure_directory(path):
diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py
new file mode 100644 (file)
index 0000000..28120ca
--- /dev/null
@@ -0,0 +1,17 @@
+import os
+import errno
+import sys
+
+
+PY32 = sys.version_info >= (3, 2)
+
+
+def _makedirs_31(path, exist_ok=False):
+    try:
+        os.makedirs(path)
+    except OSError as exc:
+        if exc.errno != errno.EEXIST:
+            raise
+
+
+makedirs = os.makedirs if PY32 else _makedirs_31
index b5199a6..10eed84 100755 (executable)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 36.0.1
+current_version = 36.1.0
 commit = True
 tag = True
 
index 6eaac16..c051fc1 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -89,7 +89,7 @@ def pypi_link(pkg_filename):
 
 setup_params = dict(
     name="setuptools",
-    version="36.0.1",
+    version="36.1.0",
     description="Easily download, build, install, upgrade, and uninstall "
         "Python packages",
     author="Python Packaging Authority",
index 24a017c..07aa564 100644 (file)
@@ -57,7 +57,6 @@ class upload_docs(upload):
         self.target_dir = None
 
     def finalize_options(self):
-        log.warn("Upload_docs command is deprecated. Use RTD instead.")
         upload.finalize_options(self)
         if self.upload_dir is None:
             if self.has_sphinx():
@@ -69,6 +68,8 @@ class upload_docs(upload):
         else:
             self.ensure_dirname('upload_dir')
             self.target_dir = self.upload_dir
+        if 'pypi.python.org' in self.repository:
+            log.warn("Upload_docs command is deprecated. Use RTD instead.")
         self.announce('Using upload directory %s' % self.target_dir)
 
     def create_zipfile(self, filename):