[Python-apps-commits] r9817 - in packages/pyflakes/trunk/debian (12 files)
xnox at users.alioth.debian.org
xnox at users.alioth.debian.org
Fri Jun 28 19:02:49 UTC 2013
Date: Friday, June 28, 2013 @ 19:02:47
Author: xnox
Revision: 9817
* Export proxy setting, to prevent accessing internet at build time.
* New Upstream Release (Closes: #674796, #674797, #700565, #666503)
* Add /usr/bin/pyflakes3 script to check python3 code
* Cherry pick patches from upstream to run and pass testsuite.
Added:
packages/pyflakes/trunk/debian/links
packages/pyflakes/trunk/debian/manpages
(from rev 9816, packages/pyflakes/trunk/debian/pyflakes.manpages)
packages/pyflakes/trunk/debian/patches/rev100.patch
packages/pyflakes/trunk/debian/patches/rev101.patch
packages/pyflakes/trunk/debian/patches/rev104.patch
Modified:
packages/pyflakes/trunk/debian/changelog
packages/pyflakes/trunk/debian/control
packages/pyflakes/trunk/debian/patches/series
packages/pyflakes/trunk/debian/rules
Deleted:
packages/pyflakes/trunk/debian/pyflakes.manpages
packages/pyflakes/trunk/debian/pyflakes3.1
packages/pyflakes/trunk/debian/pyflakes3.manpages
Modified: packages/pyflakes/trunk/debian/changelog
===================================================================
--- packages/pyflakes/trunk/debian/changelog 2013-06-28 13:26:36 UTC (rev 9816)
+++ packages/pyflakes/trunk/debian/changelog 2013-06-28 19:02:47 UTC (rev 9817)
@@ -1,4 +1,4 @@
-pyflakes (0.7.2-1) unstable; urgency=low
+pyflakes (0.7.2-1) UNRELEASED; urgency=low
[ Sandro Tosi ]
* debian/control
@@ -8,14 +8,15 @@
* Use canonical URIs for Vcs-* fields.
[ Barry Warsaw ]
- * New upstream release.
- + debian/patches/add_main_function.diff as no longer appropriate since
- args are taken from the return value of parser.parse_args()
- * Add Python 3 support.
- + New binary package pyflakes3 which provides /usr/bin/pyflakes3 script.
+ * Export proxy setting, to prevent accessing internet at build time.
- -- Barry Warsaw <barry at python.org> Fri, 24 May 2013 15:17:20 -0400
+ [ Dmitrijs Ledkovs ]
+ * New Upstream Release (Closes: #674796, #674797, #700565, #666503)
+ * Add /usr/bin/pyflakes3 script to check python3 code
+ * Cherry pick patches from upstream to run and pass testsuite.
+ -- Dmitrijs Ledkovs <xnox at debian.org> Fri, 28 Jun 2013 19:41:39 +0100
+
pyflakes (0.6.1-1~exp1) experimental; urgency=low
* New upstream release:
Modified: packages/pyflakes/trunk/debian/control
===================================================================
--- packages/pyflakes/trunk/debian/control 2013-06-28 13:26:36 UTC (rev 9816)
+++ packages/pyflakes/trunk/debian/control 2013-06-28 19:02:47 UTC (rev 9817)
@@ -3,13 +3,13 @@
Priority: optional
Maintainer: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
Uploaders: Tristan Seligmann <mithrandi at mithrandi.net>,
- Varun Hiremath <varun at debian.org>
+ Varun Hiremath <varun at debian.org>,
+ Dmitrijs Ledkovs <xnox at debian.org>,
Build-Depends: debhelper (>= 9),
- python,
+ python-all,
python-nose,
python-setuptools,
- python-unittest2,
- python3,
+ python3-all,
python3-nose,
python3-setuptools
X-Python-Version: >= 2.6
@@ -21,26 +21,11 @@
Package: pyflakes
Architecture: all
-Depends: python-pkg-resources, ${misc:Depends}, ${python:Depends}
-Description: passive checker of Python 2 programs
+Depends: python-pkg-resources, python3-pkg-resources, ${misc:Depends}, ${python:Depends}, ${python3:Depends}
+Description: passive checker of Python 2 and 3 programs
Pyflakes is program to analyze Python programs and detect various
errors. It works by parsing the source file, not importing it, so it
is safe to use on modules with side effects. It's also much faster.
.
Unlike PyLint, Pyflakes checks only for logical errors in programs;
- it does not perform any checks on style.
- .
- This is the Python 2 version.
-
-Package: pyflakes3
-Architecture: all
-Depends: python3-pkg-resources, ${misc:Depends}, ${python3:Depends}
-Description: passive checker of Python 3 programs
- Pyflakes is program to analyze Python programs and detect various
- errors. It works by parsing the source file, not importing it, so it
- is safe to use on modules with side effects. It's also much faster.
- .
- Unlike PyLint, Pyflakes checks only for logical errors in programs;
- it does not perform any checks on style.
- .
- This is the Python 3 version.
+ it does not perform any checks on style.
\ No newline at end of file
Added: packages/pyflakes/trunk/debian/links
===================================================================
--- packages/pyflakes/trunk/debian/links (rev 0)
+++ packages/pyflakes/trunk/debian/links 2013-06-28 19:02:47 UTC (rev 9817)
@@ -0,0 +1 @@
+usr/share/man/man1/pyflakes.1 usr/share/man/man1/pyflakes3.1
Copied: packages/pyflakes/trunk/debian/manpages (from rev 9816, packages/pyflakes/trunk/debian/pyflakes.manpages)
===================================================================
--- packages/pyflakes/trunk/debian/manpages (rev 0)
+++ packages/pyflakes/trunk/debian/manpages 2013-06-28 19:02:47 UTC (rev 9817)
@@ -0,0 +1 @@
+debian/pyflakes.1
Added: packages/pyflakes/trunk/debian/patches/rev100.patch
===================================================================
--- packages/pyflakes/trunk/debian/patches/rev100.patch (rev 0)
+++ packages/pyflakes/trunk/debian/patches/rev100.patch 2013-06-28 19:02:47 UTC (rev 9817)
@@ -0,0 +1,42 @@
+Description: Fix tests with Python 3.2.4 and Python 3.3.1
+Origin: commit, revision id: git-v1:0c4405d946c6c1be9be3e3a52191ab23968d1244
+Author: Florent Xicluna <florent.xicluna at gmail.com>
+Last-Update: 2013-04-24
+X-Bzr-Revision-Id: git-v1:0c4405d946c6c1be9be3e3a52191ab23968d1244
+
+=== modified file 'pyflakes/__init__.py'
+--- old/pyflakes/__init__.py 2013-04-24 12:29:08 +0000
++++ new/pyflakes/__init__.py 2013-04-24 21:51:36 +0000
+@@ -1,2 +1,2 @@
+
+-__version__ = '0.7.2'
++__version__ = '0.7.3a0'
+
+=== modified file 'pyflakes/test/test_api.py'
+--- old/pyflakes/test/test_api.py 2013-04-23 05:39:08 +0000
++++ new/pyflakes/test/test_api.py 2013-04-24 21:51:36 +0000
+@@ -381,16 +381,20 @@
+ """
+ The invalid escape syntax raises ValueError in Python 2
+ """
++ ver = sys.version_info
+ # ValueError: invalid \x escape
+ sourcePath = self.makeTempFile(r"foo = '\xyz'")
+- if sys.version_info < (3,):
++ if ver < (3,):
+ decoding_error = "%s: problem decoding source\n" % (sourcePath,)
+ 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 = """\
+ %s:1: (unicode error) 'unicodeescape' codec can't decode bytes \
+-in position 0-2: truncated \\xXX escape
++in position 0-%d: truncated \\xXX escape
+ foo = '\\xyz'
+-%s""" % (sourcePath, ' ^\n' if sys.version_info >= (3, 2) else '')
++%s""" % (sourcePath, col, last_line)
+ self.assertHasErrors(
+ sourcePath, [decoding_error])
+
+
Added: packages/pyflakes/trunk/debian/patches/rev101.patch
===================================================================
--- packages/pyflakes/trunk/debian/patches/rev101.patch (rev 0)
+++ packages/pyflakes/trunk/debian/patches/rev101.patch 2013-06-28 19:02:47 UTC (rev 9817)
@@ -0,0 +1,134 @@
+Description: Remove dependency on unittest2 for the tests
+Origin: commit, revision id: git-v1:82e8cc3c426995d5bfeb110b77a4ccc983a88ff4
+Author: Florent Xicluna <florent.xicluna at gmail.com>
+Last-Update: 2013-06-18
+X-Bzr-Revision-Id: git-v1:82e8cc3c426995d5bfeb110b77a4ccc983a88ff4
+
+=== modified file 'NEWS.txt'
+--- old/NEWS.txt 2013-04-24 12:29:08 +0000
++++ new/NEWS.txt 2013-06-18 22:51:28 +0000
+@@ -1,3 +1,6 @@
++0.7.x (unreleased):
++ - Remove dependency on Unittest2 for the tests (for Python >= 2.7).
++
+ 0.7.2 (2013-04-24):
+ - Fix computation of `DoctestSyntaxError.lineno` and `col`.
+ - Add boolean attribute `Checker.withDoctest` to ignore doctests.
+
+=== modified file 'pyflakes/test/__init__.py'
+--- old/pyflakes/test/__init__.py 2005-12-31 02:20:44 +0000
++++ new/pyflakes/test/__init__.py 2013-06-18 22:51:28 +0000
+@@ -0,0 +1,4 @@
++import sys
++if sys.version_info < (2, 7):
++ # Python 2.6 ships an obsolete version of "unittest"
++ sys.modules['unittest'] = __import__('unittest2')
+
+=== modified file 'pyflakes/test/harness.py'
+--- old/pyflakes/test/harness.py 2013-01-19 17:13:22 +0000
++++ new/pyflakes/test/harness.py 2013-06-18 22:51:28 +0000
+@@ -2,12 +2,12 @@
+ import textwrap
+ import _ast
+
+-import unittest2
++import unittest
+
+ from pyflakes import checker
+
+
+-class Test(unittest2.TestCase):
++class Test(unittest.TestCase):
+
+ def flakes(self, input, *expectedOutputs, **kw):
+ ast = compile(textwrap.dedent(input), "<test>", "exec",
+
+=== modified file 'pyflakes/test/test_api.py'
+--- old/pyflakes/test/test_api.py 2013-04-24 21:51:36 +0000
++++ new/pyflakes/test/test_api.py 2013-06-18 22:51:28 +0000
+@@ -8,7 +8,7 @@
+ import subprocess
+ import tempfile
+
+-from unittest2 import skipIf, TestCase
++from unittest import skipIf, TestCase
+
+ from pyflakes.messages import UnusedImport
+ from pyflakes.reporter import Reporter
+
+=== modified file 'pyflakes/test/test_doctests.py'
+--- old/pyflakes/test/test_doctests.py 2013-04-24 11:55:59 +0000
++++ new/pyflakes/test/test_doctests.py 2013-06-18 22:51:28 +0000
+@@ -1,5 +1,5 @@
+ import textwrap
+-from unittest2 import skip
++from unittest import skip
+
+ from pyflakes.test.test_other import Test as TestOther
+ from pyflakes.test.test_imports import Test as TestImports
+
+=== modified file 'pyflakes/test/test_imports.py'
+--- old/pyflakes/test/test_imports.py 2013-04-21 15:32:22 +0000
++++ new/pyflakes/test/test_imports.py 2013-06-18 22:51:28 +0000
+@@ -1,6 +1,6 @@
+
+ from sys import version_info
+-from unittest2 import skip, skipIf
++from unittest import skip, skipIf
+
+ from pyflakes import messages as m
+ from pyflakes.test import harness
+
+=== modified file 'pyflakes/test/test_other.py'
+--- old/pyflakes/test/test_other.py 2013-04-21 15:32:22 +0000
++++ new/pyflakes/test/test_other.py 2013-06-18 22:51:28 +0000
+@@ -3,7 +3,7 @@
+ """
+
+ from sys import version_info
+-from unittest2 import skip, skipIf
++from unittest import skip, skipIf
+
+ from pyflakes import messages as m
+ from pyflakes.test import harness
+
+=== modified file 'pyflakes/test/test_undefined_names.py'
+--- old/pyflakes/test/test_undefined_names.py 2013-04-21 15:32:22 +0000
++++ new/pyflakes/test/test_undefined_names.py 2013-06-18 22:51:28 +0000
+@@ -2,7 +2,7 @@
+ from _ast import PyCF_ONLY_AST
+ from sys import version_info
+
+-from unittest2 import skip, skipIf, TestCase
++from unittest import skip, skipIf, TestCase
+
+ from pyflakes import messages as m, checker
+ from pyflakes.test import harness
+
+=== modified file 'setup.py'
+--- old/setup.py 2013-03-31 12:44:47 +0000
++++ new/setup.py 2013-06-18 22:51:28 +0000
+@@ -12,15 +12,14 @@
+ from distutils.core import setup
+ extra = {'scripts': ["bin/pyflakes"]}
+ else:
+- if sys.version_info < (3,):
+- extra = {'tests_require': ['unittest2'],
+- 'test_suite': 'unittest2.collector'}
+- else:
+- extra = {'tests_require': ['unittest2py3k'],
+- 'test_suite': 'unittest2.collector.collector'}
+- extra['entry_points'] = {
+- 'console_scripts': ['pyflakes = pyflakes.api:main'],
++ extra = {
++ 'test_suite': 'pyflakes.test',
++ 'entry_points': {
++ 'console_scripts': ['pyflakes = pyflakes.api:main'],
++ },
+ }
++ if sys.version_info < (2, 7):
++ extra['tests_require'] = ['unittest2']
+
+
+ def get_version(fname=os.path.join('pyflakes', '__init__.py')):
+
Added: packages/pyflakes/trunk/debian/patches/rev104.patch
===================================================================
--- packages/pyflakes/trunk/debian/patches/rev104.patch (rev 0)
+++ packages/pyflakes/trunk/debian/patches/rev104.patch 2013-06-28 19:02:47 UTC (rev 9817)
@@ -0,0 +1,97 @@
+Description: Use assertEqual instead of deprecated assertEquals.
+Origin: commit, revision id: git-v1:0847a55e3bb19a3935ca2e36d36f1a97b85e0cc8
+Author: Florent Xicluna <florent.xicluna at gmail.com>
+Last-Update: 2013-06-18
+X-Bzr-Revision-Id: git-v1:0847a55e3bb19a3935ca2e36d36f1a97b85e0cc8
+
+=== modified file 'pyflakes/test/test_api.py'
+--- old/pyflakes/test/test_api.py 2013-06-18 22:51:28 +0000
++++ new/pyflakes/test/test_api.py 2013-06-18 23:47:42 +0000
+@@ -161,7 +161,7 @@
+ err = StringIO()
+ reporter = Reporter(None, err)
+ reporter.syntaxError('foo.py', 'a problem', 3, 4, 'bad line of source')
+- self.assertEquals(
++ self.assertEqual(
+ ("foo.py:3: a problem\n"
+ "bad line of source\n"
+ " ^\n"),
+@@ -176,7 +176,7 @@
+ reporter = Reporter(None, err)
+ reporter.syntaxError('foo.py', 'a problem', 3, None,
+ 'bad line of source')
+- self.assertEquals(
++ self.assertEqual(
+ ("foo.py:3: a problem\n"
+ "bad line of source\n"),
+ err.getvalue())
+@@ -195,7 +195,7 @@
+ reporter = Reporter(None, err)
+ reporter.syntaxError('foo.py', 'a problem', 3, len(lines[0]) + 5,
+ '\n'.join(lines))
+- self.assertEquals(
++ self.assertEqual(
+ ("foo.py:3: a problem\n" +
+ lines[-1] + "\n" +
+ " ^\n"),
+@@ -208,7 +208,7 @@
+ err = StringIO()
+ reporter = Reporter(None, err)
+ reporter.unexpectedError('source.py', 'error message')
+- self.assertEquals('source.py: error message\n', err.getvalue())
++ self.assertEqual('source.py: error message\n', err.getvalue())
+
+ def test_flake(self):
+ """
+@@ -219,7 +219,7 @@
+ reporter = Reporter(out, None)
+ message = UnusedImport('foo.py', Node(42), 'bar')
+ reporter.flake(message)
+- self.assertEquals(out.getvalue(), "%s\n" % (message,))
++ self.assertEqual(out.getvalue(), "%s\n" % (message,))
+
+
+ class CheckTests(TestCase):
+@@ -248,7 +248,7 @@
+ """
+ err = StringIO()
+ count = withStderrTo(err, checkPath, path)
+- self.assertEquals(
++ self.assertEqual(
+ (count, err.getvalue()), (len(errorList), ''.join(errorList)))
+
+ def getErrors(self, path):
+@@ -283,8 +283,8 @@
+ L{checkPath} handles non-existing files.
+ """
+ count, errors = self.getErrors('extremo')
+- self.assertEquals(count, 1)
+- self.assertEquals(
++ self.assertEqual(count, 1)
++ self.assertEqual(
+ errors,
+ [('unexpectedError', 'extremo', 'No such file or directory')])
+
+@@ -406,8 +406,8 @@
+ sourcePath = self.makeTempFile('')
+ os.chmod(sourcePath, 0)
+ count, errors = self.getErrors(sourcePath)
+- self.assertEquals(count, 1)
+- self.assertEquals(
++ self.assertEqual(count, 1)
++ self.assertEqual(
+ errors,
+ [('unexpectedError', sourcePath, "Permission denied")])
+
+@@ -418,8 +418,8 @@
+ """
+ sourcePath = self.makeTempFile("import foo")
+ count, errors = self.getErrors(sourcePath)
+- self.assertEquals(count, 1)
+- self.assertEquals(
++ self.assertEqual(count, 1)
++ self.assertEqual(
+ errors, [('flake', str(UnusedImport(sourcePath, Node(1), 'foo')))])
+
+ @skipIf(sys.version_info >= (3,), "not relevant")
+
Modified: packages/pyflakes/trunk/debian/patches/series
===================================================================
--- packages/pyflakes/trunk/debian/patches/series 2013-06-28 13:26:36 UTC (rev 9816)
+++ packages/pyflakes/trunk/debian/patches/series 2013-06-28 19:02:47 UTC (rev 9817)
@@ -0,0 +1,3 @@
+rev100.patch
+rev101.patch
+rev104.patch
Deleted: packages/pyflakes/trunk/debian/pyflakes.manpages
===================================================================
--- packages/pyflakes/trunk/debian/pyflakes.manpages 2013-06-28 13:26:36 UTC (rev 9816)
+++ packages/pyflakes/trunk/debian/pyflakes.manpages 2013-06-28 19:02:47 UTC (rev 9817)
@@ -1 +0,0 @@
-debian/pyflakes.1
Deleted: packages/pyflakes/trunk/debian/pyflakes3.1
===================================================================
--- packages/pyflakes/trunk/debian/pyflakes3.1 2013-06-28 13:26:36 UTC (rev 9816)
+++ packages/pyflakes/trunk/debian/pyflakes3.1 2013-06-28 19:02:47 UTC (rev 9817)
@@ -1,33 +0,0 @@
-.TH "PYFLAKES3" "1" "10/01/2007" "" ""
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.SH "NAME"
-pyflakes3 - simple Python 3 source checker
-.SH "SYNOPSIS"
-.PP
-\fBpyflakes3\fR [\fIfile-or-directory\fR ...]
-.SH "DESCRIPTION"
-Pyflakes is a simple program which checks Python source files for errors.
-It is similar to PyChecker in scope, but differs in that it does not
-execute the modules to check them. This is both safer and faster, although
-it does not perform as many checks. Unlike PyLint, Pyflakes checks only
-for logical errors in programs; it does not perform any checks on style.
-.sp
-All commandline arguments are checked, which have to be either regular files
-or directories. If a directory is given, every \fB.py\fR file within
-will be checked.
-.sp
-When no commandline arguments are given, data will be read from standard input.
-.SH "OUTPUT"
-Found warnings including unused imports, undefined variables
-and unnecessary reimports, are printed on standard output.
-Found errors including compile or encoding errors, are printed
-on standard error.
-.SH "EXIT STATUS"
-The exit status is 0 when no warnings or errors are found. Otherwise the exit
-status is 1.
-.SH "AUTHOR"
-This manual page was originally written by Bastian Kleineidam <calvin at debian\.org>
-for the Debian distribution of pyflakes (but can be used by others)\.
Deleted: packages/pyflakes/trunk/debian/pyflakes3.manpages
===================================================================
--- packages/pyflakes/trunk/debian/pyflakes3.manpages 2013-06-28 13:26:36 UTC (rev 9816)
+++ packages/pyflakes/trunk/debian/pyflakes3.manpages 2013-06-28 19:02:47 UTC (rev 9817)
@@ -1 +0,0 @@
-debian/pyflakes3.1
Modified: packages/pyflakes/trunk/debian/rules
===================================================================
--- packages/pyflakes/trunk/debian/rules 2013-06-28 13:26:36 UTC (rev 9816)
+++ packages/pyflakes/trunk/debian/rules 2013-06-28 19:02:47 UTC (rev 9817)
@@ -1,10 +1,11 @@
#!/usr/bin/make -f
-DH_VERBOSE=1
+include /usr/share/dpkg/pkg-info.mk
+PYTHON2:=$(shell pyversions -r)
+PYTHON3:=$(shell py3versions -r)
+py3sdo=set -e; $(foreach py, $(PYTHON3), $(py) $(1);)
+pyalldo=set -e; $(foreach py, $(PYTHON2) $(PYTHON3), $(py) $(1);)
-PYTHON2=$(shell pyversions -vd)
-PYTHON3=$(shell py3versions -vd)
-
# Prevent setuptools/distribute from accessing the internet.
export http_proxy = http://127.0.9.1:9
@@ -12,46 +13,28 @@
dh $@ --with python2,python3
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-test-python%:
- python$* setup.py test -vv
-
-# The pyflakes unittests only run under Python 2 due to dependencies on
-# unittest2, which is a Python 2-only package. LP: #1183953.
-override_dh_auto_test: $(PYTHON2:%=test-python%)
+override_dh_auto_test:
+ $(call pyalldo, setup.py test)
endif
-build-python%:
- python$* setup.py build
-
-override_dh_auto_build: $(PYTHON3:%=build-python%)
+override_dh_auto_build:
dh_auto_build
+ $(call py3sdo, setup.py build)
override_dh_auto_install:
- set -ex; \
- for v in $(PYTHON2); do \
- rm -rf pyflakes.egg-info; \
- python$$v setup.py install \
- --skip-build \
- --root=debian/pyflakes \
- --install-layout=deb; \
- done
- sed -i -e 's,#!/usr/bin/python.*,#!/usr/bin/python,' \
- debian/pyflakes/usr/bin/pyflakes
- set -ex; \
- for v in $(PYTHON3); do \
- rm -rf pyflakes.egg-info; \
- python$$v setup.py install \
- --skip-build \
- --root=debian/pyflakes3 \
- --install-layout=deb; \
- done
- sed -i -e 's,#!/usr/bin/python3.*,#!/usr/bin/python3,' \
- debian/pyflakes3/usr/bin/pyflakes
- cd debian/pyflakes3/usr/bin && mv pyflakes pyflakes3
+ $(call py3sdo, setup.py install --root=$(CURDIR)/debian/$(DEB_SOURCE) --install-layout=deb)
+ cd $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin && mv pyflakes pyflakes3
+ dh_auto_install
override_dh_installchangelogs:
dh_installchangelogs NEWS.txt
+override_dh_python2:
+ dh_python2 -ppyflakes
+
+override_dh_python3:
+ dh_python3 --shebang=/usr/bin/python3 -ppyflakes
+
override_dh_auto_clean:
dh_auto_clean
rm -rf build
More information about the Python-apps-commits
mailing list