René's URL Explorer Experiment


Title: Forcing enabling the GIL doesn't seem to work with PEP 793 initialization · Issue #141780 · python/cpython · GitHub

Open Graph Title: Forcing enabling the GIL doesn't seem to work with PEP 793 initialization · Issue #141780 · python/cpython

X Title: Forcing enabling the GIL doesn't seem to work with PEP 793 initialization · Issue #141780 · python/cpython

Description: Bug report Bug description: #include static int examplemodule_exec(PyObject *module) { // Yes I know there's no error checking... PyObject *gil_enabled = PySys_GetObject("_is_gil_enabled"); PyObject *result = PyObject_CallNoAr...

Open Graph Description: Bug report Bug description: #include static int examplemodule_exec(PyObject *module) { // Yes I know there's no error checking... PyObject *gil_enabled = PySys_GetObject("_is_gil_enabled...

X Description: Bug report Bug description: #include <Python.h> static int examplemodule_exec(PyObject *module) { // Yes I know there's no error checking... PyObject *gil_enabled = PySys_GetObject("...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Forcing enabling the GIL doesn't seem to work with PEP 793 initialization","articleBody":"# Bug report\n\n### Bug description:\n\n```c\n#include \u003cPython.h>\n\nstatic int\nexamplemodule_exec(PyObject *module) {\n    // Yes I know there's no error checking...\n    PyObject *gil_enabled = PySys_GetObject(\"_is_gil_enabled\");\n    PyObject *result = PyObject_CallNoArgs(gil_enabled);\n    printf(\"gil enabled: \");\n    PyObject_Print(result, stdout, 0);\n    printf(\"\\n\");\n    Py_DECREF(result);\n    return 0;\n}\n\nstatic PyModuleDef_Slot examplemodule_slots[] = {\n    {Py_mod_name, \"examplemodule\"},\n    {Py_mod_gil, Py_MOD_GIL_USED},\n    {Py_mod_exec, (void*)examplemodule_exec},\n    {0}\n};\n\nPyMODEXPORT_FUNC\nPyModExport_examplemodule(void)\n{\n    return examplemodule_slots;\n}\n```\n\nI believe that the code above should print \"gil enabled: True\". However when I run it on Python 3.15.0a2 freethreading it prints \"gil enabled: False\".\n\nI don't believe this is an issue in the old style `PyInit_` initialization.\n\n### CPython versions tested on:\n\n3.15\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-141785\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/da-woods","@type":"Person","name":"da-woods"},"datePublished":"2025-11-20T08:10:04Z","url":"https://github.com/python/cpython/issues/141780"}

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:1b5b5f77-c64a-2538-248e-c9af2047b86d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCEDE:BACA4:33EF45F:4511A62:6B004487
html-safe-nonce6fbda959bdfb261f918f2323c7e1618588c1d08215db0257cdf1622d701584ae
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRURFOkJBQ0E0OjMzRUY0NUY6NDUxMUE2Mjo2QjAwNDQ4NyIsInZpc2l0b3JfaWQiOiI5MDA4NTc5MjU1Mjk4MTgwMjMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace802714d33a918d8608c8891b76dd50d0eac766c7a95e6da7d3a0b9b2bfb4ab5
hovercard-subject-tagissue:3646006480
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/141780/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3a9ab6eaecdad9af828b59376561a99871748163adb96ec96cd555abcd738d5b/python/cpython/issues/141780
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3a9ab6eaecdad9af828b59376561a99871748163adb96ec96cd555abcd738d5b/python/cpython/issues/141780
og:image:altBug report Bug description: #include static int examplemodule_exec(PyObject *module) { // Yes I know there's no error checking... PyObject *gil_enabled = PySys_GetObject("_is_gil_enabled...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameda-woods
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
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
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/141780#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F141780
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%2F141780
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/141780
Reloadhttps://github.com/python/cpython/issues/141780
Reloadhttps://github.com/python/cpython/issues/141780
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/141780
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/141780
Forcing enabling the GIL doesn't seem to work with PEP 793 initializationhttps://github.com/python/cpython/issues/141780#top
https://github.com/encukou
3.15bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.15%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%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/da-woods
da-woodshttps://github.com/da-woods
on Nov 20, 2025https://github.com/python/cpython/issues/141780#issue-3646006480
gh-141780: Make PyModule_FromSlotsAndSpec enable GIL if needed  #141785https://github.com/python/cpython/pull/141785
da-woodshttps://github.com/da-woods
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Nov 20, 2025https://github.com/python/cpython/issues/141780#event-21062747649
da-woodshttps://github.com/da-woods
on Nov 20, 2025https://github.com/python/cpython/issues/141780#event-21062979474
https://github.com/da-woods
da-woodshttps://github.com/da-woods
on Nov 20, 2025https://github.com/python/cpython/issues/141780#issuecomment-3556534282
@encukouhttps://github.com/encukou
encukouhttps://github.com/encukou
on Nov 20, 2025https://github.com/python/cpython/issues/141780#event-21064304397
encukouhttps://github.com/encukou
on Nov 20, 2025https://github.com/python/cpython/issues/141780#event-21069264012
pythongh-141780: Make PyModule_FromSlotsAndSpec enable GIL if neededhttps://github.com/encukou/cpython/commit/13faf0f3d9391bfb2aa3898420d101883740f0c1
pythongh-141780https://github.com/python/cpython/issues/141780
13faf0fhttps://github.com/encukou/cpython/commit/13faf0f3d9391bfb2aa3898420d101883740f0c1
https://github.com/encukou
encukouhttps://github.com/encukou
on Nov 20, 2025https://github.com/python/cpython/issues/141780#issuecomment-3557838129
StanFromIrelandhttps://github.com/StanFromIreland
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
on Nov 20, 2025https://github.com/python/cpython/issues/141780#event-21074713743
picnixzhttps://github.com/picnixz
3.15bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.15%22
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%22
on Nov 22, 2025https://github.com/python/cpython/issues/141780#event-21113665087
encukouhttps://github.com/encukou
on Nov 24, 2025https://github.com/python/cpython/issues/141780#event-21137291072
gh-141780: Make PyModule_FromSlotsAndSpec enable GIL if needed (GH-1…https://github.com/python/cpython/commit/bf66bce4ee642e0d14d2e289490360e60980b14e
gh-141780https://github.com/python/cpython/issues/141780
GH-1…https://github.com/python/cpython/pull/141785
bf66bcehttps://github.com/python/cpython/commit/bf66bce4ee642e0d14d2e289490360e60980b14e
encukouhttps://github.com/encukou
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 24, 2025https://github.com/python/cpython/issues/141780#event-21137682546
https://github.com/da-woods
da-woodshttps://github.com/da-woods
on Nov 24, 2025https://github.com/python/cpython/issues/141780#issuecomment-3570798768
StanFromIrelandhttps://github.com/StanFromIreland
on Dec 6, 2025https://github.com/python/cpython/issues/141780#event-21401826652
pythongh-141780: Make PyModule_FromSlotsAndSpec enable GIL if needed (…https://github.com/StanFromIreland/cpython/commit/f614d1867eb4ae768710675a7747f3b419156e4c
pythongh-141780https://github.com/python/cpython/issues/141780
…https://github.com/python/cpython/pull/141785
f614d18https://github.com/StanFromIreland/cpython/commit/f614d1867eb4ae768710675a7747f3b419156e4c
ashm-devhttps://github.com/ashm-dev
on Dec 8, 2025https://github.com/python/cpython/issues/141780#event-21430395364
pythongh-141780: Make PyModule_FromSlotsAndSpec enable GIL if needed (…https://github.com/ashm-dev/cpython/commit/1fdf8afe91014570f2bf0993a8c7002efb15f41e
pythongh-141780https://github.com/python/cpython/issues/141780
…https://github.com/python/cpython/pull/141785
1fdf8afhttps://github.com/ashm-dev/cpython/commit/1fdf8afe91014570f2bf0993a8c7002efb15f41e
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/141780
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/141780
encukouhttps://github.com/encukou
3.15bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.15%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%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.