bpo-43503: Make limited API objects effectively immutable. by ericsnowcurrently · Pull Request #24828 · python/cpython · GitHub

github.com

Tin mới

ericsnowcurrently:globals-immortal-objects-flags

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

awaiting core review

awaiting core review

Globals immortal objects flags ericsnowcurrently/cpython#9

"immortal" objects faster-cpython/ideas#14

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/pythoncapi/pythoncapi_compat

If we don't do something like this, how are we going to preserve backwards compatibility the existing C API where PyExc_Exception and others are part of the public C API? That is necessary if we ever want to obtain the g

Drop a holdover from immortal objects with negative refcounts.

Move _Py_SET_REFCNT() out of the header file.

Define _py_is_immortal() only for Py_IMMORTAL_CONST_REFCOUNTS.

Drop Py_IMMORTAL_CONST_REFCOUNTS and make immortal objects internal.

Faster startup -- Experiment B -- streamline and tweak faster-cpython/ideas#65

gh-84436: Implement Immortal Objects #19474

[subinterpreters] Per-interpreter singletons (None, True, False, etc.) #83692

[subinterpreters] PyObject statics exposed in the limited API break isolation. #87669

Fixing Copy on Writes from reference counting and immortal objects #84436