classification
Title: Check 2to3 for support of print function.
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: collinwinter Nosy List: benjamin.peterson, collinwinter, eric.smith, wolever
Priority: normal Keywords: patch

Created on 2008-03-18 23:42 by eric.smith, last changed 2009-07-12 17:07 by benjamin.peterson. This issue is now closed.

Files
File name Uploaded Description Edit
print_function_detection.diff wolever, 2008-04-24 03:22
Messages (6)
msg64017 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2008-03-18 23:42
Issue 1633807 is a backport of the print function to 2.6, using a
__future__ import.  Once it is committed, we need to ensure that 2to3
does the right thing (namely, nothing) with print functions in modules
that have the __future__ import.
msg64085 - (view) Author: David Wolever (wolever) * (Python committer) Date: 2008-03-19 19:04
I've updated the fixer (checkin to come shortly), but 2to3 gets upset when 
you it comes across print statements with kwargs (eg: print("spam", end=" 
")), so the tests will be commented out 'till this is fixed.
msg64087 - (view) Author: David Wolever (wolever) * (Python committer) Date: 2008-03-19 19:18
As of r61635, the fix_print fixer has been fixed and tests have been added 
(which will ``assert False`` when 2to3 is fixed so it can handle 
``print(**kwargs)``).
msg65709 - (view) Author: David Wolever (wolever) * (Python committer) Date: 2008-04-24 03:22
Here is a patch that will detect a `from __future__ import print_function` 
and adjust the grammar appropriately.

Any objections?
msg65830 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2008-04-26 00:21
Reviewing...
msg90453 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-07-12 17:07
Fixed in r73981.
History
Date User Action Args
2009-07-12 17:07:09benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg90453
2009-02-11 04:42:01ajaksu2setnosy: + benjamin.peterson
2008-04-26 00:21:33collinwintersetmessages: + msg65830
2008-04-24 03:22:46woleversetkeywords: + patch
files: + print_function_detection.diff
messages: + msg65709
2008-03-19 19:18:15woleversetassignee: wolever -> collinwinter
messages: + msg64087
2008-03-19 19:04:09woleversetmessages: + msg64085
2008-03-19 16:30:39woleversetassignee: collinwinter -> wolever
nosy: + wolever
2008-03-18 23:42:17eric.smithcreate