René's URL Explorer Experiment


Title: Deprecate private C API functions · Issue #141049 · python/cpython · GitHub

Open Graph Title: Deprecate private C API functions · Issue #141049 · python/cpython

X Title: Deprecate private C API functions · Issue #141049 · python/cpython

Description: I propose to deprecate 42 private functions of the C API: _PyArg_ParseTupleAndKeywordsFast(): see #112136 _PyCode_CheckLineNumber() _PyDict_GetItem_KnownHash() _PyDict_NewPresized(): see #139772 _PyErr_ChainExceptions1(): see #116809 _Py...

Open Graph Description: I propose to deprecate 42 private functions of the C API: _PyArg_ParseTupleAndKeywordsFast(): see #112136 _PyCode_CheckLineNumber() _PyDict_GetItem_KnownHash() _PyDict_NewPresized(): see #139772 _P...

X Description: I propose to deprecate 42 private functions of the C API: _PyArg_ParseTupleAndKeywordsFast(): see #112136 _PyCode_CheckLineNumber() _PyDict_GetItem_KnownHash() _PyDict_NewPresized(): see #139772 _P...

Opengraph URL: https://github.com/python/cpython/issues/141049

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deprecate private C API functions","articleBody":"I propose to deprecate 42 private functions of the C API:\n\n* ``_PyArg_ParseTupleAndKeywordsFast()``: see https://github.com/python/cpython/issues/112136\n* ``_PyCode_CheckLineNumber()``\n* ``_PyDict_GetItem_KnownHash()``\n* ``_PyDict_NewPresized()``: see https://github.com/python/cpython/issues/139772\n* ``_PyErr_ChainExceptions1()``: see https://github.com/python/cpython/issues/116809\n* ``_PyEval_SliceIndex()``\n* ``_PyEval_SliceIndexNotNone()``\n* ``_PyFrame_IsEntryFrame()``\n* ``_PyInterpreterState_GetEvalFrameFunc()``, ``_PyInterpreterState_SetEvalFrameFunc()``, ``_PyEval_EvalFrameDefault()``: PEP 523, see https://github.com/python/cpython/issues/141518\n* ``_PyInterpreterState_RequireIDRef()``\n* ``_PyInterpreterState_RequiresIDRef()``\n* ``_PyLong_AsByteArray()``: use ``PyLong_AsNativeBytes()``\n* ``_PyLong_Copy()``\n* ``_PyLong_FromByteArray()``: use ``PyLong_FromNativeBytes()``\n* ``_PyLong_GCD()``: call Python ``math.gcd()`` function\n* ``_PyLong_NumBits()``: call Python ``int.bit_length()`` method\n* ``_PyObject_CallMethodId()``: use ``PyObject_CallMethod()``\n* ``_PyObject_Dump()``: see https://github.com/python/cpython/issues/141070\n* ``_PyObject_FunctionStr()``\n* ``_PyObject_GetAttrId()``: use ``PyObject_GetAttr()``\n* ``_PyObject_GetDictPtr()``: see https://github.com/python/cpython/issues/139852\n* ``_PySlice_FromIndices()``: use ``PySlice_New()``\n* ``_PySlice_GetLongIndices()``\n* ``_PyStack_AsDict()``\n* ``_PyThread_CurrentFrames()``: call Python ``sys._current_frames()`` function\n* ``_PyType_Lookup()``, ``_PyType_LookupRef()``: see https://github.com/python/cpython/issues/139847\n* ``_PyType_Name()``: use ``PyType_GetName()``\n* ``_PyUnicode_FromId()``: use ``PyUnicode_FromString()`` and cache the result; see the old [discussion](https://discuss.python.org/t/c-api-how-much-private-is-the-private-py-identifier-api/29190) (2023)\n* ``_PyWeakref_ClearRef()``\n* ``_Py_BreakPoint()``\n* ``_Py_GetGlobalRefTotal()``, ``_Py_GetLegacyRefTotal()``, ``_PyInterpreterState_GetRefTotal()``: call Python ``sys.gettotalrefcount()`` function\n* ``_Py_HashDouble()``: see [decision issue #2](https://github.com/capi-workgroup/decisions/issues/2) and [decision issue #10](https://github.com/capi-workgroup/decisions/issues/10)\n* ``_Py_NewReference()``, ``_Py_NewReferenceNoTotal()``, ``_Py_ForgetReference()``, ``_Py_ResurrectReference()``: see [old issue](https://github.com/python/cpython/issues/85161) \n* ~``_Py_ReachedRecursionLimitWithMargin()``~: see https://github.com/python/cpython/pull/141951\n\nIf one of these functions is used, users should request a public C API replacing the private function.\n\nI propose to **not schedule the removal** of these functions for now.","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2025-11-05T15:10:00Z","url":"https://github.com/python/cpython/issues/141049"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:028a3a22-bc79-8e68-a73c-68aa7dd7f13d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDCEA:34CAB:34CD42D:4389C37:6B01EE11
html-safe-nonceaaa457b7e4e37b7d610c9337747307217773439fbf1b808788c67df071c5f5a9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0VBOjM0Q0FCOjM0Q0Q0MkQ6NDM4OUMzNzo2QjAxRUUxMSIsInZpc2l0b3JfaWQiOiIzNzA4NTI4MDU1NTQwNzMxMDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfce405c7fe4d6a13870e2300ad7f2f6942ac642c49b424f33d5b02a82bdb5d7a
hovercard-subject-tagissue:3591542612
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/141049/issue_layout
twitter:imagehttps://opengraph.githubassets.com/36bd27c65b0a36607b7a767fb7dec079b281bd216a0e61ee2fd192cfa85c374c/python/cpython/issues/141049
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/36bd27c65b0a36607b7a767fb7dec079b281bd216a0e61ee2fd192cfa85c374c/python/cpython/issues/141049
og:image:altI propose to deprecate 42 private functions of the C API: _PyArg_ParseTupleAndKeywordsFast(): see #112136 _PyCode_CheckLineNumber() _PyDict_GetItem_KnownHash() _PyDict_NewPresized(): see #139772 _P...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevstinner
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/141049#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F141049
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F141049
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/141049
Reloadhttps://github.com/python/cpython/issues/141049
Reloadhttps://github.com/python/cpython/issues/141049
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/141049
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/141049
Deprecate private C API functionshttps://github.com/python/cpython/issues/141049#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Nov 5, 2025https://github.com/python/cpython/issues/141049#issue-3591542612
[C API] Removed private _PyArg_Parser API has no replacement in Python 3.13 #112136https://github.com/python/cpython/issues/112136
[C API] Add PyDict_NewPresized() function #139772https://github.com/python/cpython/issues/139772
_PyErr_ChainExceptions1 no longer avallable to extension modules in Python 3.13 alpha headers #116809https://github.com/python/cpython/issues/116809
[C API] Promote PEP 523 functions to public functions: add PyUnstable_InterpreterState_SetEvalFrameFunc() #141518https://github.com/python/cpython/issues/141518
[C API] Promote _PyObject_Dump() to a public function #141070https://github.com/python/cpython/issues/141070
[C API] Add PyObject_GetDict() function #139852https://github.com/python/cpython/issues/139852
[C API] Add PyType_Lookup() function #139847https://github.com/python/cpython/issues/139847
discussionhttps://discuss.python.org/t/c-api-how-much-private-is-the-private-py-identifier-api/29190
decision issue #2https://github.com/capi-workgroup/decisions/issues/2
decision issue #10https://github.com/capi-workgroup/decisions/issues/10
old issuehttps://github.com/python/cpython/issues/85161
gh-130396: Remove _Py_ReachedRecursionLimitWithMargin() function #141951https://github.com/python/cpython/pull/141951
vstinnerhttps://github.com/vstinner
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
on Nov 5, 2025https://github.com/python/cpython/issues/141049#event-20733408704
StanFromIrelandhttps://github.com/StanFromIreland
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
on Nov 5, 2025https://github.com/python/cpython/issues/141049#event-20735120923
https://github.com/ZeroIntensity
ZeroIntensityhttps://github.com/ZeroIntensity
on Nov 5, 2025https://github.com/python/cpython/issues/141049#issuecomment-3492462593
https://github.com/AraHaan
AraHaanhttps://github.com/AraHaan
on Nov 5, 2025https://github.com/python/cpython/issues/141049#issuecomment-3492491873
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Nov 5, 2025https://github.com/python/cpython/issues/141049#issuecomment-3493197865
https://github.com/ZeroIntensity
ZeroIntensityhttps://github.com/ZeroIntensity
on Nov 5, 2025https://github.com/python/cpython/issues/141049#issuecomment-3493278225
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Nov 5, 2025https://github.com/python/cpython/issues/141049#issuecomment-3493493419
#141070https://github.com/python/cpython/issues/141070
https://github.com/skirpichev
skirpichevhttps://github.com/skirpichev
on Nov 5, 2025https://github.com/python/cpython/issues/141049#issuecomment-3493797282
https://github.com/encukou
encukouhttps://github.com/encukou
on Nov 6, 2025https://github.com/python/cpython/issues/141049#issuecomment-3495774201
since 2003https://docs.python.org/2.3/api/slice-objects.html
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Nov 6, 2025https://github.com/python/cpython/issues/141049#issuecomment-3496842475
#111139https://github.com/python/cpython/issues/111139
https://github.com/emmatyping
emmatypinghttps://github.com/emmatyping
on Nov 7, 2025https://github.com/python/cpython/issues/141049#issuecomment-3505283789
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Nov 8, 2025https://github.com/python/cpython/issues/141049#issuecomment-3506727527
https://github.com/emmatyping
emmatypinghttps://github.com/emmatyping
on Nov 8, 2025https://github.com/python/cpython/issues/141049#issuecomment-3506787679
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Nov 13, 2025https://github.com/python/cpython/issues/141049#issuecomment-3528707551
#141518https://github.com/python/cpython/issues/141518
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Dec 3, 2025https://github.com/python/cpython/issues/141049#issuecomment-3606976639
#142217https://github.com/python/cpython/issues/142217
#142221https://github.com/python/cpython/pull/142221
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on May 29, 2026https://github.com/python/cpython/issues/141049#issuecomment-4574840461
vstinnerhttps://github.com/vstinner
not plannedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on May 29, 2026https://github.com/python/cpython/issues/141049#event-26108655756
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/141049
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/141049
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.