update the import machinery to only use __spec__

Open
#65,961 34 comments 0 reactions 1 assignee View on GitHub

@brettcannon is already working on this.

Since Dec 8, 2021.

Assessment

This issue has not been assessed yet.

Description

interpreter-core topic-importlib type-feature
BPO 21762
Nosy @warsaw, @brettcannon, @ncoghlan, @ericsnowcurrently, @nanjekyejoannah
Dependencies
  • bpo-25791: Raise an ImportWarning when spec.parent/package isn't defined for a relative import
  • bpo-42132: Use specs instead of just loader in C code
  • 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 = 'https://github.com/brettcannon'
    closed_at = None
    created_at = <Date 2014-06-14.21:33:51.833>
    labels = ['interpreter-core', 'type-feature']
    title = 'update the import machinery to only use __spec__'
    updated_at = <Date 2022-02-04.20:50:24.662>
    user = 'https://github.com/ericsnowcurrently'
    

    bugs.python.org fields:

    activity = <Date 2022-02-04.20:50:24.662>
    actor = 'brett.cannon'
    assignee = 'brett.cannon'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2014-06-14.21:33:51.833>
    creator = 'eric.snow'
    dependencies = ['25791', '42132']
    files = []
    hgrepos = []
    issue_num = 21762
    keywords = []
    message_count = 13.0
    messages = ['220581', '220597', '220606', '220610', '258332', '258357', '258398', '258440', '258443', '258844', '258845', '379490', '412537']
    nosy_count = 5.0
    nosy_names = ['barry', 'brett.cannon', 'ncoghlan', 'eric.snow', 'nanjekyejoannah']
    pr_nums = []
    priority = 'low'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21762'
    versions = ['Python 3.6']
    

    Linked PRs
    • gh-124377
    • gh-124380
    • gh-142046
    • gh-142055
    • gh-142165
    • gh-156053
    • gh-156123
    Dominant language
    Python
    Stars
    77.2k
    Forks
    36k
    Avg merge
    1d 9h
    Merged PRs (30d)
    558

    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.

    More from python/cpython

    All issues in python/cpython

    Similar issues

    More Python issues

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.