This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Misleading message from 2to3 when skipping optional fixers
Type: behavior Stage: resolved
Components: Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Vinod.Kurup, berker.peksag, ncoghlan, python-dev
Priority: low Keywords: easy, patch

Created on 2014-07-25 06:20 by ncoghlan, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mywork.patch Vinod.Kurup, 2014-08-24 00:49 review
Messages (5)
msg223919 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-07-25 06:20
From https://stackoverflow.com/questions/5499897/converting-selenium-py-to-python-3-by-2to3, 2to3 prints the following messages when run:

===============
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
===============

That message is rather misleading - those four are the *optional* fixers that are only run when selected explicitly. Unlike the other fixers, they're essentially the *opposite* of implicit :)

Given that limiting the fixes to a specific subset (e.g. "-f dict") silences all such messages, and explicitly excluding an actual implicit fixer (e.g. "-x dict") doesn't generate a warning, I suggest the simplest fix is to just change the message to instead say "Skipping optional fixer".
msg225777 - (view) Author: Vinod Kurup (Vinod.Kurup) * Date: 2014-08-24 00:49
Patch attached to make the change that ncoghlan suggested.
msg243070 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-05-13 10:39
New changeset 571c82d8f4c9 by Berker Peksag in branch '3.4':
Issue #22064: Improve the misleading message from 2to3 when skipping optional fixers.
https://hg.python.org/cpython/rev/571c82d8f4c9

New changeset 11fefeb7e941 by Berker Peksag in branch 'default':
Issue #22064: Improve the misleading message from 2to3 when skipping optional fixers.
https://hg.python.org/cpython/rev/11fefeb7e941
msg243071 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-05-13 10:42
New changeset f6e297e698ff by Berker Peksag in branch '2.7':
Issue #22064: Improve the misleading message from 2to3 when skipping optional fixers.
https://hg.python.org/cpython/rev/f6e297e698ff
msg243072 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-05-13 10:42
Thanks for the patch, Vinod.
History
Date User Action Args
2022-04-11 14:58:06adminsetgithub: 66262
2015-05-13 10:42:57berker.peksagsetstatus: open -> closed

versions: + Python 2.7, Python 3.4, Python 3.5
nosy: + berker.peksag

messages: + msg243072
resolution: fixed
stage: needs patch -> resolved
2015-05-13 10:42:12python-devsetmessages: + msg243071
2015-05-13 10:39:57python-devsetnosy: + python-dev
messages: + msg243070
2014-08-24 00:49:04Vinod.Kurupsetfiles: + mywork.patch

nosy: + Vinod.Kurup
messages: + msg225777

keywords: + patch
2014-07-25 06:20:21ncoghlancreate