~ubuntu-branches/ubuntu/saucy/pyflakes/saucy

« back to all changes in this revision

Viewing changes to debian/patches/rev101.patch

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-08-04 23:49:01 UTC
  • mfrom: (1.1.9) (3.3.2 sid)
  • Revision ID: package-import@ubuntu.com-20130804234901-0sf9rh5q216p1zfo
Tags: 0.7.3-1
* Switch to dh-python.
* New upstream release (Closes: #718728)
  - "Fix undefined name for generator expression and dict/set
  comprehension at class level"
  - drop all patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Remove dependency on unittest2 for the tests
2
 
Origin: commit, revision id: git-v1:82e8cc3c426995d5bfeb110b77a4ccc983a88ff4
3
 
Author: Florent Xicluna <florent.xicluna@gmail.com>
4
 
Last-Update: 2013-06-18
5
 
X-Bzr-Revision-Id: git-v1:82e8cc3c426995d5bfeb110b77a4ccc983a88ff4
6
 
 
7
 
=== modified file 'NEWS.txt'
8
 
--- old/NEWS.txt        2013-04-24 12:29:08 +0000
9
 
+++ new/NEWS.txt        2013-06-18 22:51:28 +0000
10
 
@@ -1,3 +1,6 @@
11
 
+0.7.x (unreleased):
12
 
+  - Remove dependency on Unittest2 for the tests (for Python >= 2.7).
13
 
+
14
 
 0.7.2 (2013-04-24):
15
 
   - Fix computation of `DoctestSyntaxError.lineno` and `col`.
16
 
   - Add boolean attribute `Checker.withDoctest` to ignore doctests.
17
 
 
18
 
=== modified file 'pyflakes/test/__init__.py'
19
 
--- old/pyflakes/test/__init__.py       2005-12-31 02:20:44 +0000
20
 
+++ new/pyflakes/test/__init__.py       2013-06-18 22:51:28 +0000
21
 
@@ -0,0 +1,4 @@
22
 
+import sys
23
 
+if sys.version_info < (2, 7):
24
 
+    # Python 2.6 ships an obsolete version of "unittest"
25
 
+    sys.modules['unittest'] = __import__('unittest2')
26
 
 
27
 
=== modified file 'pyflakes/test/harness.py'
28
 
--- old/pyflakes/test/harness.py        2013-01-19 17:13:22 +0000
29
 
+++ new/pyflakes/test/harness.py        2013-06-18 22:51:28 +0000
30
 
@@ -2,12 +2,12 @@
31
 
 import textwrap
32
 
 import _ast
33
 
 
34
 
-import unittest2
35
 
+import unittest
36
 
 
37
 
 from pyflakes import checker
38
 
 
39
 
 
40
 
-class Test(unittest2.TestCase):
41
 
+class Test(unittest.TestCase):
42
 
 
43
 
     def flakes(self, input, *expectedOutputs, **kw):
44
 
         ast = compile(textwrap.dedent(input), "<test>", "exec",
45
 
 
46
 
=== modified file 'pyflakes/test/test_api.py'
47
 
--- old/pyflakes/test/test_api.py       2013-04-24 21:51:36 +0000
48
 
+++ new/pyflakes/test/test_api.py       2013-06-18 22:51:28 +0000
49
 
@@ -8,7 +8,7 @@
50
 
 import subprocess
51
 
 import tempfile
52
 
 
53
 
-from unittest2 import skipIf, TestCase
54
 
+from unittest import skipIf, TestCase
55
 
 
56
 
 from pyflakes.messages import UnusedImport
57
 
 from pyflakes.reporter import Reporter
58
 
 
59
 
=== modified file 'pyflakes/test/test_doctests.py'
60
 
--- old/pyflakes/test/test_doctests.py  2013-04-24 11:55:59 +0000
61
 
+++ new/pyflakes/test/test_doctests.py  2013-06-18 22:51:28 +0000
62
 
@@ -1,5 +1,5 @@
63
 
 import textwrap
64
 
-from unittest2 import skip
65
 
+from unittest import skip
66
 
 
67
 
 from pyflakes.test.test_other import Test as TestOther
68
 
 from pyflakes.test.test_imports import Test as TestImports
69
 
 
70
 
=== modified file 'pyflakes/test/test_imports.py'
71
 
--- old/pyflakes/test/test_imports.py   2013-04-21 15:32:22 +0000
72
 
+++ new/pyflakes/test/test_imports.py   2013-06-18 22:51:28 +0000
73
 
@@ -1,6 +1,6 @@
74
 
 
75
 
 from sys import version_info
76
 
-from unittest2 import skip, skipIf
77
 
+from unittest import skip, skipIf
78
 
 
79
 
 from pyflakes import messages as m
80
 
 from pyflakes.test import harness
81
 
 
82
 
=== modified file 'pyflakes/test/test_other.py'
83
 
--- old/pyflakes/test/test_other.py     2013-04-21 15:32:22 +0000
84
 
+++ new/pyflakes/test/test_other.py     2013-06-18 22:51:28 +0000
85
 
@@ -3,7 +3,7 @@
86
 
 """
87
 
 
88
 
 from sys import version_info
89
 
-from unittest2 import skip, skipIf
90
 
+from unittest import skip, skipIf
91
 
 
92
 
 from pyflakes import messages as m
93
 
 from pyflakes.test import harness
94
 
 
95
 
=== modified file 'pyflakes/test/test_undefined_names.py'
96
 
--- old/pyflakes/test/test_undefined_names.py   2013-04-21 15:32:22 +0000
97
 
+++ new/pyflakes/test/test_undefined_names.py   2013-06-18 22:51:28 +0000
98
 
@@ -2,7 +2,7 @@
99
 
 from _ast import PyCF_ONLY_AST
100
 
 from sys import version_info
101
 
 
102
 
-from unittest2 import skip, skipIf, TestCase
103
 
+from unittest import skip, skipIf, TestCase
104
 
 
105
 
 from pyflakes import messages as m, checker
106
 
 from pyflakes.test import harness
107
 
 
108
 
=== modified file 'setup.py'
109
 
--- old/setup.py        2013-03-31 12:44:47 +0000
110
 
+++ new/setup.py        2013-06-18 22:51:28 +0000
111
 
@@ -12,15 +12,14 @@
112
 
     from distutils.core import setup
113
 
     extra = {'scripts': ["bin/pyflakes"]}
114
 
 else:
115
 
-    if sys.version_info < (3,):
116
 
-        extra = {'tests_require': ['unittest2'],
117
 
-                 'test_suite': 'unittest2.collector'}
118
 
-    else:
119
 
-        extra = {'tests_require': ['unittest2py3k'],
120
 
-                 'test_suite': 'unittest2.collector.collector'}
121
 
-    extra['entry_points'] = {
122
 
-        'console_scripts': ['pyflakes = pyflakes.api:main'],
123
 
+    extra = {
124
 
+        'test_suite': 'pyflakes.test',
125
 
+        'entry_points': {
126
 
+            'console_scripts': ['pyflakes = pyflakes.api:main'],
127
 
+        },
128
 
     }
129
 
+    if sys.version_info < (2, 7):
130
 
+        extra['tests_require'] = ['unittest2']
131
 
 
132
 
 
133
 
 def get_version(fname=os.path.join('pyflakes', '__init__.py')):
134