René's URL Explorer Experiment


Title: `_interpreters.set___main___attrs` raises SystemError when passed a non-dict object · Issue #135855 · python/cpython · GitHub

Open Graph Title: `_interpreters.set___main___attrs` raises SystemError when passed a non-dict object · Issue #135855 · python/cpython

X Title: `_interpreters.set___main___attrs` raises SystemError when passed a non-dict object · Issue #135855 · python/cpython

Description: Bug report Bug description: This snippet: import _interpreters import types i = _interpreters.create() _interpreters.set___main___attrs(i, types.MappingProxyType({"a": 1})) raises: Traceback (most recent call last): File "/home/brian/Pro...

Open Graph Description: Bug report Bug description: This snippet: import _interpreters import types i = _interpreters.create() _interpreters.set___main___attrs(i, types.MappingProxyType({"a": 1})) raises: Traceback (most ...

X Description: Bug report Bug description: This snippet: import _interpreters import types i = _interpreters.create() _interpreters.set___main___attrs(i, types.MappingProxyType({"a": 1})) raises: Traceb...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`_interpreters.set___main___attrs` raises SystemError when passed a non-dict object","articleBody":"# Bug report\n\n### Bug description:\n\nThis snippet:\n```python\nimport _interpreters\nimport types\n\ni = _interpreters.create()\n_interpreters.set___main___attrs(i, types.MappingProxyType({\"a\": 1}))\n```\nraises:\n```python-traceback\nTraceback (most recent call last):\n  File \"/home/brian/Projects/open-contrib/cpython/temp.py\", line 27, in \u003cmodule>\n    _interpreters.set___main___attrs(i, types.MappingProxyType({\"a\": 1}))\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nSystemError: Objects/dictobject.c:4162: bad argument to internal function\n```\n\nThis happens during [this call](https://github.com/python/cpython/blob/b3ae76911df465ade76c267c5fa2a02cf1138b48/Modules/_interpretersmodule.c#L1075) to `_PyXI_Enter` which calls `PyDict_Size` on `updates`.\n\nThe [public interface](https://github.com/python/cpython/blob/b3ae76911df465ade76c267c5fa2a02cf1138b48/Lib/concurrent/interpreters/__init__.py#L193-L194) always passes a `dict`, and other paths that call `_PyXI_Enter` check for an actual dict (e.g., [`exec`](https://github.com/python/cpython/blob/b3ae76911df465ade76c267c5fa2a02cf1138b48/Modules/_interpretersmodule.c#L1123-L1126)). I think it makes sense to do the same thing here. PR forthcoming. \n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-135856\n* gh-135900\n* gh-135903\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/brianschubert","@type":"Person","name":"brianschubert"},"datePublished":"2025-06-23T14:16:43Z","url":"https://github.com/python/cpython/issues/135855"}

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:0e39c6f2-328b-9b73-5e6c-5596fdaf40f8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBA68:1AB47A:2BFFA2:3A725C:6B023350
html-safe-nonce4b48e7ca57e060493559bc7092a432e62f1acd98d87b59cb94b271a867f3bbb2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTY4OjFBQjQ3QToyQkZGQTI6M0E3MjVDOjZCMDIzMzUwIiwidmlzaXRvcl9pZCI6IjEzNTk1NzI3OTI2OTczMDM4ODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace1245cc0780b7a5b7216ed04f78c70ae465eec2f117f15adf343993c8e34dfff
hovercard-subject-tagissue:3168373633
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/135855/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6850784ada892dbc3c19c6e7a5ce32865d08491ce4a66f12192d3b651f2f1f4e/python/cpython/issues/135855
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6850784ada892dbc3c19c6e7a5ce32865d08491ce4a66f12192d3b651f2f1f4e/python/cpython/issues/135855
og:image:altBug report Bug description: This snippet: import _interpreters import types i = _interpreters.create() _interpreters.set___main___attrs(i, types.MappingProxyType({"a": 1})) raises: Traceback (most ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebrianschubert
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/135855#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F135855
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%2F135855
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/135855
Reloadhttps://github.com/python/cpython/issues/135855
Reloadhttps://github.com/python/cpython/issues/135855
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/135855
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/135855
_interpreters.set___main___attrs raises SystemError when passed a non-dict objecthttps://github.com/python/cpython/issues/135855#top
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
topic-subinterpretershttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-subinterpreters%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/brianschubert
brianschuberthttps://github.com/brianschubert
on Jun 23, 2025https://github.com/python/cpython/issues/135855#issue-3168373633
this callhttps://github.com/python/cpython/blob/b3ae76911df465ade76c267c5fa2a02cf1138b48/Modules/_interpretersmodule.c#L1075
public interfacehttps://github.com/python/cpython/blob/b3ae76911df465ade76c267c5fa2a02cf1138b48/Lib/concurrent/interpreters/__init__.py#L193-L194
exechttps://github.com/python/cpython/blob/b3ae76911df465ade76c267c5fa2a02cf1138b48/Modules/_interpretersmodule.c#L1123-L1126
gh-135855: Fix SystemError when passing non-dict object to _interpreters.set___main___attrs #135856https://github.com/python/cpython/pull/135856
[3.14] gh-135855: Raise TypeError When Passing Non-dict Object to _interpreters.set___main___attrs (gh-135856) #135900https://github.com/python/cpython/pull/135900
[3.13] gh-135855: Raise TypeError When Passing Non-dict Object to _interpreters.set___main___attrs (gh-135856) #135903https://github.com/python/cpython/pull/135903
brianschuberthttps://github.com/brianschubert
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Jun 23, 2025https://github.com/python/cpython/issues/135855#event-18274855956
brianschuberthttps://github.com/brianschubert
on Jun 23, 2025https://github.com/python/cpython/issues/135855#event-18274860940
picnixzhttps://github.com/picnixz
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-subinterpretershttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-subinterpreters%22
on Jun 23, 2025https://github.com/python/cpython/issues/135855#event-18274873091
github-project-automationhttps://github.com/apps/github-project-automation
Subinterpretershttps://github.com/orgs/python/projects/3
on Jun 23, 2025https://github.com/python/cpython/issues/135855#event-18274883333
github-project-automationhttps://github.com/apps/github-project-automation
Subinterpretershttps://github.com/orgs/python/projects/3
on Jun 23, 2025https://github.com/python/cpython/issues/135855
brianschuberthttps://github.com/brianschubert
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
on Jun 23, 2025https://github.com/python/cpython/issues/135855#event-18277451817
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
on Jun 24, 2025https://github.com/python/cpython/issues/135855#event-18300737851
gh-135855: Raise TypeError When Passing Non-dict Object to `_interpre…https://github.com/python/cpython/commit/4e6f0d116e9725efb2d8eb6c3274aa3c024a6fb4
gh-135855https://github.com/python/cpython/issues/135855
4e6f0d1https://github.com/python/cpython/commit/4e6f0d116e9725efb2d8eb6c3274aa3c024a6fb4
miss-islingtonhttps://github.com/miss-islington
on Jun 24, 2025https://github.com/python/cpython/issues/135855#event-18300739113
pythongh-135855: Raise TypeError When Passing Non-dict Object to `_in…https://github.com/miss-islington/cpython/commit/f9f1172057b888cb80a7cc5b761488b7a56df8c5
pythongh-135855https://github.com/python/cpython/issues/135855
f9f1172https://github.com/miss-islington/cpython/commit/f9f1172057b888cb80a7cc5b761488b7a56df8c5
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
on Jun 24, 2025https://github.com/python/cpython/issues/135855#event-18301097905
[3.14] gh-135855: Raise TypeError When Passing Non-dict Object to `_i…https://github.com/python/cpython/commit/090a42b5eb418cf9436c8e5deac49bfd866a0bcc
gh-135855https://github.com/python/cpython/issues/135855
090a42bhttps://github.com/python/cpython/commit/090a42b5eb418cf9436c8e5deac49bfd866a0bcc
brianschuberthttps://github.com/brianschubert
on Jun 24, 2025https://github.com/python/cpython/issues/135855#event-18302807255
[3.13] pythongh-135855: Raise TypeError When Passing Non-dict Object …https://github.com/brianschubert/cpython/commit/d33628eee64f3f5567986ed77e103cc47736b0a6
pythongh-135855https://github.com/python/cpython/issues/135855
d33628ehttps://github.com/brianschubert/cpython/commit/d33628eee64f3f5567986ed77e103cc47736b0a6
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
on Jun 24, 2025https://github.com/python/cpython/issues/135855#event-18303563503
[3.13] gh-135855: Raise TypeError When Passing Non-dict Object to `_i…https://github.com/python/cpython/commit/3e4362812ee8b659d54ec7a5f9d3289de2a54d8b
gh-135855https://github.com/python/cpython/issues/135855
3e43628https://github.com/python/cpython/commit/3e4362812ee8b659d54ec7a5f9d3289de2a54d8b
brianschuberthttps://github.com/brianschubert
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 25, 2025https://github.com/python/cpython/issues/135855#event-18305881656
github-project-automationhttps://github.com/apps/github-project-automation
Subinterpretershttps://github.com/orgs/python/projects/3
on Jun 25, 2025https://github.com/python/cpython/issues/135855
AndPuQinghttps://github.com/AndPuQing
on Jul 11, 2025https://github.com/python/cpython/issues/135855#event-18584719901
pythongh-135855: Raise TypeError When Passing Non-dict Object to `_in…https://github.com/AndPuQing/cpython/commit/d76582d2205b8cc517340be379ca8cbeb2c6780c
pythongh-135855https://github.com/python/cpython/issues/135855
d76582dhttps://github.com/AndPuQing/cpython/commit/d76582d2205b8cc517340be379ca8cbeb2c6780c
Pranjal095https://github.com/Pranjal095
on Jul 12, 2025https://github.com/python/cpython/issues/135855#event-18600181824
pythongh-135855: Raise TypeError When Passing Non-dict Object to `_in…https://github.com/Pranjal095/cpython/commit/bf3647b4df1b0c0bd0fba8f0d3d02d91da671a76
pythongh-135855https://github.com/python/cpython/issues/135855
bf3647bhttps://github.com/Pranjal095/cpython/commit/bf3647b4df1b0c0bd0fba8f0d3d02d91da671a76
taegyunkimhttps://github.com/taegyunkim
on Aug 4, 2025https://github.com/python/cpython/issues/135855#event-18976841923
pythongh-135855: Raise TypeError When Passing Non-dict Object to `_in…https://github.com/taegyunkim/cpython/commit/1bcf576af8a57bf878bdf56c00afa11f6109c64c
pythongh-135855https://github.com/python/cpython/issues/135855
1bcf576https://github.com/taegyunkim/cpython/commit/1bcf576af8a57bf878bdf56c00afa11f6109c64c
Agent-Hellboyhttps://github.com/Agent-Hellboy
on Aug 19, 2025https://github.com/python/cpython/issues/135855#event-19221802123
pythongh-135855: Raise TypeError When Passing Non-dict Object to `_in…https://github.com/Agent-Hellboy/cpython/commit/9cc402fdd72f21bb4e5a4f956bf1eeefbc0e7dd7
pythongh-135855https://github.com/python/cpython/issues/135855
9cc402fhttps://github.com/Agent-Hellboy/cpython/commit/9cc402fdd72f21bb4e5a4f956bf1eeefbc0e7dd7
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/135855
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/135855
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
topic-subinterpretershttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-subinterpreters%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
Subinterpretershttps://github.com/orgs/python/projects/3
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.