Skip to content

RFC: reminder to remove PyINCREF(Py_None) when support for Python 3.11 is dropped #18229

Description

@neutrinoceros

I noticed we have 19 occurrences of Py_INCREF(Py_None); in thecode base, which I believe becomes a no-op in Python 3.12 following PEP 683, which made None an "immortal" object, i.e., not participate to reference counting.
These lines should be preserved as long as we support Python 3.11, but can be cleaned-up after it's dropped.

Blocked by:

Activity

  1. anaclaragalvao commented on Apr 8, 2026

    @anaclaragalvao
    Contributor

    hey guys. do you know if this issue is doable right now, if Python 3.11 was dropped?

  2. neutrinoceros commented on Apr 9, 2026

    @neutrinoceros
    ContributorAuthor

    we have no plans for dropping Python 3.11 yet, so this issue is still dormant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions