René's URL Explorer Experiment


Title: Python 3.13 regression: Recursive dataclasses fail to ==: RecursionError: maximum recursion depth exceeded · Issue #116647 · python/cpython · GitHub

Open Graph Title: Python 3.13 regression: Recursive dataclasses fail to ==: RecursionError: maximum recursion depth exceeded · Issue #116647 · python/cpython

X Title: Python 3.13 regression: Recursive dataclasses fail to ==: RecursionError: maximum recursion depth exceeded · Issue #116647 · python/cpython

Description: Bug report Bug description: There is a regression in comparing recursive dataclasses for equality in Python 3.13.0 from the first alpha until at least a4. Python 3.12 >>> from dataclasses import dataclass >>> @dataclass ... class C: ... ...

Open Graph Description: Bug report Bug description: There is a regression in comparing recursive dataclasses for equality in Python 3.13.0 from the first alpha until at least a4. Python 3.12 >>> from dataclasses import da...

X Description: Bug report Bug description: There is a regression in comparing recursive dataclasses for equality in Python 3.13.0 from the first alpha until at least a4. Python 3.12 >>> from dataclasses ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python 3.13 regression: Recursive dataclasses fail to ==: RecursionError: maximum recursion depth exceeded","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\nThere is a regression in comparing recursive dataclasses for equality in Python 3.13.0 from the first alpha until at least a4.\r\n\r\n### Python 3.12\r\n\r\n```pycon\r\n\u003e\u003e\u003e from dataclasses import dataclass\r\n\u003e\u003e\u003e @dataclass\r\n... class C:\r\n...     recursive: object = ...\r\n... \r\n\u003e\u003e\u003e c1 = C()\r\n\u003e\u003e\u003e c1.recursive = c1\r\n\u003e\u003e\u003e c1 == c1\r\nTrue\r\n```\r\n\r\n\r\n### Python 3.13\r\n\r\n```pycon\r\n\u003e\u003e\u003e from dataclasses import dataclass\r\n\u003e\u003e\u003e @dataclass\r\n... class C:\r\n...     recursive: object = ...\r\n... \r\n\u003e\u003e\u003e c1 = C()\r\n\u003e\u003e\u003e c1.recursive = c1\r\n\u003e\u003e\u003e c1 == c1\r\nTraceback (most recent call last):\r\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\n    c1 == c1\r\n  File \"\u003cstring\u003e\", line 4, in __eq__\r\n  File \"\u003cstring\u003e\", line 4, in __eq__\r\n  File \"\u003cstring\u003e\", line 4, in __eq__\r\n  [Previous line repeated 996 more times]\r\nRecursionError: maximum recursion depth exceeded\r\n```\r\n\r\nThis has started happening since 18cfc1eea569f0ce72ad403840c0e6cc5f81e1c2.\r\n\r\nPreviously, tuples were compared via `==`, which skips calling `__eq__` for items with the same identity. Now it skips the identity check and compares items directly with `__eq__`, causing `RecursionError`.\r\n\r\nThis breaks sip-build; hence, we cannot build pyqt5 or pyqt6 in Fedora with Python 3.13 to test the entire stack. For details, see this [Fedora bugzilla](https://bugzilla.redhat.com/show_bug.cgi?id=2250649).\r\n\r\n```\r\nsip-build: An internal error occurred...\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/sip-build\", line 8, in \u003cmodule\u003e\r\n    sys.exit(main())\r\n             ^^^^^^\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/tools/build.py\", line 37, in main\r\n    handle_exception(e)\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/exceptions.py\", line 81, in handle_exception\r\n    raise e\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/tools/build.py\", line 34, in main\r\n    project.build()\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/project.py\", line 245, in build\r\n    self.builder.build()\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/builder.py\", line 48, in build\r\n    self._generate_bindings()\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/builder.py\", line 280, in _generate_bindings\r\n    buildable = bindings.generate()\r\n                ^^^^^^^^^^^^^^^^^^^\r\n  File \"/builddir/build/BUILD/PyQt5-5.15.9/project.py\", line 619, in generate\r\n    buildable = super().generate()\r\n                ^^^^^^^^^^^^^^^^^^\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/bindings.py\", line 214, in generate\r\n    output_pyi(spec, project, pyi_path)\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 53, in output_pyi\r\n    _module(pf, spec, module)\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 132, in _module\r\n    _class(pf, spec, module, klass, defined)\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 267, in _class\r\n    _class(pf, spec, module, nested, defined, indent)\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 289, in _class\r\n    _callable(pf, spec, module, member, klass.overloads,\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 485, in _callable\r\n    _overload(pf, spec, module, overload, overloaded, first_overload,\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 575, in _overload\r\n    signature = _python_signature(spec, module, py_signature, defined,\r\n                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 599, in _python_signature\r\n    as_str = _argument(spec, module, arg, defined, arg_nr=arg_nr)\r\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 676, in _argument\r\n    s += _type(spec, module, arg, defined, out=out)\r\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/pyi.py\", line 710, in _type\r\n    return ArgumentFormatter(spec, arg).as_type_hint(module, out, defined)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/formatters/argument.py\", line 327, in as_type_hint\r\n    s += TypeHintManager(self.spec).as_type_hint(hint, out, context,\r\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/usr/lib64/python3.13/site-packages/sipbuild/generator/outputs/type_hints.py\", line 107, in __new__\r\n    manager = cls._spec_manager_map[spec]\r\n              ~~~~~~~~~~~~~~~~~~~~~^^^^^^\r\n  File \"/usr/lib64/python3.13/weakref.py\", line 415, in __getitem__\r\n    return self.data[ref(key)]\r\n           ~~~~~~~~~^^^^^^^^^^\r\n  File \"\u003cstring\u003e\", line 4, in __eq__\r\n  File \"\u003cstring\u003e\", line 4, in __eq__\r\n  File \"\u003cstring\u003e\", line 4, in __eq__\r\n  [Previous line repeated 495 more times]\r\nRecursionError: maximum recursion depth exceeded in comparison\r\n```\r\n\r\ncc @rhettinger @ericvsmith\r\n\r\nThanks to @swt2c for bisecting the problem. Thanks to @encukou who gave me a hint of what to look for when finding the smaller reproducer.\r\n\r\n### CPython versions tested on:\r\n\r\n3.13\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-116790\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/hroncok","@type":"Person","name":"hroncok"},"datePublished":"2024-03-12T10:36:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/116647/cpython/issues/116647"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:eaa61518-791d-0b34-b414-d16525f3d5a4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB848:201472:CA7285:11CBB43:696A21A7
html-safe-nonce5b91cfb1b90516d2411372dbd776d2c806ddf401aa47efc6cc85fdc19acdc48a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODQ4OjIwMTQ3MjpDQTcyODU6MTFDQkI0Mzo2OTZBMjFBNyIsInZpc2l0b3JfaWQiOiIzNTgyMjI0NzY3ODUxODMxNzE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb4d083d45cf790158f6d10a2ac526b0feba515e457724648e4fc299172ebffc5
hovercard-subject-tagissue:2181276251
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/116647/issue_layout
twitter:imagehttps://opengraph.githubassets.com/493712826b393acab26735f9e91156f4349d5961833e2f74b4798239450129b7/python/cpython/issues/116647
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/493712826b393acab26735f9e91156f4349d5961833e2f74b4798239450129b7/python/cpython/issues/116647
og:image:altBug report Bug description: There is a regression in comparing recursive dataclasses for equality in Python 3.13.0 from the first alpha until at least a4. Python 3.12 >>> from dataclasses import da...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehroncok
hostnamegithub.com
expected-hostnamegithub.com
None014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3
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
released515f6f09fa57a93bf90355cb894eb84ca4f458f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/116647#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F116647
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%2Fissues%2F116647
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/116647
Reloadhttps://github.com/python/cpython/issues/116647
Reloadhttps://github.com/python/cpython/issues/116647
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/116647
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/issues/116647
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/116647
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/116647
Python 3.13 regression: Recursive dataclasses fail to ==: RecursionError: maximum recursion depth exceededhttps://github.com/python/cpython/issues/116647#top
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/hroncok
https://github.com/hroncok
hroncokhttps://github.com/hroncok
on Mar 12, 2024https://github.com/python/cpython/issues/116647#issue-2181276251
18cfc1ehttps://github.com/python/cpython/commit/18cfc1eea569f0ce72ad403840c0e6cc5f81e1c2
Fedora bugzillahttps://bugzilla.redhat.com/show_bug.cgi?id=2250649
@rhettingerhttps://github.com/rhettinger
@ericvsmithhttps://github.com/ericvsmith
@swt2chttps://github.com/swt2c
@encukouhttps://github.com/encukou
gh-116647: Fix recursive child in dataclasses #116790https://github.com/python/cpython/pull/116790
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%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.