Skip to content
Merged
Show file tree
Hide file tree
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
apply review
  • Loading branch information
youknowone committed Dec 16, 2025
commit 639e89adc5ee3269880f457e069d425e1cdb55af
5 changes: 0 additions & 5 deletions crates/derive-impl/src/pyclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,6 @@ fn extract_impl_attrs(attr: PunctuatedNestedMeta, item: &Ident) -> Result<Extrac
}];
let mut payload = None;

let mut has_constructor = false;
for attr in attr {
match attr {
NestedMeta::Meta(Meta::List(MetaList { path, nested, .. })) => {
Expand All @@ -1639,9 +1638,6 @@ fn extract_impl_attrs(attr: PunctuatedNestedMeta, item: &Ident) -> Result<Extrac
"Try `#[pyclass(with(Constructor, ...))]` instead of `#[pyclass(with(DefaultConstructor, ...))]`. DefaultConstructor implicitly implements Constructor."
)
}
if path.is_ident("Constructor") {
has_constructor = true;
}
(
quote!(<Self as #path>::__extend_py_class),
quote!(<Self as #path>::__OWN_METHOD_DEFS),
Expand Down Expand Up @@ -1694,7 +1690,6 @@ fn extract_impl_attrs(attr: PunctuatedNestedMeta, item: &Ident) -> Result<Extrac
attr => bail_span!(attr, "Unknown pyimpl attribute"),
}
}
let _ = has_constructor;

Ok(ExtractedImplAttrs {
payload,
Expand Down
11 changes: 0 additions & 11 deletions crates/vm/src/builtins/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,17 +443,6 @@ impl PyType {
}

fn set_new(slots: &PyTypeSlots, base: &Option<PyTypeRef>) {
// if self.slots.new.load().is_none()
// && self
// .base
// .as_ref()
// .map(|base| base.class().is(ctx.types.object_type))
// .unwrap_or(false)
// && self.slots.flags.contains(PyTypeFlags::HEAPTYPE)
// {
// self.slots.flags |= PyTypeFlags::DISALLOW_INSTANTIATION;
// }

if slots.flags.contains(PyTypeFlags::DISALLOW_INSTANTIATION) {
slots.new.store(None)
} else if slots.new.load().is_none() {
Expand Down
Loading