[issue25527] Invalid (... and confusing) warning raised by 2to3 regarding repeat

2021-10-20 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
stage:  -> 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



[issue25527] Invalid (... and confusing) warning raised by 2to3 regarding repeat

2015-11-06 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue25527] Invalid (... and confusing) warning raised by 2to3 regarding repeat

2015-11-01 Thread Antony Lee

New submission from Antony Lee:

$ echo 'from numpy import repeat\nrepeat(2, 3)' | 2to3 -
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No files need to be modified.
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file  ###
RefactoringTool: Line 2: You should use 'operator.mul(2, 3)' here.

numpy.repeat(2, 3) returns np.array([2, 2, 2]) but 2to3 confuses it with the 
old operator.repeat.  It may be impossible to resolve in general which function 
the author wanted to call but perhaps the warning should only be raised if the 
operator module is imported at some point?  (or clarify the error message)

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 253835
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Invalid (... and confusing) warning raised by 2to3 regarding repeat
versions: Python 2.7, 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