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: fix_imports does not handle intra-package renames
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, brett.cannon, collinwinter
Priority: high Keywords:

Created on 2008-07-02 20:02 by brett.cannon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg69114 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-07-02 20:02
``from test import test_support`` should lead to ``from test import
support as test_support``. Also does not work for ``from
test.test_support import Error``.

There is also no good way to handle ``import test.test_support`` since
``import test.test_support as test.support`` is an error. Perhaps
``import test.support; test.test_support = support``?

At the moment test.support is the only rename like this, so it is not
critical that this be fixed immediately as probably few people use the
module outside of the stdlib.
msg78642 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-31 18:22
I think I will close this as "won't fix". As you say, the only
applicable rename is test.test_support. That only is not enough IMO to
add all the complexity to fix_imports that handling packages properly
would require.
History
Date User Action Args
2022-04-11 14:56:36adminsetgithub: 47510
2008-12-31 18:22:51benjamin.petersonsetstatus: open -> closed
resolution: wont fix
messages: + msg78642
nosy: + benjamin.peterson
2008-10-03 17:10:58collinwintersetassignee: collinwinter ->
2008-07-11 01:52:40brett.cannonlinkissue2775 dependencies
2008-07-02 20:02:14brett.cannoncreate