10000 Allow update `__class__` for mutable types or module subclasses by moreal · Pull Request #5225 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

Allow update __class__ for mutable types or module subclasses #5225

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

Merged
merged 3 commits into from
Apr 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Set IMMUTABLETYPE flag for static classes
  • Loading branch information
moreal committed Apr 14, 2024
commit 42fafcfdbe6ca0ad54b3a82284e155078c9d57c1
3 changes: 3 additions & 0 deletions derive-impl/src/pyclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,9 @@ fn extract_impl_attrs(attr: AttributeArgs, item: &Ident) -> Result<ExtractedImpl
.union(::rustpython_vm::types::PyTypeFlags::#ident)
});
}
flags.push(quote! {
.union(::rustpython_vm::types::PyTypeFlags::IMMUTABLETYPE)
});
} else {
bail_span!(path, "Unknown pyimpl attribute")
}
Expand Down
0