Skip to content

Commit 5cf60a5

Browse files
committed
Import sendmsg item types only where they are used
The PyByteArray/PyBytes/PyStr/PyTuple imports are only used by the Unix sendmsg ancillary item parser and were unused on Windows. Assisted-by: Claude:claude-opus-5-5
1 parent 8e8f788 commit 5cf60a5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎crates/stdlib/src/socket.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ mod _socket {
2323
use crate::vm::{
2424
AsObject, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine,
2525
builtins::{
26-
PyBaseExceptionRef, PyByteArray, PyBytes, PyListRef, PyModule, PyOSError, PyStr,
27-
PyStrRef, PyTuple, PyTupleRef, PyTypeRef, PyUtf8StrRef,
26+
PyBaseExceptionRef, PyListRef, PyModule, PyOSError, PyStrRef, PyTupleRef, PyTypeRef,
27+
PyUtf8StrRef,
2828
},
2929
convert::{IntoPyException, ToPyObject, TryFromBorrowedObject, TryFromObject},
3030
function::{
@@ -2672,6 +2672,8 @@ mod _socket {
26722672
item: PyObjectRef,
26732673
vm: &VirtualMachine,
26742674
) -> PyResult<(i32, i32, ArgBytesLike)> {
2675+
use crate::vm::builtins::{PyByteArray, PyBytes, PyStr, PyTuple};
2676+
26752677
const FNAME: &str = "[sendmsg() ancillary data items]";
26762678
let type_name = if vm.is_none(&item) {
26772679
"None".to_owned()

0 commit comments

Comments
 (0)