Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how memoryviewslice/array has sequence flag set #5187

Merged
merged 9 commits into from Dec 31, 2022

Conversation

da-woods
Copy link
Contributor

Registering cdef classes with collections.abs.sequence only works to set the type flag if cdef classes are mutable. Unfortunately we want them to be immutable since it's possible to corrupt memory with mutable cdef classes (#5023).

Therefore, add a Cython directive for marking cdef classes as a sequence, but only allow it in utility code for now. This is a cutdown version of #5030 - I don't want to add new public features without consensus, but I do want to merge the fix for mutable classes. Therefore I'm adding the feature privately for now.

@da-woods da-woods added this to the 3.0 milestone Dec 31, 2022
@da-woods
Copy link
Contributor Author

I'll merge this because it should unblock the immutable PR, and the original PR that this was based on has been around for review a reasonable length of time.

@da-woods da-woods merged commit ddd11a2 into cython:master Dec 31, 2022
@da-woods da-woods deleted the patma-option-small branch December 31, 2022 11:44
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.

None yet

1 participant