Hello community,
here is the log from the commit of package python-pyflakes for openSUSE:Factory checked in at 2019-03-04 09:11:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyflakes (Old)
and /work/SRC/openSUSE:Factory/.python-pyflakes.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyflakes"
Mon Mar 4 09:11:46 2019 rev:24 rq:680749 version:2.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyflakes/python-pyflakes.changes 2019-02-02 21:45:13.564189915 +0100
+++ /work/SRC/openSUSE:Factory/.python-pyflakes.new.28833/python-pyflakes.changes 2019-03-04 09:11:49.072693373 +0100
@@ -1,0 +2,7 @@
+Sat Mar 2 04:51:41 UTC 2019 - Arun Persaud
+
+- update to version 2.1.1:
+ * Fix reported line number for type comment errors
+ * Fix typing.overload check to only check imported names
+
+-------------------------------------------------------------------
Old:
----
pyflakes-2.1.0.tar.gz
New:
----
pyflakes-2.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pyflakes.spec ++++++
--- /var/tmp/diff_new_pack.DGQxDR/_old 2019-03-04 09:11:50.348693144 +0100
+++ /var/tmp/diff_new_pack.DGQxDR/_new 2019-03-04 09:11:50.352693143 +0100
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-pyflakes
-Version: 2.1.0
+Version: 2.1.1
Release: 0
Summary: Passive checker of Python programs
License: MIT
++++++ pyflakes-2.1.0.tar.gz -> pyflakes-2.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyflakes-2.1.0/NEWS.rst new/pyflakes-2.1.1/NEWS.rst
--- old/pyflakes-2.1.0/NEWS.rst 2019-01-24 04:14:48.000000000 +0100
+++ new/pyflakes-2.1.1/NEWS.rst 2019-02-28 20:18:26.000000000 +0100
@@ -1,3 +1,7 @@
+2.1.1 (2019-02-28)
+- Fix reported line number for type comment errors
+- Fix typing.overload check to only check imported names
+
2.1.0 (2019-01-23)
- Allow intentional assignment to variables named ``_``
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyflakes-2.1.0/PKG-INFO new/pyflakes-2.1.1/PKG-INFO
--- old/pyflakes-2.1.0/PKG-INFO 2019-01-24 04:14:55.000000000 +0100
+++ new/pyflakes-2.1.1/PKG-INFO 2019-02-28 20:25:22.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.2
Name: pyflakes
-Version: 2.1.0
+Version: 2.1.1
Summary: passive checker of Python programs
Home-page: https://github.com/PyCQA/pyflakes
Author: A lot of people
Author-email: code-quality@python.org
License: MIT
-Description-Content-Type: UNKNOWN
Description: ========
Pyflakes
========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyflakes-2.1.0/pyflakes/__init__.py new/pyflakes-2.1.1/pyflakes/__init__.py
--- old/pyflakes-2.1.0/pyflakes/__init__.py 2019-01-24 04:14:48.000000000 +0100
+++ new/pyflakes-2.1.1/pyflakes/__init__.py 2019-02-28 20:15:13.000000000 +0100
@@ -1 +1 @@
-__version__ = '2.1.0'
+__version__ = '2.1.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyflakes-2.1.0/pyflakes/checker.py new/pyflakes-2.1.1/pyflakes/checker.py
--- old/pyflakes-2.1.0/pyflakes/checker.py 2019-01-24 04:08:51.000000000 +0100
+++ new/pyflakes-2.1.1/pyflakes/checker.py 2019-02-28 20:10:37.000000000 +0100
@@ -507,6 +507,13 @@
"""Scope for a doctest."""
+class DummyNode(object):
+ """Used in place of an `ast.AST` to set error message positions"""
+ def __init__(self, lineno, col_offset):
+ self.lineno = lineno
+ self.col_offset = col_offset
+
+
# Globally defined names which are not attributes of the builtins module, or
# are only present on some platforms.
_MAGIC_GLOBALS = ['__file__', '__builtins__', 'WindowsError']
@@ -529,6 +536,7 @@
(
isinstance(node, ast.Name) and
node.id in scope and
+ isinstance(scope[node.id], ImportationFrom) and
scope[node.id].fullName == 'typing.overload'
) or (
isinstance(node, ast.Attribute) and
@@ -1055,7 +1063,7 @@
part = part.replace('...', 'Ellipsis')
self.deferFunction(functools.partial(
self.handleStringAnnotation,
- part, node, lineno, col_offset,
+ part, DummyNode(lineno, col_offset), lineno, col_offset,
messages.CommentAnnotationSyntaxError,
))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyflakes-2.1.0/pyflakes/test/test_type_annotations.py new/pyflakes-2.1.1/pyflakes/test/test_type_annotations.py
--- old/pyflakes-2.1.0/pyflakes/test/test_type_annotations.py 2019-01-24 04:08:51.000000000 +0100
+++ new/pyflakes-2.1.1/pyflakes/test/test_type_annotations.py 2019-02-28 20:10:37.000000000 +0100
@@ -39,6 +39,28 @@
return s
""")
+ def test_not_a_typing_overload(self):
+ """regression test for @typing.overload detection bug in 2.1.0"""
+ self.flakes("""
+ x = lambda f: f
+
+ @x
+ def t():
+ pass
+
+ y = lambda f: f
+
+ @x
+ @y
+ def t():
+ pass
+
+ @x
+ @y
+ def t():
+ pass
+ """, m.RedefinedWhileUnused, m.RedefinedWhileUnused)
+
@skipIf(version_info < (3, 6), 'new in Python 3.6')
def test_variable_annotations(self):
self.flakes('''
@@ -275,6 +297,13 @@
pass
""", m.CommentAnnotationSyntaxError)
+ def test_typeCommentsSyntaxErrorCorrectLine(self):
+ checker = self.flakes("""\
+ x = 1
+ # type: definitely not a PEP 484 comment
+ """, m.CommentAnnotationSyntaxError)
+ self.assertEqual(checker.messages[0].lineno, 2)
+
def test_typeCommentsAssignedToPreviousNode(self):
# This test demonstrates an issue in the implementation which
# associates the type comment with a node above it, however the type
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyflakes-2.1.0/pyflakes.egg-info/PKG-INFO new/pyflakes-2.1.1/pyflakes.egg-info/PKG-INFO
--- old/pyflakes-2.1.0/pyflakes.egg-info/PKG-INFO 2019-01-24 04:14:55.000000000 +0100
+++ new/pyflakes-2.1.1/pyflakes.egg-info/PKG-INFO 2019-02-28 20:25:22.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.2
Name: pyflakes
-Version: 2.1.0
+Version: 2.1.1
Summary: passive checker of Python programs
Home-page: https://github.com/PyCQA/pyflakes
Author: A lot of people
Author-email: code-quality@python.org
License: MIT
-Description-Content-Type: UNKNOWN
Description: ========
Pyflakes
========