Hello community,
here is the log from the commit of package python3-setuptools for
openSUSE:Factory checked in at 2016-03-26 15:08:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-03-02 14:19:29.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python3-setuptools.new/python3-setuptools.changes
2016-03-26 15:08:43.000000000 +0100
@@ -1,0 +2,20 @@
+Fri Mar 18 16:04:50 UTC 2016 - [email protected]
+
+- update to version 20.3.1:
+ * Issue #519: Remove import hook when reloading the "pkg_resources"
+ module.
+ * Pull Request #184: Update documentation in "pkg_resources" around
+ new "Requirement" implementation.
+
+-------------------------------------------------------------------
+Thu Mar 17 16:40:21 UTC 2016 - [email protected]
+
+- update to version 20.3:
+ * Pull Request #179: "pkg_resources.Requirement" objects are now a
+ subclass of "packaging.requirements.Requirement", allowing any
+ environment markers and url (if any) to be affiliated with the
+ requirement
+ * Pull Request #179: Restore use of RequirementParseError exception
+ unintentionally dropped in 20.2.
+
+-------------------------------------------------------------------
Old:
----
setuptools-20.2.2.tar.gz
New:
----
setuptools-20.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-setuptools.spec ++++++
--- /var/tmp/diff_new_pack.8Ug6gP/_old 2016-03-26 15:08:44.000000000 +0100
+++ /var/tmp/diff_new_pack.8Ug6gP/_new 2016-03-26 15:08:44.000000000 +0100
@@ -17,7 +17,7 @@
Name: python3-setuptools
-Version: 20.2.2
+Version: 20.3.1
Release: 0
Url: http://pypi.python.org/pypi/setuptools
Summary: Easily download, build, install, upgrade, and uninstall Python
packages
++++++ setuptools-20.2.2.tar.gz -> setuptools-20.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/CHANGES.txt
new/setuptools-20.3.1/CHANGES.txt
--- old/setuptools-20.2.2/CHANGES.txt 2016-02-27 15:24:10.000000000 +0100
+++ new/setuptools-20.3.1/CHANGES.txt 2016-03-18 15:48:53.000000000 +0100
@@ -2,6 +2,24 @@
CHANGES
=======
+20.3.1
+------
+
+* Issue #519: Remove import hook when reloading the
+ ``pkg_resources`` module.
+* Pull Request #184: Update documentation in ``pkg_resources``
+ around new ``Requirement`` implementation.
+
+20.3
+----
+
+* Pull Request #179: ``pkg_resources.Requirement`` objects are
+ now a subclass of ``packaging.requirements.Requirement``,
+ allowing any environment markers and url (if any) to be
+ affiliated with the requirement
+* Pull Request #179: Restore use of RequirementParseError
+ exception unintentionally dropped in 20.2.
+
20.2.2
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/PKG-INFO
new/setuptools-20.3.1/PKG-INFO
--- old/setuptools-20.2.2/PKG-INFO 2016-02-27 15:48:30.000000000 +0100
+++ new/setuptools-20.3.1/PKG-INFO 2016-03-18 16:14:06.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: setuptools
-Version: 20.2.2
+Version: 20.3.1
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-20.2.2/docs/pkg_resources.txt
new/setuptools-20.3.1/docs/pkg_resources.txt
--- old/setuptools-20.2.2/docs/pkg_resources.txt 2016-02-07
15:25:06.000000000 +0100
+++ new/setuptools-20.3.1/docs/pkg_resources.txt 2016-03-18
15:48:22.000000000 +0100
@@ -590,20 +590,7 @@
parse multiple specifiers from a string or iterable of strings, use
``parse_requirements()`` instead.)
- The syntax of a requirement specifier can be defined in EBNF as follows::
-
- requirement ::= project_name extras? versionspec?
- versionspec ::= comparison version (',' comparison version)*
- comparison ::= '<' | '<=' | '!=' | '==' | '>=' | '>' | '~=' | '==='
- extras ::= '[' extralist? ']'
- extralist ::= identifier (',' identifier)*
- project_name ::= identifier
- identifier ::= [-A-Za-z0-9_]+
- version ::= [-A-Za-z0-9_.]+
-
- Tokens can be separated by whitespace, and a requirement can be continued
- over multiple lines using a backslash (``\\``). Line-end comments (using
- ``#``) are also allowed.
+ The syntax of a requirement specifier is defined in full in PEP 508.
Some examples of valid requirement specifiers::
@@ -611,6 +598,7 @@
Fizzy [foo, bar]
PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1
SomethingWhoseVersionIDontCareAbout
+ SomethingWithMarker[foo]>1.0;python_version<"2.7"
The project name is the only required portion of a requirement string, and
if it's the only thing supplied, the requirement will accept any version
@@ -631,6 +619,11 @@
``pkg_resources.require('Report-O-Rama[PDF]')`` to add the necessary
distributions to sys.path at runtime.
+ The "markers" in a requirement are used to specify when a requirement
+ should be installed -- the requirement will be installed if the marker
+ evaluates as true in the current environment. For example, specifying
+ ``argparse;python_version<"2.7"`` will not install in an Python 2.7 or 3.3
+ environment, but will in a Python 2.6 environment.
``Requirement`` Methods and Attributes
--------------------------------------
@@ -680,6 +673,12 @@
order. The `op` in each tuple is a comparison operator, represented as
a string. The `version` is the (unparsed) version number.
+``marker``
+ An instance of ``packaging.markers.Marker`` that allows evaluation
+ against the current environment. May be None if no marker specified.
+
+``url``
+ The location to download the requirement from if specified.
Entry Points
============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/ez_setup.py
new/setuptools-20.3.1/ez_setup.py
--- old/setuptools-20.2.2/ez_setup.py 2016-02-07 15:25:06.000000000 +0100
+++ new/setuptools-20.3.1/ez_setup.py 2016-03-18 15:41:57.000000000 +0100
@@ -192,6 +192,8 @@
def _unload_pkg_resources():
+ sys.meta_path = [importer for importer in sys.meta_path if
+ importer.__class__.__module__ != 'pkg_resources.extern']
del_modules = [
name for name in sys.modules
if name.startswith('pkg_resources')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/pkg_resources/__init__.py
new/setuptools-20.3.1/pkg_resources/__init__.py
--- old/setuptools-20.2.2/pkg_resources/__init__.py 2016-02-25
03:42:28.000000000 +0100
+++ new/setuptools-20.3.1/pkg_resources/__init__.py 2016-03-15
22:07:38.000000000 +0100
@@ -2693,15 +2693,11 @@
reqs = []
# Including any condition expressions
for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
- current_req = packaging.requirements.Requirement(req)
- specs = _parse_requirement_specs(current_req)
- parsed = Requirement(current_req.name, specs, current_req.extras)
- parsed._marker = current_req.marker
- reqs.append(parsed)
+ reqs.extend(parse_requirements(req))
def reqs_for_extra(extra):
for req in reqs:
- if not req._marker or req._marker.evaluate({'extra': extra}):
+ if not req.marker or req.marker.evaluate({'extra': extra}):
yield req
common = frozenset(reqs_for_extra(None))
@@ -2739,10 +2735,6 @@
return ' '.join(self.args)
-def _parse_requirement_specs(req):
- return [(spec.operator, spec.version) for spec in req.specifier]
-
-
def parse_requirements(strs):
"""Yield ``Requirement`` objects for each specification in `strs`
@@ -2759,34 +2751,30 @@
if line.endswith('\\'):
line = line[:-2].strip()
line += next(lines)
- req = packaging.requirements.Requirement(line)
- specs = _parse_requirement_specs(req)
- yield Requirement(req.name, specs, req.extras)
+ yield Requirement(line)
-class Requirement:
- def __init__(self, project_name, specs, extras):
+class Requirement(packaging.requirements.Requirement):
+ def __init__(self, requirement_string):
"""DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
- self.unsafe_name, project_name = project_name, safe_name(project_name)
+ try:
+ super(Requirement, self).__init__(requirement_string)
+ except packaging.requirements.InvalidRequirement as e:
+ raise RequirementParseError(str(e))
+ self.unsafe_name = self.name
+ project_name = safe_name(self.name)
self.project_name, self.key = project_name, project_name.lower()
- self.specifier = packaging.specifiers.SpecifierSet(
- ",".join(["".join([x, y]) for x, y in specs])
- )
- self.specs = specs
- self.extras = tuple(map(safe_extra, extras))
+ self.specs = [
+ (spec.operator, spec.version) for spec in self.specifier]
+ self.extras = tuple(map(safe_extra, self.extras))
self.hashCmp = (
self.key,
self.specifier,
frozenset(self.extras),
+ str(self.marker) if self.marker else None,
)
self.__hash = hash(self.hashCmp)
- def __str__(self):
- extras = ','.join(self.extras)
- if extras:
- extras = '[%s]' % extras
- return '%s%s%s' % (self.project_name, extras, self.specifier)
-
def __eq__(self, other):
return (
isinstance(other, Requirement) and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools-20.2.2/pkg_resources/tests/test_resources.py
new/setuptools-20.3.1/pkg_resources/tests/test_resources.py
--- old/setuptools-20.2.2/pkg_resources/tests/test_resources.py 2016-02-25
14:48:19.000000000 +0100
+++ new/setuptools-20.3.1/pkg_resources/tests/test_resources.py 2016-03-15
22:07:38.000000000 +0100
@@ -353,22 +353,22 @@
r = Requirement.parse("Twisted>=1.2")
assert str(r) == "Twisted>=1.2"
assert repr(r) == "Requirement.parse('Twisted>=1.2')"
- assert r == Requirement("Twisted", [('>=','1.2')], ())
- assert r == Requirement("twisTed", [('>=','1.2')], ())
- assert r != Requirement("Twisted", [('>=','2.0')], ())
- assert r != Requirement("Zope", [('>=','1.2')], ())
- assert r != Requirement("Zope", [('>=','3.0')], ())
- assert r != Requirement.parse("Twisted[extras]>=1.2")
+ assert r == Requirement("Twisted>=1.2")
+ assert r == Requirement("twisTed>=1.2")
+ assert r != Requirement("Twisted>=2.0")
+ assert r != Requirement("Zope>=1.2")
+ assert r != Requirement("Zope>=3.0")
+ assert r != Requirement("Twisted[extras]>=1.2")
def testOrdering(self):
- r1 = Requirement("Twisted", [('==','1.2c1'),('>=','1.2')], ())
- r2 = Requirement("Twisted", [('>=','1.2'),('==','1.2c1')], ())
+ r1 = Requirement("Twisted==1.2c1,>=1.2")
+ r2 = Requirement("Twisted>=1.2,==1.2c1")
assert r1 == r2
assert str(r1) == str(r2)
assert str(r2) == "Twisted==1.2c1,>=1.2"
def testBasicContains(self):
- r = Requirement("Twisted", [('>=','1.2')], ())
+ r = Requirement("Twisted>=1.2")
foo_dist = Distribution.from_filename("FooPkg-1.3_1.egg")
twist11 = Distribution.from_filename("Twisted-1.1.egg")
twist12 = Distribution.from_filename("Twisted-1.2.egg")
@@ -394,6 +394,7 @@
"twisted",
packaging.specifiers.SpecifierSet(">=1.2"),
frozenset(["foo","bar"]),
+ None
))
)
@@ -485,17 +486,17 @@
assert (
list(parse_requirements('Twis-Ted>=1.2-1'))
==
- [Requirement('Twis-Ted',[('>=','1.2-1')], ())]
+ [Requirement('Twis-Ted>=1.2-1')]
)
assert (
list(parse_requirements('Twisted >=1.2, \ # more\n<2.0'))
==
- [Requirement('Twisted',[('>=','1.2'),('<','2.0')], ())]
+ [Requirement('Twisted>=1.2,<2.0')]
)
assert (
Requirement.parse("FooBar==1.99a3")
==
- Requirement("FooBar", [('==','1.99a3')], ())
+ Requirement("FooBar==1.99a3")
)
with pytest.raises(ValueError):
Requirement.parse(">=2.3")
@@ -508,6 +509,28 @@
with pytest.raises(ValueError):
Requirement.parse("#")
+ def test_requirements_with_markers(self):
+ assert (
+ Requirement.parse("foobar;os_name=='a'")
+ ==
+ Requirement.parse("foobar;os_name=='a'")
+ )
+ assert (
+ Requirement.parse("name==1.1;python_version=='2.7'")
+ !=
+ Requirement.parse("name==1.1;python_version=='3.3'")
+ )
+ assert (
+ Requirement.parse("name==1.0;python_version=='2.7'")
+ !=
+ Requirement.parse("name==1.2;python_version=='2.7'")
+ )
+ assert (
+ Requirement.parse("name[foo]==1.0;python_version=='3.3'")
+ !=
+ Requirement.parse("name[foo,bar]==1.0;python_version=='3.3'")
+ )
+
def test_local_version(self):
req, = parse_requirements('foo==1.0.org1')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/setup.cfg
new/setuptools-20.3.1/setup.cfg
--- old/setuptools-20.2.2/setup.cfg 2016-02-27 15:48:30.000000000 +0100
+++ new/setuptools-20.3.1/setup.cfg 2016-03-18 16:14:06.000000000 +0100
@@ -1,7 +1,7 @@
[egg_info]
tag_build =
-tag_svn_revision = 0
tag_date = 0
+tag_svn_revision = 0
[aliases]
release = egg_info -RDb ''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/setuptools/command/easy_install.py
new/setuptools-20.3.1/setuptools/command/easy_install.py
--- old/setuptools-20.2.2/setuptools/command/easy_install.py 2016-02-25
03:42:28.000000000 +0100
+++ new/setuptools-20.3.1/setuptools/command/easy_install.py 2016-03-15
22:07:38.000000000 +0100
@@ -710,10 +710,7 @@
elif requirement is None or dist not in requirement:
# if we wound up with a different version, resolve what we've got
distreq = dist.as_requirement()
- requirement = requirement or distreq
- requirement = Requirement(
- distreq.project_name, distreq.specs, requirement.extras
- )
+ requirement = Requirement(str(distreq))
log.info("Processing dependencies for %s", requirement)
try:
distros = WorkingSet([]).resolve(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/setuptools/tests/test_dist_info.py
new/setuptools-20.3.1/setuptools/tests/test_dist_info.py
--- old/setuptools-20.2.2/setuptools/tests/test_dist_info.py 2016-02-25
03:42:28.000000000 +0100
+++ new/setuptools-20.3.1/setuptools/tests/test_dist_info.py 2016-03-15
22:07:38.000000000 +0100
@@ -34,7 +34,9 @@
for d in pkg_resources.find_distributions(self.tmpdir):
assert d.requires() == requires[:1]
- assert d.requires(extras=('baz',)) == requires
+ assert d.requires(extras=('baz',)) == [
+ requires[0],
+ pkg_resources.Requirement.parse('quux>=1.1;extra=="baz"')]
assert d.extras == ['baz']
metadata_template = DALS("""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/setuptools/version.py
new/setuptools-20.3.1/setuptools/version.py
--- old/setuptools-20.2.2/setuptools/version.py 2016-02-25 04:04:28.000000000
+0100
+++ new/setuptools-20.3.1/setuptools/version.py 2016-03-18 16:13:59.000000000
+0100
@@ -1 +1 @@
-__version__ = '20.2.2'
+__version__ = '20.3.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools-20.2.2/setuptools.egg-info/PKG-INFO
new/setuptools-20.3.1/setuptools.egg-info/PKG-INFO
--- old/setuptools-20.2.2/setuptools.egg-info/PKG-INFO 2016-02-27
15:48:29.000000000 +0100
+++ new/setuptools-20.3.1/setuptools.egg-info/PKG-INFO 2016-03-18
16:14:03.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: setuptools
-Version: 20.2.2
+Version: 20.3.1
Summary: Easily download, build, install, upgrade, and uninstall Python
packages
Home-page: https://bitbucket.org/pypa/setuptools
Author: Python Packaging Authority