Skip to content

Conversation

@JelleZijlstra
Copy link
Contributor

Followup from #1446. In the latest 3.14 release candidate, we added a sys._clear_type_descriptors function for dataclasses to use. Let's use that function here too so we don't have to reach into the internals.

Note that CPython may end up with a different solution in the future (python/cpython#136966) that would remove the cycle without any need for hacks like this. If that merges, we can add additional conditional logic to skip this logic on 3.15+.

We could also drop the existing manual __dict__ munging entirely; it depends on whether you care about the behavior on earlier 3.14 betas and rc1.

@hynek
Copy link
Member

hynek commented Aug 15, 2025

Hey Jelle thanks for thinking of us! 🥲

I don’t care about pre-release working, so feel free to kill the old workaround and I’ll merge the PR once GHA has rc2 — thanks!

@JelleZijlstra
Copy link
Contributor Author

Sounds good! The test suite passes for me locally on 3.14.0rc2 with this version.

@hynek hynek added this pull request to the merge queue Aug 15, 2025
Merged via the queue into python-attrs:main with commit 19175d9 Aug 15, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants