Skip to content

fix_imports does not handle intra-package renames #47510

Closed

Description

@brettcannon
BPO 3260
Nosy @brettcannon, @benjaminp

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 = None
closed_at = <Date 2008-12-31.18:22:51.829>
created_at = <Date 2008-07-02.20:02:14.536>
labels = ['type-bug', 'expert-2to3']
title = 'fix_imports does not handle intra-package renames'
updated_at = <Date 2008-12-31.18:22:51.813>
user = 'https://github.com/brettcannon'

bugs.python.org fields:

activity = <Date 2008-12-31.18:22:51.813>
actor = 'benjamin.peterson'
assignee = 'none'
closed = True
closed_date = <Date 2008-12-31.18:22:51.829>
closer = 'benjamin.peterson'
components = ['2to3 (2.x to 3.x conversion tool)']
creation = <Date 2008-07-02.20:02:14.536>
creator = 'brett.cannon'
dependencies = []
files = []
hgrepos = []
issue_num = 3260
keywords = []
message_count = 2.0
messages = ['69114', '78642']
nosy_count = 3.0
nosy_names = ['brett.cannon', 'collinwinter', 'benjamin.peterson']
pr_nums = []
priority = 'high'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue3260'
versions = []

Activity

  1. brettcannon commented on Jul 2, 2008

    @brettcannon
    MemberAuthor

    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.

  2. removed their assignment
    on Oct 3, 2008
  3. benjaminp commented on Dec 31, 2008

    @benjaminp
    Contributor

    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.

  4. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-2to3type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions