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.

Title: 2to3 fails to fix test.test_support
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.0, Python 3.1, Python 3.2, Python 2.7, Python 2.6
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, joe.amenta, pakal, rbp
Priority: normal Keywords:

Created on 2009-07-27 05:21 by joe.amenta, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
2to3_out.txt joe.amenta, 2009-07-27 05:21 Output of a simple 2to3 refactoring attempt, where test.test_support is not changed.
Messages (5)
msg90975 - (view) Author: Joe Amenta (joe.amenta) Date: 2009-07-27 05:21
PEP 3108 states that test.test_support was renamed to as a
part of the Standard Library Reorganization process.  However...

2to3 does not refactor (or even warn about) test.test_support.  Simply
"test.test_support": "",
into the MAPPING of would not work, because does not accept anything with a dot in it, i.e. "".
msg91423 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-08-08 21:26
We decided a while ago that it wasn't worth adding the complication to
fix_imports to handle this case, since test.test_support isn't
technically public API.
msg105935 - (view) Author: Pascal Chambon (pakal) * Date: 2010-05-17 20:13
Sorry to reraise an old issue, but the documentation of "test" module is deceiving on that one : "The test.test_support module has been renamed to in Python 3.0. The 2to3 tool will automatically adapt imports when converting your sources to 3.0.".

I lost quite some time on this one...
msg106634 - (view) Author: Rodrigo Bernardo Pimentel (rbp) (Python committer) Date: 2010-05-28 03:03
Pascal is correct, trunk Doc/library/test.rst still says: "The 2to3 tool will automatically adapt imports when converting your sources to 3.0." Perhaps this should simply be changed to "The 2to3 tool will not automatically convert this, so make sure you do, manually, if you port your code to Python 3."

Please let me know if you require a patch for this (but I think it's trivial enough), or if you think this should raise a -3 warning.
msg106635 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-05-28 03:11
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50832
2010-07-31 11:48:26floxlinkissue9429 superseder
2010-05-28 03:11:56benjamin.petersonsetmessages: + msg106635
2010-05-28 03:03:14rbpsetnosy: + rbp
messages: + msg106634
2010-05-17 20:13:03pakalsetnosy: + pakal
messages: + msg105935
2009-08-08 21:26:46benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg91423

resolution: wont fix
2009-07-27 05:21:20joe.amentacreate