Skip to content

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Sep 1, 2025

@picnixz
Copy link
Member Author

picnixz commented Sep 1, 2025

Ok, so this one is correct:

  • compobject is not an immutable type so it requires the GC protocol.
  • ZlibDecompressor is immutable but it is a true container (it contains a dict), so it requires the GC protocol.

.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION,
.flags = (
Py_TPFLAGS_DEFAULT
| Py_TPFLAGS_DISALLOW_INSTANTIATION
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a follow-up, I'll add the immutable flag as well. We still need the GC protocol as the type is not empty (I think? or maybe we don't need it, I'll need to check).

@picnixz picnixz marked this pull request as draft September 1, 2025 18:58
@picnixz picnixz marked this pull request as ready for review September 6, 2025 10:18
@picnixz picnixz requested a review from vstinner September 10, 2025 09:02
@hugovk hugovk merged commit c8cc39d into python:3.14 Sep 12, 2025
59 of 60 checks passed
@picnixz picnixz deleted the backport-2a54acf-3.14 branch September 12, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants