René's URL Explorer Experiment


Title: gh-104035: Do not ignore user-defined `__{get,set}state__` in slotted frozen dataclasses by sobolevn · Pull Request #104041 · python/cpython · GitHub

Open Graph Title: gh-104035: Do not ignore user-defined `__{get,set}state__` in slotted frozen dataclasses by sobolevn · Pull Request #104041 · python/cpython

X Title: gh-104035: Do not ignore user-defined `__{get,set}state__` in slotted frozen dataclasses by sobolevn · Pull Request #104041 · python/cpython

Description: I had some time to look at this problem. Here's what I found: Our docs do not say anything about __getstate__ or __setstate__ methods and their generation: https://docs.python.org/3/library/datacl...

Open Graph Description: I had some time to look at this problem. Here's what I found: Our docs do not say anything about __getstate__ or __setstate__ methods and their generation: https://docs.python.org/3/library/da...

X Description: I had some time to look at this problem. Here's what I found: Our docs do not say anything about __getstate__ or __setstate__ methods and their generation: https://docs.python.org/3/librar...

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

X: @github

direct link

Domain: github.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:82323930-9dbf-0f1c-e793-75ccca12435a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA1DE:8907F:1F9A40:2CC928:696A49BB
html-safe-nonceed93ebfb2c7dcf6c5b18ea7abdaf45694e3aa3ce6562abbf88e429135b285eee
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMURFOjg5MDdGOjFGOUE0MDoyQ0M5Mjg6Njk2QTQ5QkIiLCJ2aXNpdG9yX2lkIjoiNjkwNTEyMDAyMjc4Mjk1MzkxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf716125bcb158bd2cb4946a20cf8645b11c1ac82d56e6bda45f3f1b0d01a222d
hovercard-subject-tagpull_request:1333832545
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/104041/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/671166ddb0dd395b9ca4e9a68a42edb0e0c720b21543dac81e1cc26ee67b66cf/python/cpython/pull/104041
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/671166ddb0dd395b9ca4e9a68a42edb0e0c720b21543dac81e1cc26ee67b66cf/python/cpython/pull/104041
og:image:altI had some time to look at this problem. Here's what I found: Our docs do not say anything about __getstate__ or __setstate__ methods and their generation: https://docs.python.org/3/library/da...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesobolevn
hostnamegithub.com
expected-hostnamegithub.com
None3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef
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
release63c426b30d262aba269ef14c40e3c817b384cd61
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/104041#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F104041
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://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F104041
Sign up https://github.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://github.com/python/cpython/pull/104041
Reloadhttps://github.com/python/cpython/pull/104041
Reloadhttps://github.com/python/cpython/pull/104041
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/104041
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/104041
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
Jump to bottomhttps://github.com/python/cpython/pull/104041#issue-comment-box
carljmhttps://github.com/carljm
python:mainhttps://github.com/python/cpython/tree/main
sobolevn:issue-104035https://github.com/sobolevn/cpython/tree/issue-104035
gh-104035: Do not ignore user-defined __{get,set}state__ in slotted frozen dataclasses https://github.com/python/cpython/pull/104041#top
carljmhttps://github.com/carljm
python:mainhttps://github.com/python/cpython/tree/main
sobolevn:issue-104035https://github.com/sobolevn/cpython/tree/issue-104035
Conversation 2 https://github.com/python/cpython/pull/104041
Commits 2 https://github.com/python/cpython/pull/104041/commits
Checks 0 https://github.com/python/cpython/pull/104041/checks
Files changed https://github.com/python/cpython/pull/104041/files
Please reload this pagehttps://github.com/python/cpython/pull/104041
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
May 1, 2023https://github.com/python/cpython/pull/104041#issue-1690829773
Please reload this pagehttps://github.com/python/cpython/pull/104041
https://docs.python.org/3/library/dataclasses.htmlhttps://docs.python.org/3/library/dataclasses.html
Frozen dataclasses with slots cannot override __getstate__ or __setstate__ #104035https://github.com/python/cpython/issues/104035
Please reload this pagehttps://github.com/python/cpython/pull/104041
https://github.com/sobolevn
pythongh-104035https://github.com/python/cpython/issues/104035
: Do not ignore user-definedhttps://github.com/python/cpython/pull/104041/commits/b6a09a4087af941dfe7990f76e69c19b5170a922
__{get,set}state__https://github.com/python/cpython/pull/104041/commits/b6a09a4087af941dfe7990f76e69c19b5170a922
in s…https://github.com/python/cpython/pull/104041/commits/b6a09a4087af941dfe7990f76e69c19b5170a922
b6a09a4https://github.com/python/cpython/pull/104041/commits/b6a09a4087af941dfe7990f76e69c19b5170a922
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
ericvsmithhttps://github.com/ericvsmith
code ownerhttps://github.com/python/cpython/blob/4181d078fc945313568eb39965cb9190881606b5/.github/CODEOWNERS#L135
May 1, 2023 13:47https://github.com/python/cpython/pull/104041#event-9136693950
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
May 1, 2023https://github.com/python/cpython/pull/104041#event-9136694329
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
May 1, 2023 https://github.com/python/cpython/pull/104041#ref-issue-1690787498
Frozen dataclasses with slots cannot override __getstate__ or __setstate__ #104035 https://github.com/python/cpython/issues/104035
https://github.com/sobolevn
Update 2023-05-01-16-43-28.gh-issue-104035.MrJBw8.rsthttps://github.com/python/cpython/pull/104041/commits/07d5b21861afcc1e32c83f70bec3f17459b12a32
07d5b21https://github.com/python/cpython/pull/104041/commits/07d5b21861afcc1e32c83f70bec3f17459b12a32
https://github.com/carljm
carljmhttps://github.com/carljm
May 1, 2023 https://github.com/python/cpython/pull/104041#pullrequestreview-1407712515
View reviewed changes https://github.com/python/cpython/pull/104041/files/07d5b21861afcc1e32c83f70bec3f17459b12a32
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
May 1, 2023https://github.com/python/cpython/pull/104041#event-9137331027
https://github.com/carljm
carljmhttps://github.com/carljm
needs backport to 3.11 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.11%22
May 1, 2023https://github.com/python/cpython/pull/104041#event-9137340110
https://github.com/carljm
carljmhttps://github.com/carljm
99aab61https://github.com/python/cpython/commit/99aab610622fc4b4c4fe56b77c0760cf77066a53
May 1, 2023https://github.com/python/cpython/pull/104041#event-9137341794
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
May 1, 2023https://github.com/python/cpython/pull/104041#event-9137342134
https://github.com/miss-islington
miss-islingtonhttps://github.com/miss-islington
May 1, 2023https://github.com/python/cpython/pull/104041#issuecomment-1529826871
@sobolevnhttps://github.com/sobolevn
@carljmhttps://github.com/carljm
Please reload this pagehttps://github.com/python/cpython/pull/104041
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
May 1, 2023https://github.com/python/cpython/pull/104041#issuecomment-1529827294
GH-104044https://github.com/python/cpython/pull/104044
3.11 branchhttps://github.com/python/cpython/tree/3.11
Please reload this pagehttps://github.com/python/cpython/pull/104041
miss-islingtonhttps://github.com/miss-islington
May 1, 2023 https://github.com/python/cpython/pull/104041#ref-commit-9141fed
https://github.com/sobolevn
https://github.com/miss-islington
pythongh-104035https://github.com/python/cpython/issues/104035
: Do not ignore user-definedhttps://github.com/miss-islington/cpython/commit/9141feda756dec9a09a6e66a8df791db16a4b906
__{get,set}state__https://github.com/miss-islington/cpython/commit/9141feda756dec9a09a6e66a8df791db16a4b906
in s…https://github.com/miss-islington/cpython/commit/9141feda756dec9a09a6e66a8df791db16a4b906
9141fedhttps://github.com/miss-islington/cpython/commit/9141feda756dec9a09a6e66a8df791db16a4b906
pythonGH-104041https://github.com/python/cpython/pull/104041
99aab61https://github.com/miss-islington/cpython/commit/99aab610622fc4b4c4fe56b77c0760cf77066a53
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
needs backport to 3.11 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.11%22
May 1, 2023https://github.com/python/cpython/pull/104041#event-9137346174
carljmhttps://github.com/carljm
May 1, 2023 https://github.com/python/cpython/pull/104041#ref-commit-0df7c3a
https://github.com/miss-islington
https://github.com/sobolevn
[3.11]https://github.com/python/cpython/commit/0df7c3a466c4d5b65ce619952009477fba1e91e9
gh-104035https://github.com/python/cpython/issues/104035
: Do not ignore user-definedhttps://github.com/python/cpython/commit/0df7c3a466c4d5b65ce619952009477fba1e91e9
__{get,set}state__https://github.com/python/cpython/commit/0df7c3a466c4d5b65ce619952009477fba1e91e9
in …https://github.com/python/cpython/commit/0df7c3a466c4d5b65ce619952009477fba1e91e9
0df7c3ahttps://github.com/python/cpython/commit/0df7c3a466c4d5b65ce619952009477fba1e91e9
GH-104041https://github.com/python/cpython/pull/104041
#104044https://github.com/python/cpython/pull/104044
gh-104035https://github.com/python/cpython/issues/104035
GH-104041https://github.com/python/cpython/pull/104041
99aab61https://github.com/python/cpython/commit/99aab610622fc4b4c4fe56b77c0760cf77066a53
carljmhttps://github.com/carljm
May 1, 2023 https://github.com/python/cpython/pull/104041#ref-commit-1274e2b
https://github.com/carljm
Merge branch 'main' into inlinecomp2https://github.com/carljm/cpython/commit/1274e2bf55565619f80c9b9ceee35c258b413eb6
1274e2bhttps://github.com/carljm/cpython/commit/1274e2bf55565619f80c9b9ceee35c258b413eb6
pythongh-104057https://github.com/python/cpython/issues/104057
python#104064https://github.com/python/cpython/pull/104064
pythongh-87092https://github.com/python/cpython/issues/87092
python#103988https://github.com/python/cpython/pull/103988
pythongh-97696https://github.com/python/cpython/issues/97696
python#102853https://github.com/python/cpython/pull/102853
pythongh-84436https://github.com/python/cpython/issues/84436
pythongh-104054https://github.com/python/cpython/pull/104054
pythongh-104057https://github.com/python/cpython/issues/104057
pythonGH-104059https://github.com/python/cpython/pull/104059
pythongh-100458https://github.com/python/cpython/issues/100458
pythonGH-100387https://github.com/python/cpython/pull/100387
pythongh-104018https://github.com/python/cpython/issues/104018
pythonGH-104033https://github.com/python/cpython/pull/104033
pythongh-104016https://github.com/python/cpython/issues/104016
python#104047https://github.com/python/cpython/pull/104047
pythonGH-103629https://github.com/python/cpython/issues/103629
python#104048https://github.com/python/cpython/pull/104048
pythongh-102799https://github.com/python/cpython/issues/102799
python#104032https://github.com/python/cpython/pull/104032
python#104034https://github.com/python/cpython/pull/104034
pythongh-103824https://github.com/python/cpython/issues/103824
python#103993https://github.com/python/cpython/pull/103993
pythongh-104035https://github.com/python/cpython/issues/104035
python#104041https://github.com/python/cpython/pull/104041
pythongh-104028https://github.com/python/cpython/issues/104028
pythongh-104030https://github.com/python/cpython/pull/104030
pythongh-104036https://github.com/python/cpython/issues/104036
python#104037https://github.com/python/cpython/pull/104037
pythongh-102213https://github.com/python/cpython/issues/102213
pythonGH-103761https://github.com/python/cpython/pull/103761
pythongh-103895https://github.com/python/cpython/issues/103895
python#103897https://github.com/python/cpython/pull/103897
pythonGH-104021https://github.com/python/cpython/pull/104021
pythongh-88496https://github.com/python/cpython/issues/88496
python#104025https://github.com/python/cpython/pull/104025
python#104024https://github.com/python/cpython/pull/104024
https://github.com/DouweM
DouweMhttps://github.com/DouweM
Apr 25, 2025 https://github.com/python/cpython/pull/104041#ref-pullrequest-3002410502
Make sure Pydantic dataclasses with slots and validate_assignment can be unpickled pydantic/pydantic#11769 https://github.com/pydantic/pydantic/pull/11769
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F104041
https://github.com/carljm
carljm https://github.com/carljm
https://github.com/python/cpython/pull/104041/files/07d5b21861afcc1e32c83f70bec3f17459b12a32
https://github.com/ericvsmith
ericvsmith https://github.com/ericvsmith
Please reload this pagehttps://github.com/python/cpython/pull/104041
https://github.com/sobolevn
https://github.com/miss-islington
https://github.com/bedevere-bot
https://github.com/carljm
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.