Hello community,

here is the log from the commit of package python-pyflakes for openSUSE:Factory 
checked in at 2016-01-20 09:53:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyflakes (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyflakes.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyflakes"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyflakes/python-pyflakes.changes  
2015-11-15 12:46:23.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-pyflakes.new/python-pyflakes.changes     
2016-01-20 09:53:35.000000000 +0100
@@ -1,0 +2,10 @@
+Wed Jan 13 09:57:59 UTC 2016 - [email protected]
+
+- update to version 1.0.0:
+  * Python 3.5 support. async/await statements in particular.
+  * test_api.py works on Windows now
+  * Eliminated a false UnusedImport warning when the name has been
+    declared "global"
+- Implement update-alternatives.
+    
+-------------------------------------------------------------------

Old:
----
  pyflakes-0.9.2.tar.gz

New:
----
  pyflakes-1.0.0.tar.gz

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

Other differences:
------------------
++++++ python-pyflakes.spec ++++++
--- /var/tmp/diff_new_pack.UKFB4s/_old  2016-01-20 09:53:36.000000000 +0100
+++ /var/tmp/diff_new_pack.UKFB4s/_new  2016-01-20 09:53:36.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyflakes
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python-pyflakes
-Version:        0.9.2
+Version:        1.0.0
 Release:        0
 Url:            https://launchpad.net/pyflakes
 Summary:        Passive checker of Python programs
@@ -29,13 +29,13 @@
 BuildRequires:  python-setuptools
 # the pkg_resources module is required at runtime
 Requires:       python-setuptools
-%if 0%{?suse_version}
-%py_requires
-%if 0%{?suse_version} > 1110
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
+%if 0%{?suse_version} <= 1110
+%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%else
 BuildArch:      noarch
 %endif
-%endif
-%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 %description
 Pyflakes is program to analyze Python programs and detect various errors. It
@@ -51,11 +51,29 @@
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
 
+# Prepare for update-alternatives usage
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{py_ver}
+ln -s -f %{_sysconfdir}/alternatives/pyflakes %{buildroot}%{_bindir}/pyflakes
+# create a dummy target for /etc/alternatives/pyflakes
+touch %{buildroot}%{_sysconfdir}/alternatives/pyflakes
+
+%post
+"%_sbindir/update-alternatives" \
+   --install %{_bindir}/pyflakes pyflakes %{_bindir}/pyflakes-%{py_ver} 30
+
+%postun
+if [ $1 -eq 0 ] ; then
+    "%_sbindir/update-alternatives" --remove pyflakes 
%{_bindir}/pyflakes-%{py_ver}
+fi
+
 %files
 %defattr(-,root,root,-)
 %doc LICENSE NEWS.txt README.rst AUTHORS
+%{_bindir}/pyflakes
+%{_bindir}/pyflakes-%{py_ver}
+%ghost %{_sysconfdir}/alternatives/pyflakes
 %{python_sitelib}/pyflakes/
 %{python_sitelib}/pyflakes-%{version}-py*.egg-info
-%{_bindir}/pyflakes
 
 %changelog

++++++ pyflakes-0.9.2.tar.gz -> pyflakes-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/PKG-INFO new/pyflakes-1.0.0/PKG-INFO
--- old/pyflakes-0.9.2/PKG-INFO 2015-06-17 12:22:13.000000000 +0200
+++ new/pyflakes-1.0.0/PKG-INFO 2015-09-20 18:00:22.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyflakes
-Version: 0.9.2
+Version: 1.0.0
 Summary: passive checker of Python programs
 Home-page: https://github.com/pyflakes/pyflakes
 Author: A lot of people
@@ -17,7 +17,7 @@
         modules with side effects.  It's also much faster.
         
         It is `available on PyPI <https://pypi.python.org/pypi/pyflakes>`_
-        and it supports all active versions of Python from 2.5 to 3.4.
+        and it supports all active versions of Python from 2.5 to 3.5.
         
         
         
@@ -71,10 +71,6 @@
            :target: https://travis-ci.org/pyflakes/pyflakes
            :alt: Build status
         
-        .. image:: https://pypip.in/wheel/pyflakes/badge.png
-           :target: https://pypi.python.org/pypi/pyflakes
-           :alt: Wheel Status
-        
         .. _Pylint: http://www.pylint.org/
         .. _flake8: https://pypi.python.org/pypi/flake8
         .. _`PEP 8`: http://legacy.python.org/dev/peps/pep-0008/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/README.rst 
new/pyflakes-1.0.0/README.rst
--- old/pyflakes-0.9.2/README.rst       2014-10-29 15:41:06.000000000 +0100
+++ new/pyflakes-1.0.0/README.rst       2015-09-20 17:30:29.000000000 +0200
@@ -9,7 +9,7 @@
 modules with side effects.  It's also much faster.
 
 It is `available on PyPI <https://pypi.python.org/pypi/pyflakes>`_
-and it supports all active versions of Python from 2.5 to 3.4.
+and it supports all active versions of Python from 2.5 to 3.5.
 
 
 
@@ -63,10 +63,6 @@
    :target: https://travis-ci.org/pyflakes/pyflakes
    :alt: Build status
 
-.. image:: https://pypip.in/wheel/pyflakes/badge.png
-   :target: https://pypi.python.org/pypi/pyflakes
-   :alt: Wheel Status
-
 .. _Pylint: http://www.pylint.org/
 .. _flake8: https://pypi.python.org/pypi/flake8
 .. _`PEP 8`: http://legacy.python.org/dev/peps/pep-0008/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/pyflakes/__init__.py 
new/pyflakes-1.0.0/pyflakes/__init__.py
--- old/pyflakes-0.9.2/pyflakes/__init__.py     2015-06-17 12:18:24.000000000 
+0200
+++ new/pyflakes-1.0.0/pyflakes/__init__.py     2015-09-20 17:27:36.000000000 
+0200
@@ -1 +1 @@
-__version__ = '0.9.2'
+__version__ = '1.0.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/pyflakes/checker.py 
new/pyflakes-1.0.0/pyflakes/checker.py
--- old/pyflakes-0.9.2/pyflakes/checker.py      2015-06-17 12:17:45.000000000 
+0200
+++ new/pyflakes-1.0.0/pyflakes/checker.py      2015-09-01 14:50:46.000000000 
+0200
@@ -448,6 +448,10 @@
             elif isinstance(existing, Importation) and 
value.redefines(existing):
                 existing.redefined.append(node)
 
+        if value.name in self.scope:
+            # then assume the rebound name is used as a global or within a loop
+            value.used = self.scope[value.name].used
+
         self.scope[value.name] = value
 
     def getNodeHandler(self, node_class):
@@ -526,8 +530,6 @@
             binding = ExportBinding(name, node.parent, self.scope)
         else:
             binding = Assignment(name, node)
-        if name in self.scope:
-            binding.used = self.scope[name].used
         self.addBinding(node, binding)
 
     def handleNodeDelete(self, node):
@@ -648,8 +650,9 @@
         pass
 
     # "stmt" type nodes
-    DELETE = PRINT = FOR = WHILE = IF = WITH = WITHITEM = RAISE = \
-        TRYFINALLY = ASSERT = EXEC = EXPR = ASSIGN = handleChildren
+    DELETE = PRINT = FOR = ASYNCFOR = WHILE = IF = WITH = WITHITEM = \
+        ASYNCWITH = ASYNCWITHITEM = RAISE = TRYFINALLY = ASSERT = EXEC = \
+        EXPR = ASSIGN = handleChildren
 
     CONTINUE = BREAK = PASS = ignore
 
@@ -751,7 +754,7 @@
         self.scope.isGenerator = True
         self.handleNode(node.value, node)
 
-    YIELDFROM = YIELD
+    AWAIT = YIELDFROM = YIELD
 
     def FUNCTIONDEF(self, node):
         for deco in node.decorator_list:
@@ -761,6 +764,8 @@
         if self.withDoctest:
             self.deferFunction(lambda: self.handleDoctests(node))
 
+    ASYNCFUNCTIONDEF = FUNCTIONDEF
+
     def LAMBDA(self, node):
         args = []
         annotations = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/pyflakes/test/test_api.py 
new/pyflakes-1.0.0/pyflakes/test/test_api.py
--- old/pyflakes-0.9.2/pyflakes/test/test_api.py        2015-04-17 
13:41:05.000000000 +0200
+++ new/pyflakes-1.0.0/pyflakes/test/test_api.py        2015-09-20 
17:02:30.000000000 +0200
@@ -15,7 +15,7 @@
     checkRecursive,
     iterSourceCode,
 )
