René's URL Explorer Experiment


Title: gh-135228: Properly update closure cells for `__setattr__` and `__detattr__` in frozen dataclasses with slots by Prometheus3375 · Pull Request #144021 · python/cpython · GitHub

Open Graph Title: gh-135228: Properly update closure cells for `__setattr__` and `__detattr__` in frozen dataclasses with slots by Prometheus3375 · Pull Request #144021 · python/cpython

X Title: gh-135228: Properly update closure cells for `__setattr__` and `__detattr__` in frozen dataclasses with slots by Prometheus3375 · Pull Request #144021 · python/cpython

Description: Specifying frozen=True for a dataclass adds methods __setattr__ and __detattr__ to it. These methods reference the class via closure. If slots=True is also present, then the class is recreated with...

Open Graph Description: Specifying frozen=True for a dataclass adds methods __setattr__ and __detattr__ to it. These methods reference the class via closure. If slots=True is also present, then the class is recreated with...

X Description: Specifying frozen=True for a dataclass adds methods __setattr__ and __detattr__ to it. These methods reference the class via closure. If slots=True is also present, then the class is recreated with...

Opengraph URL: https://github.com/python/cpython/pull/144021

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:8e430689-c88c-bde6-0b58-aa1725dd0b38
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDE5C:66C5B:1A7157F:23B0E3D:696EB6F3
html-safe-nonce31f667926930be57e4589589a55a4cc4a7657f1f1b9660eb5d93be5b2a7ad7de
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTVDOjY2QzVCOjFBNzE1N0Y6MjNCMEUzRDo2OTZFQjZGMyIsInZpc2l0b3JfaWQiOiI3MDA4NDI0NTY0NzU2NDk0MDY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8e2297967f30a0a1df991216039af9cf092dc21e6fbbe1d41ca3ddb41ad567e5
hovercard-subject-tagpull_request:3186399725
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/144021/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/48b3994b29139ae8595c99ce251ccc8632a94c5d395c47b1cd00f814c326d4d4/python/cpython/pull/144021
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/48b3994b29139ae8595c99ce251ccc8632a94c5d395c47b1cd00f814c326d4d4/python/cpython/pull/144021
og:image:altSpecifying frozen=True for a dataclass adds methods __setattr__ and __detattr__ to it. These methods reference the class via closure. If slots=True is also present, then the class is recreated with...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePrometheus3375
hostnamegithub.com
expected-hostnamegithub.com
Noneb278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee
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
release39aed5006635ab6f45e6b77d23e73b08a00272a3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python/cpython/pull/144021#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F144021
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F144021
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Reloadhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Reloadhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
python https://patch-diff.githubusercontent.com/python
cpythonhttps://patch-diff.githubusercontent.com/python/cpython
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://patch-diff.githubusercontent.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://patch-diff.githubusercontent.com/login?return_to=%2Fpython%2Fcpython
Code https://patch-diff.githubusercontent.com/python/cpython
Issues 5k+ https://patch-diff.githubusercontent.com/python/cpython/issues
Pull requests 2.1k https://patch-diff.githubusercontent.com/python/cpython/pulls
Actions https://patch-diff.githubusercontent.com/python/cpython/actions
Projects 31 https://patch-diff.githubusercontent.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/python/cpython/security
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Insights https://patch-diff.githubusercontent.com/python/cpython/pulse
Code https://patch-diff.githubusercontent.com/python/cpython
Issues https://patch-diff.githubusercontent.com/python/cpython/issues
Pull requests https://patch-diff.githubusercontent.com/python/cpython/pulls
Actions https://patch-diff.githubusercontent.com/python/cpython/actions
Projects https://patch-diff.githubusercontent.com/python/cpython/projects
Security https://patch-diff.githubusercontent.com/python/cpython/security
Insights https://patch-diff.githubusercontent.com/python/cpython/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
Jump to bottomhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021#issue-comment-box
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
python:mainhttps://patch-diff.githubusercontent.com/python/cpython/tree/main
Prometheus3375:fix-dataclass-frozen-slots-leakhttps://patch-diff.githubusercontent.com/Prometheus3375/cpython/tree/fix-dataclass-frozen-slots-leak
gh-135228: Properly update closure cells for __setattr__ and __detattr__ in frozen dataclasses with slots https://patch-diff.githubusercontent.com/python/cpython/pull/144021#top
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
python:mainhttps://patch-diff.githubusercontent.com/python/cpython/tree/main
Prometheus3375:fix-dataclass-frozen-slots-leakhttps://patch-diff.githubusercontent.com/Prometheus3375/cpython/tree/fix-dataclass-frozen-slots-leak
Conversation 5 https://patch-diff.githubusercontent.com/python/cpython/pull/144021
Commits 9 https://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits
Checks 43 https://patch-diff.githubusercontent.com/python/cpython/pull/144021/checks
Files changed 3 https://patch-diff.githubusercontent.com/python/cpython/pull/144021/files
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/python/cpython/pull/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/Prometheus3375
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
Jan 19, 2026https://patch-diff.githubusercontent.com/python/cpython/pull/144021#issue-3828096997
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
1https://github.com/python/cpython/issues/135228#issuecomment-3755979059
2https://github.com/python/cpython/issues/135228#issuecomment-3766451124
3.14 regression: slot dataclasses classes leak original class #135228https://github.com/python/cpython/issues/135228
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
https://patch-diff.githubusercontent.com/Prometheus3375
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
ericvsmithhttps://patch-diff.githubusercontent.com/ericvsmith
code ownerhttps://patch-diff.githubusercontent.com/python/cpython/blob/59d3594ca12939dea0a537d9964d8d637546855c/.github/CODEOWNERS#L415
January 19, 2026 05:45https://patch-diff.githubusercontent.com/python/cpython/pull/144021#event-22128957083
https://patch-diff.githubusercontent.com/apps/python-cla-bot
python-cla-bothttps://patch-diff.githubusercontent.com/apps/python-cla-bot
Jan 19, 2026https://patch-diff.githubusercontent.com/python/cpython/pull/144021#issuecomment-3766507624
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
https://cla.python.org/
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
https://patch-diff.githubusercontent.com/apps/bedevere-app
bedevere-apphttps://patch-diff.githubusercontent.com/apps/bedevere-app
Jan 19, 2026 https://patch-diff.githubusercontent.com/python/cpython/pull/144021#ref-issue-3126086443
3.14 regression: slot dataclasses classes leak original class #135228 https://patch-diff.githubusercontent.com/python/cpython/issues/135228
https://patch-diff.githubusercontent.com/apps/bedevere-app
bedevere-apphttps://patch-diff.githubusercontent.com/apps/bedevere-app
awaiting review https://patch-diff.githubusercontent.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Jan 19, 2026https://patch-diff.githubusercontent.com/python/cpython/pull/144021#event-22128958587
https://patch-diff.githubusercontent.com/JelleZijlstra
JelleZijlstrahttps://patch-diff.githubusercontent.com/JelleZijlstra
Jan 19, 2026https://patch-diff.githubusercontent.com/python/cpython/pull/144021#issuecomment-3766521333
https://github.com/python/cpython/pull/137047/files#diff-212e368b34eb9b134f87e765787d6d26b747235a358e13da8922f83861c0d676https://github.com/python/cpython/pull/137047/files#diff-212e368b34eb9b134f87e765787d6d26b747235a358e13da8922f83861c0d676
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
January 19, 2026 05:59https://patch-diff.githubusercontent.com/python/cpython/pull/144021#commits-pushed-2160254
https://patch-diff.githubusercontent.com/Prometheus3375
Use __class__ in setattr and delattrhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/2160254b30ee50e8b045c44a6218b56b7c39bc2b
2160254https://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/2160254b30ee50e8b045c44a6218b56b7c39bc2b
https://patch-diff.githubusercontent.com/Prometheus3375
Rename _frozen_get_del_attrhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/a6de29b287715f782f1b92c8c3717d1dcb1e908e
a6de29bhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/a6de29b287715f782f1b92c8c3717d1dcb1e908e
https://patch-diff.githubusercontent.com/Prometheus3375
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
force-pushedhttps://patch-diff.githubusercontent.com/python/cpython/compare/fdc81bb387560b06396ca48d74b4ee01b800d137..a6de29b287715f782f1b92c8c3717d1dcb1e908e
fdc81bbhttps://patch-diff.githubusercontent.com/python/cpython/commit/fdc81bb387560b06396ca48d74b4ee01b800d137
a6de29bhttps://patch-diff.githubusercontent.com/python/cpython/commit/a6de29b287715f782f1b92c8c3717d1dcb1e908e
Compare https://patch-diff.githubusercontent.com/python/cpython/compare/fdc81bb387560b06396ca48d74b4ee01b800d137..a6de29b287715f782f1b92c8c3717d1dcb1e908e
January 19, 2026 06:19https://patch-diff.githubusercontent.com/python/cpython/pull/144021#event-22129397870
https://patch-diff.githubusercontent.com/Prometheus3375
Add testshttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/63c4e191b91d4fc348f6f5a7df03c398dd2b4167
63c4e19https://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/63c4e191b91d4fc348f6f5a7df03c398dd2b4167
https://patch-diff.githubusercontent.com/Prometheus3375
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
Jan 19, 2026https://patch-diff.githubusercontent.com/python/cpython/pull/144021#issuecomment-3766738286
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
https://patch-diff.githubusercontent.com/Prometheus3375
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
Jan 19, 2026 https://patch-diff.githubusercontent.com/python/cpython/pull/144021#pullrequestreview-3676562575
View reviewed changes https://patch-diff.githubusercontent.com/python/cpython/pull/144021/files/63c4e191b91d4fc348f6f5a7df03c398dd2b4167
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
https://patch-diff.githubusercontent.com/python/cpython/pull/144021#pullrequestreview-3676562575
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
January 19, 2026 20:50https://patch-diff.githubusercontent.com/python/cpython/pull/144021#commits-pushed-d357716
https://patch-diff.githubusercontent.com/Prometheus3375
Rename testhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/d35771650f02e3ab21345ec5f7e8fae1b9be0ecf
d357716https://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/d35771650f02e3ab21345ec5f7e8fae1b9be0ecf
https://patch-diff.githubusercontent.com/apps/blurb-it
📜🤖 Added by blurb_it.https://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/9b33e89370ff5778b01286f78954c189eff1383f
9b33e89https://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/9b33e89370ff5778b01286f78954c189eff1383f
https://patch-diff.githubusercontent.com/Prometheus3375
Reformat news entryhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/bff566a20c23df5fe45b9d7fef4d4119cbcf8673
bff566ahttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/bff566a20c23df5fe45b9d7fef4d4119cbcf8673
https://patch-diff.githubusercontent.com/Prometheus3375
Move tests to other casehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/883363fa62a12c615c05cfeafff4d19417559094
883363fhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/883363fa62a12c615c05cfeafff4d19417559094
https://patch-diff.githubusercontent.com/Prometheus3375
Add another testhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/1c8f7b92c6f376146b34836fb54dac356512c41d
1c8f7b9https://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/1c8f7b92c6f376146b34836fb54dac356512c41d
https://patch-diff.githubusercontent.com/Prometheus3375
Rephrase news entryhttps://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/bb82978857fc2eda07729285b40b95927a01aa18
bb82978https://patch-diff.githubusercontent.com/python/cpython/pull/144021/commits/bb82978857fc2eda07729285b40b95927a01aa18
https://patch-diff.githubusercontent.com/Prometheus3375
Prometheus3375https://patch-diff.githubusercontent.com/Prometheus3375
Jan 19, 2026https://patch-diff.githubusercontent.com/python/cpython/pull/144021#issuecomment-3770297427
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
Sign up for freehttps://patch-diff.githubusercontent.com/join?source=comment-repo
Sign in to commenthttps://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F144021
https://patch-diff.githubusercontent.com/ericvsmith
ericvsmith https://patch-diff.githubusercontent.com/ericvsmith
awaiting review https://patch-diff.githubusercontent.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Please reload this pagehttps://patch-diff.githubusercontent.com/python/cpython/pull/144021
https://patch-diff.githubusercontent.com/Prometheus3375
https://patch-diff.githubusercontent.com/JelleZijlstra
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.