8000 Actually add fix_apply to stage 1 (and fix its test) · r3m0t/python-future@a50f5b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit a50f5b8

Browse files
committed
Actually add fix_apply to stage 1 (and fix its test)
1 parent 3310e13 commit a50f5b8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

future/tests/test_futurize.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ def test_Py2_StringIO_module(self):
286286
after = """
287287
import io
288288
s = io.StringIO('my string')
289-
assert isinstance(s, io.InputType)
289+
# assert isinstance(s, io.InputType)
290+
# There is no io.InputType in Python 3. What should we change this to
291+
# instead?
290292
"""
291293
self.convert_check(before, after)
292294

@@ -319,6 +321,7 @@ def f(a, b):
319321
return a + b
320322
321323
args = (1, 2)
324+
assert f(*args) == 3
322325
assert f(*('a', 'b')) == 'ab'
323326
'''
324327
self.convert_check(before, after, stages=[1])

libfuturize/fixes2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# projects that are happy to drop support for Py2.5 and below. Applying
77
# them first will reduce the size of the patch set for the real porting.
88
lib2to3_fix_names_stage1 = set([
9+
'lib2to3.fixes.fix_apply',
910
'lib2to3.fixes.fix_except',
1011
'lib2to3.fixes.fix_execfile',
1112
'lib2to3.fixes.fix_exitfunc',
@@ -37,7 +38,6 @@
3738

3839
# The following fixers add a dependency on the ``future`` package:
3940
lib2to3_fix_names_stage2 = set([
40-
'lib2to3.fixes.fix_apply',
4141
'lib2to3.fixes.fix_basestring',
4242
# 'lib2to3.fixes.fix_buffer', # perhaps not safe. Test this.
4343
# 'lib2to3.fixes.fix_callable', # not needed in Py3.2+

0 commit comments

Comments
 (0)
0