diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-02 22:32:20 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-02 22:32:20 -0500 |
commit | 89bbe1de146a90bacb521ffeb6905a5f23498aa8 (patch) | |
tree | d4df0e591d76215c1ee7c5cfa39945205b8c6163 | |
parent | 16ee10c47583a4a2b7480af6fc5a205343acfdfd (diff) | |
parent | b76da40361a632e084ee556910fd392e679e31ef (diff) | |
download | external_python_setuptools-89bbe1de146a90bacb521ffeb6905a5f23498aa8.tar.gz external_python_setuptools-89bbe1de146a90bacb521ffeb6905a5f23498aa8.tar.bz2 external_python_setuptools-89bbe1de146a90bacb521ffeb6905a5f23498aa8.zip |
Merge with 11.0
--HG--
branch : feature/issue-229
-rw-r--r-- | .hgtags | 1 | ||||
-rw-r--r-- | CHANGES.txt | 7 | ||||
-rw-r--r-- | bootstrap.py | 12 | ||||
-rw-r--r-- | ez_setup.py | 2 | ||||
-rw-r--r-- | linkify.py | 2 | ||||
-rw-r--r-- | pkg_resources/_vendor/packaging/__about__.py | 2 | ||||
-rw-r--r-- | pkg_resources/_vendor/packaging/specifiers.py | 58 | ||||
-rw-r--r-- | pkg_resources/_vendor/packaging/version.py | 25 | ||||
-rw-r--r-- | pkg_resources/_vendor/vendored.txt | 2 | ||||
-rw-r--r-- | setuptools/version.py | 2 |
10 files changed, 96 insertions, 17 deletions
@@ -181,3 +181,4 @@ fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1 26b00011ec65b8f7b4f3d51078ec0a694701a45c 10.1 651d41db58849d4fc50e466f4dc458d448480c4e 10.2 1f5de53c079d577ead9d80265c9e006503b16457 10.2.1 +b4b92805bc0e9802da0b597d00df4fa42b30bc40 11.0 diff --git a/CHANGES.txt b/CHANGES.txt index 18d664b5..62ab4301 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +11.0 +---- + +* Interop #3: Upgrade to Packaging 15.0; updates to PEP 440 so that >1.7 does + not exclude 1.7.1 but does exclude 1.7.0 and 1.7.0.post1. + ------ 10.2.1 ------ diff --git a/bootstrap.py b/bootstrap.py index cbc1ca9d..70f96258 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -28,8 +28,10 @@ minimal_egg_info = textwrap.dedent(""" """) def ensure_egg_info(): - if not os.path.exists('setuptools.egg-info'): - build_egg_info() + if os.path.exists('setuptools.egg-info'): + return + print("adding minimal entry_points") + build_egg_info() def build_egg_info(): @@ -43,7 +45,11 @@ def build_egg_info(): def run_egg_info(): - subprocess.check_call([sys.executable, 'setup.py', 'egg_info']) + cmd = [sys.executable, 'setup.py', 'egg_info'] + print("Regenerating egg_info") + subprocess.check_call(cmd) + print("...and again.") + subprocess.check_call(cmd) if __name__ == '__main__': diff --git a/ez_setup.py b/ez_setup.py index a9aae11f..740af722 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ try: except ImportError: USER_SITE = None -DEFAULT_VERSION = "10.2.2" +DEFAULT_VERSION = "11.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): @@ -14,6 +14,7 @@ link_patterns = [ r"Old Setuptools #(?P<old_setuptools>\d+)", r"Jython #(?P<jython>\d+)", r"Python #(?P<python>\d+)", + r"Interop #(?P<interop>\d+)", ] issue_urls = dict( @@ -25,6 +26,7 @@ issue_urls = dict( old_setuptools='http://bugs.python.org/setuptools/issue{old_setuptools}', jython='http://bugs.jython.org/issue{jython}', python='http://bugs.python.org/issue{python}', + interop='https://github.com/pypa/interoperability/issues/{interop}', ) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index d3e50f1e..36f1a35c 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -22,7 +22,7 @@ __title__ = "packaging" __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "14.5" +__version__ = "15.0" __author__ = "Donald Stufft" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 80225786..9ad0a635 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -458,21 +458,59 @@ class Specifier(_IndividualSpecifier): @_require_version_compare def _compare_less_than(self, prospective, spec): - # Less than are defined as exclusive operators, this implies that - # pre-releases do not match for the same series as the spec. This is - # implemented by making <V imply !=V.*. + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. spec = Version(spec) - return (prospective < spec - and self._get_operator("!=")(prospective, str(spec) + ".*")) + + # Check to see if the prospective version is less than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective < spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a pre-release version, that we do not accept pre-release + # versions for the version mentioned in the specifier (e.g. <3.1 should + # not match 3.1.dev0, but should match 3.0.dev0). + if not spec.is_prerelease and prospective.is_prerelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # less than the spec version *and* it's not a pre-release of the same + # version in the spec. + return True @_require_version_compare def _compare_greater_than(self, prospective, spec): - # Greater than are defined as exclusive operators, this implies that - # pre-releases do not match for the same series as the spec. This is - # implemented by making >V imply !=V.*. + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. spec = Version(spec) - return (prospective > spec - and self._get_operator("!=")(prospective, str(spec) + ".*")) + + # Check to see if the prospective version is greater than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective > spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a post-release version, that we do not accept + # post-release versions for the version mentioned in the specifier + # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). + if not spec.is_postrelease and prospective.is_postrelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # Ensure that we do not allow a local version of the version mentioned + # in the specifier, which is techincally greater than, to match. + if prospective.local is not None: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # greater than the spec version *and* it's not a pre-release of the + # same version in the spec. + return True def _compare_arbitrary(self, prospective, spec): return str(prospective).lower() == str(spec).lower() diff --git a/pkg_resources/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py index 8d779a48..cf8afb16 100644 --- a/pkg_resources/_vendor/packaging/version.py +++ b/pkg_resources/_vendor/packaging/version.py @@ -96,6 +96,10 @@ class LegacyVersion(_BaseVersion): return self._version @property + def base_version(self): + return self._version + + @property def local(self): return None @@ -103,6 +107,10 @@ class LegacyVersion(_BaseVersion): def is_prerelease(self): return False + @property + def is_postrelease(self): + return False + _legacy_version_component_re = re.compile( r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, @@ -270,6 +278,19 @@ class Version(_BaseVersion): return str(self).split("+", 1)[0] @property + def base_version(self): + parts = [] + + # Epoch + if self._version.epoch != 0: + parts.append("{0}!".format(self._version.epoch)) + + # Release segment + parts.append(".".join(str(x) for x in self._version.release)) + + return "".join(parts) + + @property def local(self): version_string = str(self) if "+" in version_string: @@ -279,6 +300,10 @@ class Version(_BaseVersion): def is_prerelease(self): return bool(self._version.dev or self._version.pre) + @property + def is_postrelease(self): + return bool(self._version.post) + def _parse_letter_version(letter, number): if letter: diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 723e026b..75a31670 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1 +1 @@ -packaging==14.5 +packaging==15.0 diff --git a/setuptools/version.py b/setuptools/version.py index addf63a6..1b1703fd 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '10.2.2' +__version__ = '11.1' |