[Python-apps-commits] r10708 - in packages/pyflakes/trunk/debian (4 files)
barry at users.alioth.debian.org
barry at users.alioth.debian.org
Fri Mar 28 15:16:45 UTC 2014
Date: Friday, March 28, 2014 @ 15:16:44
Author: barry
Revision: 10708
* New upstream release.
* d/patches/patch 0.7.3-17-gecd6eca.patch: Removed, applied upstream.
* d/control: Bump Standards-Version with no other changes needed.
Modified:
packages/pyflakes/trunk/debian/changelog
packages/pyflakes/trunk/debian/control
packages/pyflakes/trunk/debian/patches/series
Deleted:
packages/pyflakes/trunk/debian/patches/0.7.3-17-gecd6eca.patch
Modified: packages/pyflakes/trunk/debian/changelog
===================================================================
--- packages/pyflakes/trunk/debian/changelog 2014-03-28 14:16:35 UTC (rev 10707)
+++ packages/pyflakes/trunk/debian/changelog 2014-03-28 15:16:44 UTC (rev 10708)
@@ -1,3 +1,11 @@
+pyflakes (0.8-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+ * d/patches/patch 0.7.3-17-gecd6eca.patch: Removed, applied upstream.
+ * d/control: Bump Standards-Version with no other changes needed.
+
+ -- Barry Warsaw <barry at debian.org> Fri, 28 Mar 2014 10:58:46 -0400
+
pyflakes (0.7.3-2) unstable; urgency=medium
* Cherry-pick 17 upstream commits since 0.7.3, to add python 3.4
Modified: packages/pyflakes/trunk/debian/control
===================================================================
--- packages/pyflakes/trunk/debian/control 2014-03-28 14:16:35 UTC (rev 10707)
+++ packages/pyflakes/trunk/debian/control 2014-03-28 15:16:44 UTC (rev 10708)
@@ -15,7 +15,7 @@
python3-setuptools
X-Python-Version: >= 2.6
X-Python3-Version: >= 3.2
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
Homepage: https://launchpad.net/pyflakes
Vcs-Svn: svn://anonscm.debian.org/python-apps/packages/pyflakes/trunk/
Vcs-Browser: http://anonscm.debian.org/viewvc/python-apps/packages/pyflakes/trunk/
Deleted: packages/pyflakes/trunk/debian/patches/0.7.3-17-gecd6eca.patch
===================================================================
--- packages/pyflakes/trunk/debian/patches/0.7.3-17-gecd6eca.patch 2014-03-28 14:16:35 UTC (rev 10707)
+++ packages/pyflakes/trunk/debian/patches/0.7.3-17-gecd6eca.patch 2014-03-28 15:16:44 UTC (rev 10708)
@@ -1,277 +0,0 @@
---- a/LICENSE
-+++ b/LICENSE
-@@ -1,5 +1,5 @@
- Copyright 2005-2011 Divmod, Inc.
--Copyright 2013 Florent Xicluna
-+Copyright 2013-2014 Florent Xicluna
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
---- a/NEWS.txt
-+++ b/NEWS.txt
-@@ -1,3 +1,9 @@
-+UNRELEASED:
-+ - Adapt for the AST in Python 3.4.
-+ - Fix caret position on SyntaxError.
-+ - Fix crash on Python 2.x with some doctest SyntaxError.
-+ - Add tox.ini.
-+
- 0.7.3 (2013-07-02):
- - Do not report undefined name for generator expression and dict or
- set comprehension at class level.
---- a/README.rst
-+++ b/README.rst
-@@ -9,7 +9,7 @@
- modules with side effects. It's also much faster.
-
- It is `available on PyPI <http://pypi.python.org/pypi/pyflakes>`_
--and it supports all active versions of Python from 2.5 to 3.3.
-+and it supports all active versions of Python from 2.5 to 3.4.
-
-
- Installation
---- a/pyflakes/checker.py
-+++ b/pyflakes/checker.py
-@@ -7,12 +7,14 @@
- import doctest
- import os
- import sys
--try:
-- builtin_vars = dir(__import__('builtins'))
-- PY2 = False
--except ImportError:
-- builtin_vars = dir(__import__('__builtin__'))
-+
-+if sys.version_info < (3, 0):
- PY2 = True
-+ builtin_vars = dir(__import__('__builtin__'))
-+else:
-+ PY2 = False
-+ builtin_vars = dir(__import__('builtins'))
-+PY33 = sys.version_info < (3, 4) # Python 2.5 to 3.3
-
- try:
- import ast
-@@ -578,7 +580,7 @@
- except SyntaxError:
- e = sys.exc_info()[1]
- position = (node_lineno + example.lineno + e.lineno,
-- example.indent + 4 + e.offset)
-+ example.indent + 4 + (e.offset or 0))
- self.report(messages.DoctestSyntaxError, node, position)
- else:
- self.offset = (node_offset[0] + node_lineno + example.lineno,
-@@ -599,7 +601,7 @@
- # "expr" type nodes
- BOOLOP = BINOP = UNARYOP = IFEXP = DICT = SET = YIELD = YIELDFROM = \
- COMPARE = CALL = REPR = ATTRIBUTE = SUBSCRIPT = LIST = TUPLE = \
-- STARRED = handleChildren
-+ STARRED = NAMECONSTANT = handleChildren
-
- NUM = STR = BYTES = ELLIPSIS = ignore
-
-@@ -705,6 +707,7 @@
-
- def LAMBDA(self, node):
- args = []
-+ annotations = []
-
- if PY2:
- def addArgs(arglist):
-@@ -712,34 +715,41 @@
- if isinstance(arg, ast.Tuple):
- addArgs(arg.elts)
- else:
-- if arg.id in args:
-- self.report(messages.DuplicateArgument,
-- node, arg.id)
- args.append(arg.id)
- addArgs(node.args.args)
- defaults = node.args.defaults
- else:
- for arg in node.args.args + node.args.kwonlyargs:
-- if arg.arg in args:
-- self.report(messages.DuplicateArgument,
-- node, arg.arg)
- args.append(arg.arg)
-- self.handleNode(arg.annotation, node)
-- if hasattr(node, 'returns'): # Only for FunctionDefs
-- for annotation in (node.args.varargannotation,
-- node.args.kwargannotation, node.returns):
-- self.handleNode(annotation, node)
-+ annotations.append(arg.annotation)
- defaults = node.args.defaults + node.args.kw_defaults
-
-- # vararg/kwarg identifiers are not Name nodes
-- for wildcard in (node.args.vararg, node.args.kwarg):
-+ # Only for Python3 FunctionDefs
-+ is_py3_func = hasattr(node, 'returns')
-+
-+ for arg_name in ('vararg', 'kwarg'):
-+ wildcard = getattr(node.args, arg_name)
- if not wildcard:
- continue
-- if wildcard in args:
-- self.report(messages.DuplicateArgument, node, wildcard)
-- args.append(wildcard)
-- for default in defaults:
-- self.handleNode(default, node)
-+ args.append(wildcard if PY33 else wildcard.arg)
-+ if is_py3_func:
-+ if PY33: # Python 2.5 to 3.3
-+ argannotation = arg_name + 'annotation'
-+ annotations.append(getattr(node.args, argannotation))
-+ else: # Python >= 3.4
-+ annotations.append(wildcard.annotation)
-+
-+ if is_py3_func:
-+ annotations.append(node.returns)
-+
-+ if len(set(args)) < len(args):
-+ for (idx, arg) in enumerate(args):
-+ if arg in args[:idx]:
-+ self.report(messages.DuplicateArgument, node, arg)
-+
-+ for child in annotations + defaults:
-+ if child:
-+ self.handleNode(child, node)
-
- def runFunction():
-
---- a/pyflakes/reporter.py
-+++ b/pyflakes/reporter.py
-@@ -2,6 +2,7 @@
- Provide the Reporter class.
- """
-
-+import re
- import sys
-
-
-@@ -57,7 +58,8 @@
- self._stderr.write(line)
- self._stderr.write('\n')
- if offset is not None:
-- self._stderr.write(" " * (offset + 1) + "^\n")
-+ self._stderr.write(re.sub(r'\S', ' ', line[:offset]) +
-+ "^\n")
-
- def flake(self, message):
- """
---- a/pyflakes/test/test_api.py
-+++ b/pyflakes/test/test_api.py
-@@ -163,7 +163,7 @@
- self.assertEqual(
- ("foo.py:3: a problem\n"
- "bad line of source\n"
-- " ^\n"),
-+ " ^\n"),
- err.getvalue())
-
- def test_syntaxErrorNoOffset(self):
-@@ -197,7 +197,7 @@
- self.assertEqual(
- ("foo.py:3: a problem\n" +
- lines[-1] + "\n" +
-- " ^\n"),
-+ " ^\n"),
- err.getvalue())
-
- def test_unexpectedError(self):
-@@ -322,7 +322,7 @@
- ["""\
- %s:8: invalid syntax
- '''quux'''
-- ^
-+ ^
- """ % (sourcePath,)])
-
- def test_eofSyntaxError(self):
-@@ -336,7 +336,21 @@
- ["""\
- %s:1: unexpected EOF while parsing
- def foo(
-- ^
-+ ^
-+""" % (sourcePath,)])
-+
-+ def test_eofSyntaxErrorWithTab(self):
-+ """
-+ The error reported for source files which end prematurely causing a
-+ syntax error reflects the cause for the syntax error.
-+ """
-+ sourcePath = self.makeTempFile("if True:\n\tfoo =")
-+ self.assertHasErrors(
-+ sourcePath,
-+ ["""\
-+%s:2: invalid syntax
-+\tfoo =
-+\t ^
- """ % (sourcePath,)])
-
- def test_nonDefaultFollowsDefaultSyntaxError(self):
-@@ -350,7 +364,7 @@
- pass
- """
- sourcePath = self.makeTempFile(source)
-- last_line = ' ^\n' if sys.version_info >= (3, 2) else ''
-+ last_line = ' ^\n' if sys.version_info >= (3, 2) else ''
- self.assertHasErrors(
- sourcePath,
- ["""\
-@@ -368,7 +382,7 @@
- foo(bar=baz, bax)
- """
- sourcePath = self.makeTempFile(source)
-- last_line = ' ^\n' if sys.version_info >= (3, 2) else ''
-+ last_line = ' ^\n' if sys.version_info >= (3, 2) else ''
- self.assertHasErrors(
- sourcePath,
- ["""\
-@@ -386,7 +400,7 @@
- if ver < (3,):
- decoding_error = "%s: problem decoding source\n" % (sourcePath,)
- else:
-- last_line = ' ^\n' if ver >= (3, 2) else ''
-+ last_line = ' ^\n' if ver >= (3, 2) else ''
- # Column has been "fixed" since 3.2.4 and 3.3.1
- col = 1 if ver >= (3, 3, 1) or ((3, 2, 4) <= ver < (3, 3)) else 2
- decoding_error = """\
---- a/pyflakes/test/test_doctests.py
-+++ b/pyflakes/test/test_doctests.py
-@@ -207,3 +207,22 @@
- >>> Foo
- '''
- """)
-+
-+ def test_noOffsetSyntaxErrorInDoctest(self):
-+ exceptions = super(Test, self).flakes(
-+ '''
-+ def buildurl(base, *args, **kwargs):
-+ """
-+ >>> buildurl('/blah.php', ('a', '&'), ('b', '=')
-+ '/blah.php?a=%26&b=%3D'
-+ >>> buildurl('/blah.php', a='&', 'b'='=')
-+ '/blah.php?b=%3D&a=%26'
-+ """
-+ pass
-+ ''',
-+ m.DoctestSyntaxError,
-+ m.DoctestSyntaxError).messages
-+ exc = exceptions[0]
-+ self.assertEqual(exc.lineno, 4)
-+ exc = exceptions[1]
-+ self.assertEqual(exc.lineno, 6)
---- /dev/null
-+++ b/tox.ini
-@@ -0,0 +1,10 @@
-+[tox]
-+envlist =
-+ py25,py26,py27,py32,py33,py34
-+# pypy is not ready yet; run manually with tox -e pypy if you want to see
-+# the failures
-+
-+[testenv]
-+deps =
-+commands =
-+ python setup.py test -q
Modified: packages/pyflakes/trunk/debian/patches/series
===================================================================
--- packages/pyflakes/trunk/debian/patches/series 2014-03-28 14:16:35 UTC (rev 10707)
+++ packages/pyflakes/trunk/debian/patches/series 2014-03-28 15:16:44 UTC (rev 10708)
@@ -1 +0,0 @@
-0.7.3-17-gecd6eca.patch
More information about the Python-apps-commits
mailing list