René's URL Explorer Experiment


Title: Py_GIL_DISABLED not defined in "free-threaded" Windows C-API extensions · Issue #111650 · python/cpython · GitHub

Open Graph Title: Py_GIL_DISABLED not defined in "free-threaded" Windows C-API extensions · Issue #111650 · python/cpython

X Title: Py_GIL_DISABLED not defined in "free-threaded" Windows C-API extensions · Issue #111650 · python/cpython

Description: Bug report On Windows, the Py_GIL_DISABLED macro is not defined when building C API extensions with the free-threaded build of CPython 3.13 (i.e., --disable-gil). Now that biased reference counting (6dfb8fe) landed, this leads to incorre...

Open Graph Description: Bug report On Windows, the Py_GIL_DISABLED macro is not defined when building C API extensions with the free-threaded build of CPython 3.13 (i.e., --disable-gil). Now that biased reference counting...

X Description: Bug report On Windows, the Py_GIL_DISABLED macro is not defined when building C API extensions with the free-threaded build of CPython 3.13 (i.e., --disable-gil). Now that biased reference counting...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Py_GIL_DISABLED not defined in \"free-threaded\" Windows C-API extensions ","articleBody":"# Bug report\r\n\r\nOn Windows, the `Py_GIL_DISABLED` macro is not defined when building C API extensions with the free-threaded build of CPython 3.13 (i.e., `--disable-gil`). Now that biased reference counting (6dfb8fe) landed, this leads to incorrect/failed compilation of extensions on Windows [^1]. The problem does not occur on Linux/macOS and other `./configure` based builds because that build system defines the `Py_NOGIL` macro as part of `pyconfig.h`. On Windows, `Py_GIL_DISABLED` instead defined as a pre-processor definition in [`pyproject.props`](https://github.com/python/cpython/blob/4fe22c73770fe86b01ef7a4f1f38e7e925c0e090/PCbuild/pyproject.props#L43), but that's used by C-API extensions.\r\n\r\nAmong other problems, this leads to `test_peg_generator` failing on the nogil Windows buildbot ([example failure](https://buildbot.python.org/all/#/builders/1241/builds/331)).\r\n\r\nI can think of two possible approaches to fixing this:\r\n\r\n1) Modify setuptools (maybe setuptools.distutils?) to define `Py_GIL_DISABLED` when invoking the compiler if `sysconfig.get_config_var(\"Py_NOGIL\")` is `True`.\r\n2) In the CPython Windows build, generate a header file defining/undefing `Py_GIL_DISABLED` depending on if the build is invoked with `--disable-gil` or not.\r\n\r\nThe first option seems a little more straightforward to me, but there is a risk that we might encounter this same issue across multiple extension build systems. The second option seems like it would more robustly address this issue.\r\n\r\n[^1]: Modules built as part of the CPython build (i.e., standard library modules) still work\r\n\r\n\u003c!-- gh-linked-prs -->\r\n### Linked PRs\r\n* gh-112179\r\n* gh-112778\r\n\u003c!-- /gh-linked-prs -->\r\n","author":{"url":"https://github.com/colesbury","@type":"Person","name":"colesbury"},"datePublished":"2023-11-02T15:12:33Z","url":"https://github.com/python/cpython/issues/111650"}

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:ce12d206-8649-6676-5ec2-93b9f9cfdd14
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id88FC:380435:AD3C00:DA7B0C:6B0222E8
html-safe-noncef20c92ec1e3b26e76e969b4133fb56edda806eaeadb538d85da30aa892ecd7e4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEZDOjM4MDQzNTpBRDNDMDA6REE3QjBDOjZCMDIyMkU4IiwidmlzaXRvcl9pZCI6IjQwNDQyNTIwNTIyMjQ4NzcyODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7897cf0d20b84e94f3bf4c32cb45b9e6fbcc5de7d792ead78a3510ad847a9723
hovercard-subject-tagissue:1974474141
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/111650/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a971c6ef9255ad33faf68cdccc9357193aec4ff3f2a6c3bb6a018d1605b57174/python/cpython/issues/111650
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a971c6ef9255ad33faf68cdccc9357193aec4ff3f2a6c3bb6a018d1605b57174/python/cpython/issues/111650
og:image:altBug report On Windows, the Py_GIL_DISABLED macro is not defined when building C API extensions with the free-threaded build of CPython 3.13 (i.e., --disable-gil). Now that biased reference counting...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecolesbury
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-targetcanary-1
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/111650#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F111650
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%2F111650
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/111650
Reloadhttps://github.com/python/cpython/issues/111650
Reloadhttps://github.com/python/cpython/issues/111650
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/111650
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/111650
Py_GIL_DISABLED not defined in "free-threaded" Windows C-API extensions https://github.com/python/cpython/issues/111650#top
https://github.com/zooba
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Nov 2, 2023https://github.com/python/cpython/issues/111650#issue-1974474141
6dfb8fehttps://github.com/python/cpython/commit/6dfb8fe0236718e9afc8136ff2b58dcfbc182022
1https://github.com/python/cpython/issues/111650#user-content-fn-1-61c6ee720510e4680181bd9aca4d9dfd
pyproject.propshttps://github.com/python/cpython/blob/4fe22c73770fe86b01ef7a4f1f38e7e925c0e090/PCbuild/pyproject.props#L43
example failurehttps://buildbot.python.org/all/#/builders/1241/builds/331
gh-111650: Generate pyconfig.h on Windows #112179https://github.com/python/cpython/pull/112179
gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows #112778https://github.com/python/cpython/pull/112778
↩https://github.com/python/cpython/issues/111650#user-content-fnref-1-61c6ee720510e4680181bd9aca4d9dfd
Nexthttps://github.com/python/cpython/issues/111650?timeline_page=1
colesburyhttps://github.com/colesbury
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%22
on Nov 2, 2023https://github.com/python/cpython/issues/111650#event-10845435797
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Nov 2, 2023https://github.com/python/cpython/issues/111650#issuecomment-1790943858
@zoobahttps://github.com/zooba
https://github.com/corona10
corona10https://github.com/corona10
on Nov 2, 2023https://github.com/python/cpython/issues/111650#issuecomment-1791035512
example failurehttps://buildbot.python.org/all/#/builders/1241/builds/331
https://github.com/python/cpython/actions/runs/6695685454/job/18191835485https://github.com/python/cpython/actions/runs/6695685454/job/18191835485
https://github.com/zooba
zoobahttps://github.com/zooba
on Nov 2, 2023https://github.com/python/cpython/issues/111650#issuecomment-1791100792
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Nov 16, 2023https://github.com/python/cpython/issues/111650#issuecomment-1815246009
@zoobahttps://github.com/zooba
colesburyhttps://github.com/colesbury
on Nov 16, 2023https://github.com/python/cpython/issues/111650#event-10985860711
pythongh-111650: Generate pyconfig.h on Windowshttps://github.com/colesbury/cpython/commit/d282ad1ac73d41eefd0f50b53c82a1301e5b189f
pythongh-111650https://github.com/python/cpython/issues/111650
d282ad1https://github.com/colesbury/cpython/commit/d282ad1ac73d41eefd0f50b53c82a1301e5b189f
pythongh-111650: Generate pyconfig.h on Windowshttps://github.com/colesbury/cpython/commit/5515cdfe14d4299afee7c67abc6d64b9bfd4f35e
pythongh-111650https://github.com/python/cpython/issues/111650
5515cdfhttps://github.com/colesbury/cpython/commit/5515cdfe14d4299afee7c67abc6d64b9bfd4f35e
pythongh-111650: Generate pyconfig.h on Windowshttps://github.com/colesbury/cpython/commit/10ceec5e1ab95b59a52ee66a9b3a57ab19cbd5a0
pythongh-111650https://github.com/python/cpython/issues/111650
10ceec5https://github.com/colesbury/cpython/commit/10ceec5e1ab95b59a52ee66a9b3a57ab19cbd5a0
pythongh-111650: Generate pyconfig.h on Windowshttps://github.com/colesbury/cpython/commit/e4c3520a4719a6b648adc2cac2c30802578f16dd
pythongh-111650https://github.com/python/cpython/issues/111650
e4c3520https://github.com/colesbury/cpython/commit/e4c3520a4719a6b648adc2cac2c30802578f16dd
pythongh-111650: Generate pyconfig.h on Windowshttps://github.com/colesbury/cpython/commit/912e1692ef4fe0091b9cbf6537b2567d509ed9f4
pythongh-111650https://github.com/python/cpython/issues/111650
912e169https://github.com/colesbury/cpython/commit/912e1692ef4fe0091b9cbf6537b2567d509ed9f4
pythongh-111650: Generate pyconfig.h on Windowshttps://github.com/colesbury/cpython/commit/6585ab1f557e68202e3313c76b7a909464322a7b
pythongh-111650https://github.com/python/cpython/issues/111650
6585ab1https://github.com/colesbury/cpython/commit/6585ab1f557e68202e3313c76b7a909464322a7b
https://github.com/zooba
zoobahttps://github.com/zooba
on Nov 29, 2023https://github.com/python/cpython/issues/111650#issuecomment-1831369820
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Nov 29, 2023https://github.com/python/cpython/issues/111650#issuecomment-1832311649
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Dec 4, 2023https://github.com/python/cpython/issues/111650#issuecomment-1839173663
zoobahttps://github.com/zooba
on Dec 5, 2023https://github.com/python/cpython/issues/111650#event-11157584333
https://github.com/zooba
zoobahttps://github.com/zooba
on Dec 5, 2023https://github.com/python/cpython/issues/111650#issuecomment-1841384252
zoobahttps://github.com/zooba
on Dec 5, 2023https://github.com/python/cpython/issues/111650#event-11160173485
pythongh-111650: Ensure pyconfig.h includes PY_GIL_DISABLED on Windowshttps://github.com/zooba/cpython/commit/4feb2cea2ed6344cb66f4b6f543a76e9a0d1d908
pythongh-111650https://github.com/python/cpython/issues/111650
4feb2cehttps://github.com/zooba/cpython/commit/4feb2cea2ed6344cb66f4b6f543a76e9a0d1d908
colesburyhttps://github.com/colesbury
on Dec 6, 2023https://github.com/python/cpython/issues/111650#event-11170040489
zoobahttps://github.com/zooba
on Dec 6, 2023https://github.com/python/cpython/issues/111650#event-11173920588
Merge remote-tracking branch 'upstream/main' into pythongh-111650https://github.com/zooba/cpython/commit/094ccd9621027cc60bc9ad3f5fc845ad35ffd9aa
pythongh-111650https://github.com/python/cpython/issues/111650
094ccd9https://github.com/zooba/cpython/commit/094ccd9621027cc60bc9ad3f5fc845ad35ffd9aa
Merge remote-tracking branch 'upstream/main' into pythongh-111650https://github.com/zooba/cpython/commit/85811ea7de6e04042fae3fc45997f37e6ee278b3
pythongh-111650https://github.com/python/cpython/issues/111650
85811eahttps://github.com/zooba/cpython/commit/85811ea7de6e04042fae3fc45997f37e6ee278b3
gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-…https://github.com/python/cpython/commit/79dad03747fe17634136209f1bcaf346a8c10617
gh-111650https://github.com/python/cpython/issues/111650
GH-…https://github.com/python/cpython/pull/112778
79dad03https://github.com/python/cpython/commit/79dad03747fe17634136209f1bcaf346a8c10617
https://github.com/ambv
ambvhttps://github.com/ambv
on Jan 7, 2024https://github.com/python/cpython/issues/111650#issuecomment-1880118418
ambvhttps://github.com/ambv
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 7, 2024https://github.com/python/cpython/issues/111650#event-11411632068
aiskhttps://github.com/aisk
on Feb 11, 2024https://github.com/python/cpython/issues/111650#event-11766814912
pythongh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (https://github.com/aisk/cpython/commit/aa326a6050f621ad1c069db1ebaef57e8a2e0a69
pythongh-111650https://github.com/python/cpython/issues/111650
aa326a6https://github.com/aisk/cpython/commit/aa326a6050f621ad1c069db1ebaef57e8a2e0a69
Glyphackhttps://github.com/Glyphack
on Sep 2, 2024https://github.com/python/cpython/issues/111650#event-14106081741
pythongh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (https://github.com/Glyphack/cpython/commit/82fcdccbc500812ed6d5cbed09f8f36d90bddf66
pythongh-111650https://github.com/python/cpython/issues/111650
82fcdcchttps://github.com/Glyphack/cpython/commit/82fcdccbc500812ed6d5cbed09f8f36d90bddf66
cvijdea-bdhttps://github.com/cvijdea-bd
on Sep 27, 2024https://github.com/python/cpython/issues/111650#event-14435536717
Define Py_GIL_DISABLED macro on Windowshttps://github.com/cvijdea-bd/psutil/commit/b5e82ba1e2d360594abe962e4dd04e4bf70973d0
b5e82bahttps://github.com/cvijdea-bd/psutil/commit/b5e82ba1e2d360594abe962e4dd04e4bf70973d0
Define Py_GIL_DISABLED macro on Windowshttps://github.com/cvijdea-bd/psutil/commit/08ea7c80f1926ee7632c5f24a2853d357d1f3838
08ea7c8https://github.com/cvijdea-bd/psutil/commit/08ea7c80f1926ee7632c5f24a2853d357d1f3838
giampaolohttps://github.com/giampaolo
on Sep 30, 2024https://github.com/python/cpython/issues/111650#event-14461304749
Define Py_GIL_DISABLED macro on Windows (#2442)https://github.com/giampaolo/psutil/commit/a06e7620b0ea0c4d80fc270e1307e574703629fc
#2442https://github.com/giampaolo/psutil/pull/2442
a06e762https://github.com/giampaolo/psutil/commit/a06e7620b0ea0c4d80fc270e1307e574703629fc
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/111650
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/111650
zoobahttps://github.com/zooba
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%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.