[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2021-10-20 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2015-12-31 Thread Ezio Melotti

Ezio Melotti added the comment:

Nikita, did you manage to find a solution?
If not, do you have a patch (even if not complete) to share?

--
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2015-09-23 Thread Nikita Klimov

Nikita Klimov added the comment:

I'm close to solution, but I need another 1 week.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2015-09-15 Thread Nikita Klimov

Nikita Klimov added the comment:

I'm interesting to research this. 
I can show results by 23 September, I think.

--
nosy: +klimov
versions: +Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2011-10-27 Thread Ezio Melotti

Ezio Melotti  added the comment:

I do (or at least did it in at least one place :).
I think the problem is actually more general, and I don't know if it's by 
design.
If a name in the import is changed, all the other occurrences of the name 
should be changed as well.  I don't know if 2to3 is powerful enough to 
recognize what occurrences should be left untouched (e.g. if I also have 
maxsize = 100 inside a function), and how difficult would it be to do it.
See also #13272.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2011-10-27 Thread Éric Araujo

Éric Araujo  added the comment:

Do people really import maxint from sys?  I’d find that less readable than 
using sys.maxint —which should, if you ask me, also be replaced :)

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2011-10-27 Thread Meador Inge

Changes by Meador Inge :


--
nosy: +meador.inge

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2011-10-23 Thread Ezio Melotti

New submission from Ezio Melotti :

$ 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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com