[New-bugs-announce] [issue13253] 2to3 fix_renames renames sys.maxint only in imports

Ezio Melotti report at bugs.python.org
Mon Oct 24 08:25:52 CEST 2011


New submission from Ezio Melotti <ezio.melotti at gmail.com>:

$ cat deleteme.py 
from sys import maxint
print 'maxint', maxint
$ 2to3 deleteme.py 
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored deleteme.py
--- deleteme.py (original)
+++ deleteme.py (refactored)
@@ -1,2 +1,2 @@
-from sys import maxint
-print 'maxint', maxint
+from sys import maxsize
+print('maxint', maxint)
RefactoringTool: Files that need to be modified:
RefactoringTool: deleteme.py

The maxint in the print should be converted too.

----------
components: 2to3 (2.x to 3.0 conversion tool)
messages: 146278
nosy: benjamin.peterson, ezio.melotti
priority: normal
severity: normal
stage: needs patch
status: open
title: 2to3 fix_renames renames sys.maxint only in imports
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13253>
_______________________________________


More information about the New-bugs-announce mailing list