Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion Lib/test/test_weakref.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ def __imatmul__(self, other):
# was not honored, and was broken in different ways for
# PyWeakref_NewRef() and PyWeakref_NewProxy(). (Two tests.)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_shared_ref_without_callback(self):
self.check_shared_without_callback(weakref.ref)

Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/weakref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Constructor for PyWeak {
let referent = positional
.next()
.ok_or_else(|| vm.new_type_error("__new__ expected at least 1 argument, got 0"))?;
let callback = positional.next();
let callback = positional.next().filter(|callback| !vm.is_none(callback));
if let Some(_extra) = positional.next() {
let got = positional.count() + 3;
return Err(
Expand Down
Loading