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

github.com

Tin mới

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

python/cpython:master

ericsnowcurrently:globals-immortal-objects-flags

4951703 Add support for immortal objects (large neg int means "immortal"). ericsnowcurrently Dec 10, 2020

4b1eea3 Switch to a positive number. ericsnowcurrently Dec 10, 2020

a34f285 Add Py_IMMORTAL_CONST_REFCOUNTS. ericsnowcurrently Dec 10, 2020

3966551 Add a NEWS entry. ericsnowcurrently Mar 11, 2021

1a3b4da Add docs. ericsnowcurrently Mar 11, 2021

728f24b Drop special handling of negative refcounts. ericsnowcurrently Mar 11, 2021

2536e8b Do not reset the refcount in _PyObject_IsImmortal(). ericsnowcurrently Mar 11, 2021

518e9e8 Do not allow immortal objects in the limited API. ericsnowcurrently Mar 11, 2021

277e1ea Do not re-declare _PyObject_IsImmortal. ericsnowcurrently Mar 11, 2021

edef342 Go back to using Py_SET_REFCNT() in _Py_NewReference(). ericsnowcurrently Mar 12, 2021

4d22e00 Fix an accidental line removal. ericsnowcurrently Mar 12, 2021

838f88f Add more comments and drop the internal-only macros from the docs. ericsnowcurrently Mar 12, 2021

00948a0 Drop a holdover from immortal objects with negative refcounts. ericsnowcurrently Mar 15, 2021

00504d9 Move _Py_SET_REFCNT() out of the header file. ericsnowcurrently Mar 15, 2021

e6fc84f Define _py_is_immortal() only for Py_IMMORTAL_CONST_REFCOUNTS. ericsnowcurrently Mar 15, 2021

f103804 Drop Py_IMMORTAL_CONST_REFCOUNTS and make immortal objects internal. ericsnowcurrently Mar 12, 2021

Learn more about hiding disruptive comments

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