René's URL Explorer Experiment


Title: The Python C API should only define macros with a name starting wit `Py` · Issue #157695 · python/cpython · GitHub

Open Graph Title: The Python C API should only define macros with a name starting wit `Py` · Issue #157695 · python/cpython

X Title: The Python C API should only define macros with a name starting wit `Py` · Issue #157695 · python/cpython

Description: Currently, the Python C API defines 472 macros with a name which doesn't start with Py, PY, _Py or _PY prefix. I propose adding a check to prevent adding new macros which doesn't respect this convention. Existing invalid names will be ad...

Open Graph Description: Currently, the Python C API defines 472 macros with a name which doesn't start with Py, PY, _Py or _PY prefix. I propose adding a check to prevent adding new macros which doesn't respect this conve...

X Description: Currently, the Python C API defines 472 macros with a name which doesn't start with Py, PY, _Py or _PY prefix. I propose adding a check to prevent adding new macros which doesn't respect th...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The Python C API should only define macros with a name starting wit `Py`","articleBody":"Currently, the Python C API defines 472 macros with a name which doesn't start with `Py`, `PY`, `_Py` or `_PY` prefix.\n\nI propose adding a check to prevent adding **new macros** which doesn't respect this convention. Existing invalid names will be added to an ignore list for now.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-157696\n* gh-157752\n* gh-157821\n* gh-157858\n* gh-157939\n* gh-157948\n* gh-158926\n* gh-162184\n* gh-162212\n* gh-162213\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2026-09-17T18:49:02Z","url":"https://github.com/python/cpython/issues/157695"}

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:754b59ee-361d-8c77-ad85-bbe5988c8979
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBF4E:24645:16BFE19:1DFE9A4:6B02023F
html-safe-noncef3d3029b08277b772d067ce840a820b93853e62d6d81e81208cdcac1ebf63e36
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjRFOjI0NjQ1OjE2QkZFMTk6MURGRTlBNDo2QjAyMDIzRiIsInZpc2l0b3JfaWQiOiI4OTgxMzY2NjgxODEzMjU0NzE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace568a00dd7327d3c9db682cfd7fc071fd5bb80ee4109b77fe1cedfd20a8652dc
hovercard-subject-tagissue:5491426796
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/157695/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dd9736dac3ba1e27e518cb5108face9f6ed244611231fb43dca2c937c99a6bf5/python/cpython/issues/157695
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dd9736dac3ba1e27e518cb5108face9f6ed244611231fb43dca2c937c99a6bf5/python/cpython/issues/157695
og:image:altCurrently, the Python C API defines 472 macros with a name which doesn't start with Py, PY, _Py or _PY prefix. I propose adding a check to prevent adding new macros which doesn't respect this conve...
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/157695#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F157695
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%2F157695
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/157695
Reloadhttps://github.com/python/cpython/issues/157695
Reloadhttps://github.com/python/cpython/issues/157695
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/157695
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/157695
The Python C API should only define macros with a name starting wit Pyhttps://github.com/python/cpython/issues/157695#top
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%22
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
infraCI, GitHub Actions, buildbots, Dependabot, etc.https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22infra%22
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
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Sep 17, 2026https://github.com/python/cpython/issues/157695#issue-5491426796
gh-157695: Check that C API macros start with "Py" #157696https://github.com/python/cpython/pull/157696
gh-157695: Rename HAVE_FLOAT16 macro to _Py_HAVE_FLOAT16 #157752https://github.com/python/cpython/pull/157752
gh-157695: Rename HAVE_ICONV to _Py_HAVE_ICONV #157821https://github.com/python/cpython/pull/157821
gh-157695: Rename HAVE_ACOSPI to _Py_HAVE_ACOSPI #157858https://github.com/python/cpython/pull/157858
gh-157695: Rename HAVE_GETTID to _Py_HAVE_GETTID #157939https://github.com/python/cpython/pull/157939
gh-157695: Fix acospi() detection in configure.ac #157948https://github.com/python/cpython/pull/157948
gh-157695: Parse also _Py_HAVE_xxx variables in sysconfig #158926https://github.com/python/cpython/pull/158926
gh-157695: Rename HAVE_GETDENTS64 to _Py_HAVE_GETDENTS64 #162184https://github.com/python/cpython/pull/162184
gh-157695: Make HAVE_CURSES_xxx macros private #162212https://github.com/python/cpython/pull/162212
gh-157695: Make HAVE_RL_CHANGE_ENVIRONMENT macro private #162213https://github.com/python/cpython/pull/162213
Nexthttps://github.com/python/cpython/issues/157695?timeline_page=1
vstinnerhttps://github.com/vstinner
topic-C-APIhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-C-API%22
on Sep 17, 2026https://github.com/python/cpython/issues/157695#event-31342511862
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Sep 17, 2026https://github.com/python/cpython/issues/157695#issuecomment-5719933959
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Sep 17, 2026https://github.com/python/cpython/issues/157695#issuecomment-5720032414
StanFromIrelandhttps://github.com/StanFromIreland
infraCI, GitHub Actions, buildbots, Dependabot, etc.https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22infra%22
on Sep 17, 2026https://github.com/python/cpython/issues/157695#event-31346776002
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Sep 17, 2026https://github.com/python/cpython/issues/157695#issuecomment-5720631685
@encukouhttps://github.com/encukou
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Sep 17, 2026https://github.com/python/cpython/issues/157695#issuecomment-5722776630
gh-149685https://github.com/python/cpython/issues/149685
vstinnerhttps://github.com/vstinner
on Sep 19, 2026https://github.com/python/cpython/issues/157695#event-31438674726
gh-157695: Rename HAVE_FLOAT16 macro to _Py_HAVE_FLOAT16 (#157752)https://github.com/python/cpython/commit/1d0f1ad0aa7a933e8d03f855d9b5eed7e00e775d
gh-157695https://github.com/python/cpython/issues/157695
#157752https://github.com/python/cpython/pull/157752
1d0f1adhttps://github.com/python/cpython/commit/1d0f1ad0aa7a933e8d03f855d9b5eed7e00e775d
gh-157695: Check that C API macros start with "Py" (#157696)https://github.com/python/cpython/commit/643013f58f703b39771fa35bbdba0ac762dd840a
gh-157695https://github.com/python/cpython/issues/157695
#157696https://github.com/python/cpython/pull/157696
643013fhttps://github.com/python/cpython/commit/643013f58f703b39771fa35bbdba0ac762dd840a
gh-157695: Rename HAVE_ICONV to _Py_HAVE_ICONV (#157821)https://github.com/python/cpython/commit/315ed1669a200c0d6f74c78b65cc2a7d21cede0d
gh-157695https://github.com/python/cpython/issues/157695
#157821https://github.com/python/cpython/pull/157821
315ed16https://github.com/python/cpython/commit/315ed1669a200c0d6f74c78b65cc2a7d21cede0d
gh-157695: Rename HAVE_ACOSPI to _Py_HAVE_ACOSPI (#157858)https://github.com/python/cpython/commit/a32139044a80b8973ff8e547448a2549a8f87ad9
gh-157695https://github.com/python/cpython/issues/157695
#157858https://github.com/python/cpython/pull/157858
a321390https://github.com/python/cpython/commit/a32139044a80b8973ff8e547448a2549a8f87ad9
https://github.com/Locked-chess-official
Locked-chess-officialhttps://github.com/Locked-chess-official
on Sep 22, 2026https://github.com/python/cpython/issues/157695#issuecomment-5774758411
https://github.com/encukou
encukouhttps://github.com/encukou
on Sep 22, 2026https://github.com/python/cpython/issues/157695#issuecomment-5775154324
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Sep 22, 2026https://github.com/python/cpython/issues/157695#issuecomment-5777023889
picnixzhttps://github.com/picnixz
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
on Sep 22, 2026https://github.com/python/cpython/issues/157695#event-31613943320
vstinnerhttps://github.com/vstinner
on Oct 6, 2026https://github.com/python/cpython/issues/157695#event-32630198457
gh-157695: Parse also _Py_HAVE_xxx variables in sysconfig (#158926)https://github.com/python/cpython/commit/978a8befa5ec9b28b161a56b16d326330aef4733
gh-157695https://github.com/python/cpython/issues/157695
#158926https://github.com/python/cpython/pull/158926
978a8behttps://github.com/python/cpython/commit/978a8befa5ec9b28b161a56b16d326330aef4733
[3.15] gh-158893: Make os.strerror() thread-safe (#159120)https://github.com/python/cpython/commit/c774d1526f32057c3a34e0ff0a217a1acc8bf43a
gh-158893https://github.com/python/cpython/issues/158893
#159120https://github.com/python/cpython/pull/159120
c774d15https://github.com/python/cpython/commit/c774d1526f32057c3a34e0ff0a217a1acc8bf43a
[3.15] pythongh-158893: Make os.strerror() thread-safe (python#159120)https://github.com/vstinner/cpython/commit/955973435e083d94df1fc24e7dd18870da50d36f
pythongh-158893https://github.com/python/cpython/issues/158893
python#159120https://github.com/python/cpython/pull/159120
9559734https://github.com/vstinner/cpython/commit/955973435e083d94df1fc24e7dd18870da50d36f
[3.14] gh-158893: Make os.strerror() thread-safe (#159120) (#159145)https://github.com/python/cpython/commit/b23d657d0cc029a83cfe8a1a122005b4601c8e7e
gh-158893https://github.com/python/cpython/issues/158893
#159120https://github.com/python/cpython/pull/159120
#159145https://github.com/python/cpython/pull/159145
b23d657https://github.com/python/cpython/commit/b23d657d0cc029a83cfe8a1a122005b4601c8e7e
kevinprimeraquecreo-stackhttps://github.com/kevinprimeraquecreo-stack
Project_VKhttps://github.com/users/kevinprimeraquecreo-stack/projects/1
on Oct 18, 2026https://github.com/python/cpython/issues/157695#event-33592125129
github-project-automationhttps://github.com/apps/github-project-automation
Project_VKhttps://github.com/users/kevinprimeraquecreo-stack/projects/1
on Oct 18, 2026https://github.com/python/cpython/issues/157695
kevinprimeraquecreo-stackhttps://github.com/kevinprimeraquecreo-stack
Project_VKhttps://github.com/users/kevinprimeraquecreo-stack/projects/1
on Oct 18, 2026https://github.com/python/cpython/issues/157695#event-33592175683
vstinnerhttps://github.com/vstinner
on Nov 18, 2026https://github.com/python/cpython/issues/157695#event-36526047403
gh-157695: Rename HAVE_GETDENTS64 to _Py_HAVE_GETDENTS64 (#162184)https://github.com/python/cpython/commit/4b8e53431f0bd02aeeb13c2e2a7b7fe51576774c
gh-157695https://github.com/python/cpython/issues/157695
#162184https://github.com/python/cpython/pull/162184
4b8e534https://github.com/python/cpython/commit/4b8e53431f0bd02aeeb13c2e2a7b7fe51576774c
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Nov 18, 2026https://github.com/python/cpython/issues/157695#issuecomment-6978714000
vstinnerhttps://github.com/vstinner
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 18, 2026https://github.com/python/cpython/issues/157695#event-36526585931
vstinnerhttps://github.com/vstinner
on Nov 18, 2026https://github.com/python/cpython/issues/157695#event-36543180426
pythongh-157695: Make HAVE_CURSES_xxx macros privatehttps://github.com/vstinner/cpython/commit/8f8e5cf03858a90c8f071e41d3361de2579b1902
pythongh-157695https://github.com/python/cpython/issues/157695
8f8e5cfhttps://github.com/vstinner/cpython/commit/8f8e5cf03858a90c8f071e41d3361de2579b1902
pythongh-157695: Rename HAVE_RL_CHANGE_ENVIRONMENT macrohttps://github.com/vstinner/cpython/commit/12adaf004e865f86961dc03969aee4ad82ed3da3
pythongh-157695https://github.com/python/cpython/issues/157695
12adaf0https://github.com/vstinner/cpython/commit/12adaf004e865f86961dc03969aee4ad82ed3da3
pythongh-157695: Make HAVE_RL_CHANGE_ENVIRONMENT macro privatehttps://github.com/vstinner/cpython/commit/720c7b0e415747a6a2dfc3e481ddd40e538ac1c8
pythongh-157695https://github.com/python/cpython/issues/157695
720c7b0https://github.com/vstinner/cpython/commit/720c7b0e415747a6a2dfc3e481ddd40e538ac1c8
gh-157695: Make HAVE_RL_CHANGE_ENVIRONMENT macro private (#162213)https://github.com/python/cpython/commit/94250a7c0f6cbf51ff6b13873d1e611e417061af
gh-157695https://github.com/python/cpython/issues/157695
#162213https://github.com/python/cpython/pull/162213
94250a7https://github.com/python/cpython/commit/94250a7c0f6cbf51ff6b13873d1e611e417061af
gh-157695: Make HAVE_CURSES_xxx macros private (#162212)https://github.com/python/cpython/commit/0b5e26c6b1567f93abb6d3c755879d4e8070d503
gh-157695https://github.com/python/cpython/issues/157695
#162212https://github.com/python/cpython/pull/162212
0b5e26chttps://github.com/python/cpython/commit/0b5e26c6b1567f93abb6d3c755879d4e8070d503
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/157695
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/157695
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%22
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
infraCI, GitHub Actions, buildbots, Dependabot, etc.https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22infra%22
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
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.