-from pyflakes.test.harness import TestCase
+from pyflakes.test.harness import TestCase, skipIf
 
 if sys.version_info < (3,):
     from cStringIO import StringIO
@@ -385,12 +385,18 @@
         sourcePath = self.makeTempFile(source)
         last_line = '            ^\n' if sys.version_info >= (3, 2) else ''
         column = '13:' if sys.version_info >= (3, 2) else ''
+
+        if sys.version_info >= (3, 5):
+            message = 'positional argument follows keyword argument'
+        else:
+            message = 'non-keyword arg after keyword arg'
+
         self.assertHasErrors(
             sourcePath,
             ["""\
-%s:1:%s non-keyword arg after keyword arg
+%s:1:%s %s
 foo(bar=baz, bax)
-%s""" % (sourcePath, column, last_line)])
+%s""" % (sourcePath, column, message, last_line)])
 
     def test_invalidEscape(self):
         """
@@ -413,6 +419,7 @@
         self.assertHasErrors(
             sourcePath, [decoding_error])
 
+    @skipIf(sys.platform == 'win32', 'unsupported on Windows')
     def test_permissionDenied(self):
         """
         If the source file is not readable, this is reported on standard
@@ -577,7 +584,7 @@
         fd.close()
         d = self.runPyflakes([self.tempfilepath])
         expected = UnusedImport(self.tempfilepath, Node(1), 'contraband')
-        self.assertEqual(d, ("%s\n" % expected, '', 1))
+        self.assertEqual(d, ("%s%s" % (expected, os.linesep), '', 1))
 
     def test_errors(self):
         """
