Issue 6583: 2to3 fails to fix test.test_support
Created on 2009-07-27 05:21 by joe.amenta, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| 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 test.support as a part of the Standard Library Reorganization process. However... 2to3 does not refactor (or even warn about) test.test_support. Simply adding "test.test_support": "test.support", into the MAPPING of fix_imports.py would not work, because fix_imports.py does not accept anything with a dot in it, i.e. "foo.bar". |
|||
| msg91423 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
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 test.support 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) ![]() |
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) * ![]() |
Date: 2010-05-28 03:11 | |
r81579 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:51 | admin | set | github: 50832 |
| 2010-07-31 11:48:26 | flox | link | issue9429 superseder |
| 2010-05-28 03:11:56 | benjamin.peterson | set | messages: + msg106635 |
| 2010-05-28 03:03:14 | rbp | set | nosy:
+ rbp messages: + msg106634 |
| 2010-05-17 20:13:03 | pakal | set | nosy:
+ pakal messages: + msg105935 |
| 2009-08-08 21:26:46 | benjamin.peterson | set | status: open -> closed nosy:
+ benjamin.peterson resolution: wont fix |
| 2009-07-27 05:21:20 | joe.amenta | create | |
