GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C API: Deprecate PyImport_ImportModuleNoBlock() function · Issue #105396 · python/cpython

C API: Deprecate PyImport_ImportModuleNoBlock() function #105396

New issue
Copy link
New issue
Copy link
Closed
Closed
C API: Deprecate PyImport_ImportModuleNoBlock() function#105396
Copy link
Labels
topic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on Jun 6, 2023
Issue body actions

The PyImport_ImportModuleNoBlock() function is an alias to PyImport_ImportModule() since Python 3.3. I propose to deprecate it and schedule its removal in Python 3.15.

Linked PRs

  • gh-105396: Deprecate PyImport_ImportModuleNoBlock() function #105397

Activity

  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 6, 2023
  2. vstinner
    added a commit that references this issue on Jun 6, 2023

    pythongh-105396: Deprecate PyImport_ImportModuleNoBlock() function

    0399598
  3. vstinner commented on Jun 6, 2023

    @vstinner
    vstinner
    on Jun 6, 2023
    MemberAuthor
    More actions

    The PyImport_ImportModuleNoBlock() function is an alias to PyImport_ImportModule() since Python 3.3.

    It's related to this main importlib change in Python 3.3: A Finer-Grained Import Lock

    Previous versions of CPython have always relied on a global import lock. This led to unexpected annoyances, such as deadlocks when importing a module would trigger code execution in a different thread as a side-effect. Clumsy workarounds were sometimes employed, such as the PyImport_ImportModuleNoBlock() C API function.


    I propose to deprecate it and schedule its removal in Python 3.15.

    Since the function is part of the stable ABI, it has to stay at the ABI level, but will be removed from the C API level.

  4. AlexWaygood
    added
    topic-C-API
    on Jun 6, 2023
  5. vstinner
    added a commit that references this issue on Jun 9, 2023

    gh-105396: Deprecate PyImport_ImportModuleNoBlock() function (#105397)

    3e525d2
  6. vstinner
    closed this as completedon Jun 9, 2023
  7. sklam
    added 2 commits that reference this issue on Oct 21, 2024

    Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule.

    b82c07b

    Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule.

    128739e
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-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.