python / python/cpython

Importing the main module twice leads to two incompatible instances

Open
#71,794 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.11 interpreter-core type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 27607
Nosy @rhettinger, @cameron-simpson, @bitdancer, @vadmium, @Vgr255, @TheLastProject, @Kwpolska
Files
  • issue27607.zip: Example test case
  • 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 = None
    created_at = <Date 2016-07-24.15:46:17.645>
    labels = ['interpreter-core', 'type-bug', '3.11']
    title = 'Importing the main module twice leads to two incompatible instances'
    updated_at = <Date 2021-06-15.17:37:28.937>
    user = 'https://github.com/TheLastProject'
    

    bugs.python.org fields:

    activity = <Date 2021-06-15.17:37:28.937>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2016-07-24.15:46:17.645>
    creator = 'SylvieLorxu'
    dependencies = []
    files = ['43877']
    hgrepos = []
    issue_num = 27607
    keywords = []
    message_count = 14.0
    messages = ['271164', '271184', '271185', '271188', '271189', '271195', '271196', '271210', '271211', '271217', '271243', '271248', '271253', '271264']
    nosy_count = 7.0
    nosy_names = ['rhettinger', 'cameron', 'r.david.murray', 'martin.panter', 'abarry', 'SylvieLorxu', 'Kwpolska']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27607'
    versions = ['Python 3.11']
    

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start with the example test case in issue27607.zip and the linked BPO issue 27607 to reproduce the incompatible instances. Trace the interpreter-core import behavior and establish the expected result for importing the main module twice; the issue is complete only when that behavior is fixed and covered by a regression test.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    compilers
    Issue type
    Bug
    Difficulty
    5/5
    Estimated time
    Over a week
    Activity status
    Stale
    Clarity
    Needs clarification
    Newbie friendliness
    20/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.