@@ -586,7 +593,8 @@
         printed to stderr.
         """
         d = self.runPyflakes([self.tempfilepath])
-        error_msg = '%s: No such file or directory\n' % (self.tempfilepath,)
+        error_msg = '%s: No such file or directory%s' % (self.tempfilepath,
+                                                         os.linesep)
         self.assertEqual(d, ('', error_msg, 1))
 
     def test_readFromStdin(self):
@@ -595,4 +603,4 @@
         """
         d = self.runPyflakes([], stdin='import contraband'.encode('ascii'))
         expected = UnusedImport('<stdin>', Node(1), 'contraband')
-        self.assertEqual(d, ("%s\n" % expected, '', 1))
+        self.assertEqual(d, ("%s%s" % (expected, os.linesep), '', 1))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/pyflakes/test/test_imports.py 
new/pyflakes-1.0.0/pyflakes/test/test_imports.py
--- old/pyflakes-0.9.2/pyflakes/test/test_imports.py    2015-05-31 
16:15:41.000000000 +0200
+++ new/pyflakes-1.0.0/pyflakes/test/test_imports.py    2015-09-01 
14:50:46.000000000 +0200
@@ -525,6 +525,16 @@
             def g(): foo.is_used()
         ''')
 
+    def test_assignedToGlobal(self):
+        """
+        Binding an import to a declared global should not cause it to be
+        reported as unused.
+        """
+        self.flakes('''
+            def f(): global foo; import foo
+            def g(): foo.is_used()
+        ''')
+
     @skipIf(version_info >= (3,), 'deprecated syntax')
     def test_usedInBackquote(self):
         self.flakes('import fu; `fu`')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/pyflakes/test/test_other.py 
new/pyflakes-1.0.0/pyflakes/test/test_other.py
--- old/pyflakes-0.9.2/pyflakes/test/test_other.py      2015-06-17 
12:15:46.000000000 +0200
+++ new/pyflakes-1.0.0/pyflakes/test/test_other.py      2015-08-27 
04:07:35.000000000 +0200
@@ -523,6 +523,30 @@
                 return
         ''', m.UnusedVariable)
 
+    @skip("todo: Difficult because it does't apply in the context of a loop")
+    def test_unusedReassignedVariable(self):
+        """
+        Shadowing a used variable can still raise an UnusedVariable warning.
+        """
+        self.flakes('''
+        def a():
+            b = 1
+            b.foo()
+            b = 2
+        ''', m.UnusedVariable)
+
+    def test_variableUsedInLoop(self):
+        """
+        Shadowing a used variable cannot raise an UnusedVariable warning in the
+        context of a loop.
+        """
+        self.flakes('''
+        def a():
+            b = True
+            while b:
+                b = False
+        ''')
+
     def test_assignToGlobal(self):
         """
         Assigning to a global and then not using that global is perfectly
@@ -964,3 +988,55 @@
     def test_returnOnly(self):
         """Do not crash on lone "return"."""
         self.flakes('return 2')
+
+
+class TestAsyncStatements(TestCase):
+
+    @skipIf(version_info < (3, 5), 'new in Python 3.5')
+    def test_asyncDef(self):
+        self.flakes('''
+        async def bar():
+            return 42
+        ''')
+
+    @skipIf(version_info < (3, 5), 'new in Python 3.5')
+    def test_asyncDefAwait(self):
+        self.flakes('''
+        async def read_data(db):
+            await db.fetch('SELECT ...')
+        ''')
+
+    @skipIf(version_info < (3, 5), 'new in Python 3.5')
+    def test_asyncDefUndefined(self):
+        self.flakes('''
+        async def bar():
+            return foo()
+        ''', m.UndefinedName)
+
+    @skipIf(version_info < (3, 5), 'new in Python 3.5')
+    def test_asyncFor(self):
+        self.flakes('''
+        async def read_data(db):
+            output = []
+            async for row in db.cursor():
+                output.append(row)
+            return output
+        ''')
+
+    @skipIf(version_info < (3, 5), 'new in Python 3.5')
+    def test_asyncWith(self):
+        self.flakes('''
+        async def commit(session, data):
+            async with session.transaction():
+                await session.update(data)
+        ''')
+
+    @skipIf(version_info < (3, 5), 'new in Python 3.5')
+    def test_asyncWithItem(self):
+        self.flakes('''
+        async def commit(session, data):
+            async with session.transaction() as trans:
+                await trans.begin()
+                ...
+                await trans.end()
+        ''')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/pyflakes.egg-info/PKG-INFO 
new/pyflakes-1.0.0/pyflakes.egg-info/PKG-INFO
--- old/pyflakes-0.9.2/pyflakes.egg-info/PKG-INFO       2015-06-17 
12:22:13.000000000 +0200
+++ new/pyflakes-1.0.0/pyflakes.egg-info/PKG-INFO       2015-09-20 
18:00:22.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyflakes
-Version: 0.9.2
+Version: 1.0.0
 Summary: passive checker of Python programs
 Home-page: https://github.com/pyflakes/pyflakes
 Author: A lot of people
@@ -17,7 +17,7 @@
         modules with side effects.  It's also much faster.
         
         It is `available on PyPI <https://pypi.python.org/pypi/pyflakes>`_
-        and it supports all active versions of Python from 2.5 to 3.4.
+        and it supports all active versions of Python from 2.5 to 3.5.
         
         
         
@@ -71,10 +71,6 @@
            :target: https://travis-ci.org/pyflakes/pyflakes
            :alt: Build status
         
-        .. image:: https://pypip.in/wheel/pyflakes/badge.png
-           :target: https://pypi.python.org/pypi/pyflakes
-           :alt: Wheel Status
-        
         .. _Pylint: http://www.pylint.org/
         .. _flake8: https://pypi.python.org/pypi/flake8
         .. _`PEP 8`: http://legacy.python.org/dev/peps/pep-0008/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/pyflakes.egg-info/SOURCES.txt 
new/pyflakes-1.0.0/pyflakes.egg-info/SOURCES.txt
--- old/pyflakes-0.9.2/pyflakes.egg-info/SOURCES.txt    2015-06-17 
12:22:13.000000000 +0200
+++ new/pyflakes-1.0.0/pyflakes.egg-info/SOURCES.txt    2015-09-20 
18:00:22.000000000 +0200
@@ -16,6 +16,7 @@
 pyflakes.egg-info/SOURCES.txt
 pyflakes.egg-info/dependency_links.txt
 pyflakes.egg-info/entry_points.txt
+pyflakes.egg-info/pbr.json
 pyflakes.egg-info/top_level.txt
 pyflakes/scripts/__init__.py
 pyflakes/scripts/pyflakes.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyflakes-0.9.2/pyflakes.egg-info/pbr.json 
new/pyflakes-1.0.0/pyflakes.egg-info/pbr.json
--- old/pyflakes-0.9.2/pyflakes.egg-info/pbr.json       1970-01-01 
01:00:00.000000000 +0100
+++ new/pyflakes-1.0.0/pyflakes.egg-info/pbr.json       2015-09-20 
18:00:22.000000000 +0200
@@ -0,0 +1 @@
+{"is_release": true, "git_version": "e1da183"}
\ No newline at end of file


Reply via email to