Skip to content

assignment of winreg module to another name causes NameError #55711

Closed

Description

@jaraco
BPO 11502
Nosy @jaraco

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 2011-03-14.21:51:34.721>
created_at = <Date 2011-03-14.16:31:31.725>
labels = ['expert-2to3']
title = 'assignment of winreg module to another name causes NameError'
updated_at = <Date 2011-03-14.21:51:34.720>
user = 'https://github.com/jaraco'

bugs.python.org fields:

activity = <Date 2011-03-14.21:51:34.720>
actor = 'jaraco'
assignee = 'none'
closed = True
closed_date = <Date 2011-03-14.21:51:34.721>
closer = 'jaraco'
components = ['2to3 (2.x to 3.x conversion tool)']
creation = <Date 2011-03-14.16:31:31.725>
creator = 'jaraco'
dependencies = []
files = []
hgrepos = []
issue_num = 11502
keywords = []
message_count = 3.0
messages = ['130849', '130910', '130913']
nosy_count = 2.0
nosy_names = ['jaraco', 'Arfrever']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue11502'
versions = []

Activity

  1. jaraco commented on Mar 14, 2011

    @jaraco
    MemberAuthor

    Consider the Python file:

        import _winreg
        _winreg.foo
        x = _winreg

    Currently, 2to3 converts this to:

        import winreg
        winreg.foo
        x = _winreg

    The result will elicit a NameError on line 3 (if line 2 is valid). Is it possible to support this case?

  2. Arfrever commented on Mar 14, 2011

    Arfrevermannequin
    Mannequin

    It's a duplicate of issue bpo-11276.

  3. jaraco commented on Mar 14, 2011

    @jaraco
    MemberAuthor

    Good call. Closing.

  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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions