Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
67a137e
Implement _collections.OrderedDict
moreal Sep 22, 2026
dc8e92d
Add OrderedDict, warnings source lines, and socket sendmsg
youknowone Sep 21, 2026
182ad24
Load marshal via readinto and dump sets in dumps order
youknowone Sep 21, 2026
d8be145
Add classmethod_descriptor and ABC IS_ABSTRACT flags
youknowone Sep 22, 2026
6867000
address review: odict reuse, descr call, new wrapper
youknowone Sep 22, 2026
58791c4
Represent chflags bits with bitflagset
youknowone Sep 22, 2026
1fe22ce
Represent access and mode bits with bitflagset
youknowone Sep 22, 2026
3de8a8f
Continue unfinished REPL suites as incomplete input
youknowone Sep 22, 2026
f63b772
Add pickle and os.stat inspect signatures
youknowone Sep 22, 2026
44a1cf5
Add Unpickler, dump/load, and lstat signatures
youknowone Sep 22, 2026
a3fb270
Complete OrderedDict with insertion-order links
youknowone Sep 22, 2026
ce35d46
address CI: stat casts, HCI_DATA_DIR, passing xfails
youknowone Sep 22, 2026
498dae1
Fix wasm teardown deadlock and bluetooth constants
youknowone Sep 22, 2026
38909e2
Clear process-wide eval breaker bits in STW test
youknowone Sep 22, 2026
fdce5f2
Drop exclusive-held panic that tripped wasm clippy
youknowone Sep 22, 2026
0c38852
Fix OrderedDict contains and export Windows BDADDR
youknowone Sep 22, 2026
fddfe4b
Add cmp_to_key and hash-once LRU cache
youknowone Sep 23, 2026
305a502
Allow subclass keywords on list, tuple, and float
youknowone Sep 23, 2026
56a912f
Fix CI lint, test re-export, and structseq members
youknowone Sep 23, 2026
e47a535
Allow subclass keywords on itertools and filter
youknowone Sep 23, 2026
c7b6022
Remove text_signature derive parameter
youknowone Sep 23, 2026
5976f3a
Rename set contains_method to __contains__
youknowone Sep 23, 2026
207fa0b
Use MonitoringEvent instead of EVENT_* aliases
youknowone Sep 23, 2026
4cfcd7f
Store warnings filters as PyListRef
youknowone Sep 23, 2026
16c6d77
Re-export clear_eval_breaker_for_test after rebase
youknowone Sep 23, 2026
dc10fca
Fix groupby reentrancy and islice arguments
youknowone Sep 23, 2026
0d0c26f
SETREF warnings filters, onceregistry, and defaultaction
youknowone Sep 23, 2026
af31e63
Iterate OrderedDict inner dict via next_entry
youknowone Sep 23, 2026
299879d
Remove expectedFailure from testBluetoothConstants
youknowone Sep 23, 2026
277a5f5
Borrow get_filter arguments as PyObject
youknowone Sep 23, 2026
acd78e7
Fix bool slots and SemHandle safety docs
youknowone Sep 23, 2026
ac2e463
Keep sendmsg errors and drop duplicate linecache
youknowone Sep 24, 2026
1234e88
Nest REPL parse or-patterns for clippy
youknowone Sep 24, 2026
15f3bf4
Mark pydoc os.stat signature test expectedFailure
youknowone Sep 24, 2026
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
Add Unpickler, dump/load, and lstat signatures
Give _pickle Unpickler, dump, dumps, load, and loads clinic
text signatures, and os.lstat (path, *, dir_fd=None).

Assisted-by: Grok:grok-4.6
  • Loading branch information
youknowone committed Sep 24, 2026
commit 44a1cf5bc3e532123f07e27342a63da904532563
22 changes: 17 additions & 5 deletions crates/stdlib/src/pickle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,11 @@ mod _pickle {
}

#[pyattr]
#[pyclass(module = "_pickle", name = "Unpickler")]
#[pyclass(
module = "_pickle",
name = "Unpickler",
text_signature = "(file, *, fix_imports=True, encoding='ASCII', errors='strict', buffers=())"
)]
#[derive(Debug, PyPayload)]
pub(super) struct PyUnpickler {
read_state: PyMutex<ReadState>,
Expand Down Expand Up @@ -1662,7 +1666,9 @@ mod _pickle {
})
}

#[pyfunction]
#[pyfunction(
text_signature = "(data, /, *, fix_imports=True, encoding='ASCII', errors='strict', buffers=())"
)]
fn loads(args: LoadsArgs, vm: &VirtualMachine) -> PyResult<PyObjectRef> {
if args.data.downcastable::<PyStr>() {
return Err(vm.new_type_error("Can't load pickle from unicode string"));
Expand Down Expand Up @@ -1709,7 +1715,9 @@ mod _pickle {
buffers: OptionalArg<PyObjectRef>,
}

#[pyfunction]
#[pyfunction(
text_signature = "(file, *, fix_imports=True, encoding='ASCII', errors='strict', buffers=())"
)]
fn load(args: LoadArgs, vm: &VirtualMachine) -> PyResult<PyObjectRef> {
let peek = vm.get_attribute_opt(args.file.clone(), "peek")?;
let read = vm.get_attribute_opt(args.file.clone(), "read")?;
Expand Down Expand Up @@ -3781,7 +3789,9 @@ mod _pickle {
buffer_callback: OptionalArg<PyObjectRef>,
}

#[pyfunction]
#[pyfunction(
text_signature = "(obj, file, protocol=None, *, fix_imports=True, buffer_callback=None)"
)]
fn dump(args: DumpArgs, vm: &VirtualMachine) -> PyResult<()> {
let new_args = PicklerNewArgs {
file: args.file,
Expand Down Expand Up @@ -3821,7 +3831,9 @@ mod _pickle {
buffer_callback: OptionalArg<PyObjectRef>,
}

#[pyfunction]
#[pyfunction(
text_signature = "(obj, protocol=None, *, fix_imports=True, buffer_callback=None)"
)]
fn dumps(args: DumpsArgs, vm: &VirtualMachine) -> PyResult<PyObjectRef> {
let new_args = PicklerNewArgs {
file: vm.ctx.none(),
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/stdlib/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ pub(super) mod _os {
Ok(StatResultData::from_stat(&stat, vm).to_pyobject(vm))
}

#[pyfunction]
#[pyfunction(text_signature = "(path, *, dir_fd=None)")]
fn lstat(
path: OsPath,
dir_fd: DirFd<'_, { STAT_DIR_FD as usize }>,
Expand Down