Hello community,
here is the log from the commit of package python-positional for openSUSE:Factory checked in at 2016-09-24 15:28:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-positional (Old)
and /work/SRC/openSUSE:Factory/.python-positional.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-positional"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-positional/python-positional.changes 2016-03-07 13:24:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-positional.new/python-positional.changes 2016-09-24 15:29:08.000000000 +0200
@@ -1,0 +2,8 @@
+Wed Sep 21 14:09:37 UTC 2016 - dmueller@suse.com
+
+- update to 1.1.1:
+ * Update requirements.txt for pbr versions to match
+ * Fix the python3 demo in README
+- update requires
+
+-------------------------------------------------------------------
Old:
----
positional-1.0.1.tar.gz
New:
----
positional-1.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-positional.spec ++++++
--- /var/tmp/diff_new_pack.7Zxm6N/_old 2016-09-24 15:29:09.000000000 +0200
+++ /var/tmp/diff_new_pack.7Zxm6N/_new 2016-09-24 15:29:09.000000000 +0200
@@ -17,16 +17,17 @@
Name: python-positional
-Version: 1.0.1
+Version: 1.1.1
Release: 0
Summary: Library to enforce positional or key-word arguments
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/morganfainberg/positional
-Source: https://pypi.python.org/packages/source/p/positional/positional-%{version}.tar.gz
+Source: https://pypi.io/packages/source/p/positional/positional-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-pbr
BuildRequires: python-setuptools
+Requires: python-wrapt
BuildArch: noarch
%description
++++++ positional-1.0.1.tar.gz -> positional-1.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/AUTHORS new/positional-1.1.1/AUTHORS
--- old/positional-1.0.1/AUTHORS 2016-01-17 21:51:01.000000000 +0100
+++ new/positional-1.1.1/AUTHORS 2016-06-26 23:08:37.000000000 +0200
@@ -1,2 +1,4 @@
+Brant Knudson
+Felix Yan
Jamie Lennox
Morgan Fainberg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/ChangeLog new/positional-1.1.1/ChangeLog
--- old/positional-1.0.1/ChangeLog 2016-01-17 21:51:01.000000000 +0100
+++ new/positional-1.1.1/ChangeLog 2016-06-26 23:08:37.000000000 +0200
@@ -1,6 +1,17 @@
CHANGES
=======
+1.1.1
+-----
+
+* Update requirements.txt for pbr versions to match
+* Fix the python3 demo in README
+
+1.1.0
+-----
+
+* Fix to preserve argspec
+
1.0.1
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/PKG-INFO new/positional-1.1.1/PKG-INFO
--- old/positional-1.0.1/PKG-INFO 2016-01-17 21:51:02.000000000 +0100
+++ new/positional-1.1.1/PKG-INFO 2016-06-26 23:08:37.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: positional
-Version: 1.0.1
+Version: 1.1.1
Summary: Library to enforce positional or key-word arguments
Home-page: https://github.com/morganfainberg/positional
Author: Morgan Fainberg
@@ -30,7 +30,7 @@
.. code:: python
- >>> def fn(pos1, *, kwonly1 kwonly=None):
+ >>> def fn(pos1, *, kwonly1, kwonly2=None):
... ...
All named parameters after `*` must be a keyword:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/README.rst new/positional-1.1.1/README.rst
--- old/positional-1.0.1/README.rst 2016-01-14 02:37:11.000000000 +0100
+++ new/positional-1.1.1/README.rst 2016-06-26 23:03:29.000000000 +0200
@@ -22,7 +22,7 @@
.. code:: python
- >>> def fn(pos1, *, kwonly1 kwonly=None):
+ >>> def fn(pos1, *, kwonly1, kwonly2=None):
... ...
All named parameters after `*` must be a keyword:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/positional/__init__.py new/positional-1.1.1/positional/__init__.py
--- old/positional-1.0.1/positional/__init__.py 2016-01-17 21:45:35.000000000 +0100
+++ new/positional-1.1.1/positional/__init__.py 2016-06-26 23:03:29.000000000 +0200
@@ -10,11 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-import functools
import inspect
import warnings
import pbr.version
+import wrapt
__version__ = pbr.version.VersionInfo('positional').version_string()
@@ -76,14 +76,21 @@
plural = '' if self._max_positional_args == 1 else 's'
- @functools.wraps(func)
- def inner(*args, **kwargs):
- if len(args) > self._max_positional_args:
+ @wrapt.decorator
+ def inner(wrapped, instance, args, kwargs):
+
+ # If called on an instance, adjust args len for the 'self'
+ # parameter.
+ args_len = len(args)
+ if instance:
+ args_len += 1
+
+ if args_len > self._max_positional_args:
message = ('%(name)s takes at most %(max)d positional '
'argument%(plural)s (%(given)d given)' %
- {'name': func.__name__,
+ {'name': wrapped.__name__,
'max': self._max_positional_args,
- 'given': len(args),
+ 'given': args_len,
'plural': plural})
if self._enforcement == self.EXCEPT:
@@ -91,6 +98,6 @@
elif self._enforcement == self.WARN:
warnings.warn(message, DeprecationWarning, stacklevel=2)
- return func(*args, **kwargs)
+ return wrapped(*args, **kwargs)
- return inner
+ return inner(func)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/positional/tests/test_positional.py new/positional-1.1.1/positional/tests/test_positional.py
--- old/positional-1.0.1/positional/tests/test_positional.py 2016-01-14 02:37:11.000000000 +0100
+++ new/positional-1.1.1/positional/tests/test_positional.py 2016-06-26 23:03:29.000000000 +0200
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import inspect
import warnings
import testtools
@@ -81,3 +82,15 @@
def test_normal_method(self):
self.assertEqual((self, 1, 2), self.normal_method(1, b=2))
self.assertRaises(TypeError, self.normal_method, 1, 2)
+
+ def test_argspec_preserved(self):
+
+ @positional()
+ def f_wrapped(my_arg=False):
+ return my_arg
+
+ def f_not_wrapped(my_arg=False):
+ return my_arg
+
+ self.assertEqual(inspect.getargspec(f_not_wrapped),
+ inspect.getargspec(f_wrapped))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/positional.egg-info/PKG-INFO new/positional-1.1.1/positional.egg-info/PKG-INFO
--- old/positional-1.0.1/positional.egg-info/PKG-INFO 2016-01-17 21:51:01.000000000 +0100
+++ new/positional-1.1.1/positional.egg-info/PKG-INFO 2016-06-26 23:08:37.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: positional
-Version: 1.0.1
+Version: 1.1.1
Summary: Library to enforce positional or key-word arguments
Home-page: https://github.com/morganfainberg/positional
Author: Morgan Fainberg
@@ -30,7 +30,7 @@
.. code:: python
- >>> def fn(pos1, *, kwonly1 kwonly=None):
+ >>> def fn(pos1, *, kwonly1, kwonly2=None):
... ...
All named parameters after `*` must be a keyword:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/positional.egg-info/pbr.json new/positional-1.1.1/positional.egg-info/pbr.json
--- old/positional-1.0.1/positional.egg-info/pbr.json 2016-01-17 21:51:01.000000000 +0100
+++ new/positional-1.1.1/positional.egg-info/pbr.json 2016-06-26 23:08:37.000000000 +0200
@@ -1 +1 @@
-{"is_release": true, "git_version": "3c3f08b"}
\ No newline at end of file
+{"is_release": true, "git_version": "1f5e9fc"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/positional.egg-info/requires.txt new/positional-1.1.1/positional.egg-info/requires.txt
--- old/positional-1.0.1/positional.egg-info/requires.txt 2016-01-17 21:51:01.000000000 +0100
+++ new/positional-1.1.1/positional.egg-info/requires.txt 2016-06-26 23:08:37.000000000 +0200
@@ -1 +1,2 @@
-pbr>=1.6
+pbr>=1.8
+wrapt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/positional-1.0.1/requirements.txt new/positional-1.1.1/requirements.txt
--- old/positional-1.0.1/requirements.txt 2016-01-14 02:37:11.000000000 +0100
+++ new/positional-1.1.1/requirements.txt 2016-06-26 23:03:29.000000000 +0200
@@ -1,4 +1,5 @@
# The order of packages is significant, because pip processes them in the order
# of appearance.
-pbr>=1.6
+pbr>=1.8
+wrapt