Skip to content

Many functions in dictobject.c take a PyInterpreterState *interp parameter, but none of them use it. #142890

Description

@markshannon

The parameter was introduced when the global dictionary version number was moved to the interpreter state.
#102338

We no longer have a global dictionary version number so this parameter can be removed.
https://peps.python.org/pep-0699/

Linked PRs

Activity

  1. kumaraditya303 commented on Dec 17, 2025

    @kumaraditya303
    Contributor

    I had removed the redundant ones in #136673, the rest of functions need to it to call _PyDict_NotifyEvent. In which functions is it unused?

  2. added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    type-refactorCode refactoring (with no changes in behavior)
    on Dec 17, 2025
  3. colesbury commented on Dec 17, 2025

    @colesbury
    Contributor

    It looks like _PyDict_NotifyEvent doesn't use the interp argument, so we can probably remove it there too.

  4. kumaraditya303 commented on Dec 18, 2025

    @kumaraditya303
    Contributor

    #142923 removes it from rest of dict functions and _PyDict_NotifyEvent.

  5. added a commit that references this issue on Dec 18, 2025
  6. added a commit that references this issue on Dec 18, 2025
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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-refactorCode refactoring (with no changes in behavior)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions