You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix_imports does not handle intra-package renames #47510
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2008-12-31.18:22:51.829>created_at=<Date2008-07-02.20:02:14.536>labels= ['type-bug', 'expert-2to3']
title='fix_imports does not handle intra-package renames'updated_at=<Date2008-12-31.18:22:51.813>user='https://github.com/brettcannon'
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.
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.
Activity
brettcannon commentedon Jul 2, 2008
from test import test_supportshould lead tofrom test import support as test_support. Also does not work forfrom test.test_support import Error.There is also no good way to handle
import test.test_supportsinceimport test.test_support as test.supportis an error. Perhapsimport 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.
benjaminp commentedon Dec 31, 2008
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.