GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Rename stdlib files to match Python module names by youknowone · Pull Request #7397 · RustPython/RustPython

Rename stdlib files to match Python module names #7397

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.

Sign up for GitHub

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
youknowone merged 1 commit into RustPython:main from youknowone:rename-stdlib
Mar 10, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

Rename stdlib files to match Python module names #7397

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1 commit
Select commit
50c19ba
Rename stdlib files to match Python module names
youknowone Mar 10, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

4 changes: 2 additions & 2 deletions 4 crates/stdlib/src/array.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ mod array {
SaturatedSlice, SequenceIndex, SequenceIndexOp, SliceableSequenceMutOp,
SliceableSequenceOp,
},
stdlib::warnings,
stdlib::_warnings,
types::{
AsBuffer, AsMapping, AsSequence, Comparable, Constructor, IterNext, Iterable,
PyComparisonOp, Representable, SelfIter,
Expand Down Expand Up @@ -647,7 +647,7 @@ mod array {
}

if spec == 'u' {
warnings::warn(
_warnings::warn(
vm.ctx.exceptions.deprecation_warning,
"The 'u' type code is deprecated and will be removed in Python 3.16".to_owned(),
1,
Expand Down
2 changes: 1 addition & 1 deletion 2 crates/stdlib/src/faulthandler.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ mod decl {
// Get all threads' frame stacks from the shared registry
#[cfg(feature = "threading")]
{
let current_tid = rustpython_vm::stdlib::thread::get_ident();
let current_tid = rustpython_vm::stdlib::_thread::get_ident();
let registry = vm.state.thread_frames.lock();

// First dump non-current threads, then current thread last
Expand Down
10 changes: 5 additions & 5 deletions 10 crates/stdlib/src/fcntl.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mod fcntl {
PyResult, VirtualMachine,
builtins::PyIntRef,
function::{ArgMemoryBuffer, ArgStrOrBytesLike, Either, OptionalArg},
stdlib::io,
stdlib::_io,
};

// TODO: supply these from <asm-generic/fnctl.h> (please file an issue/PR upstream):
Expand Down Expand Up @@ -57,7 +57,7 @@ mod fcntl {

#[pyfunction]
fn fcntl(
io::Fildes(fd): io::Fildes,
_io::Fildes(fd): _io::Fildes,
cmd: i32,
arg: OptionalArg<Either<ArgStrOrBytesLike, PyIntRef>>,
vm: &VirtualMachine,
Expand Down Expand Up @@ -91,7 +91,7 @@ mod fcntl {

#[pyfunction]
fn ioctl(
io::Fildes(fd): io::Fildes,
_io::Fildes(fd): _io::Fildes,
request: i64,
arg: OptionalArg<Either<Either<ArgMemoryBuffer, ArgStrOrBytesLike>, i32>>,
mutate_flag: OptionalArg<bool>,
Expand Down Expand Up @@ -149,7 +149,7 @@ mod fcntl {
// XXX: at the time of writing, wasi and redox don't have the necessary constants/function
#[cfg(not(any(target_os = "wasi", target_os = "redox")))]
#[pyfunction]
fn flock(io::Fildes(fd): io::Fildes, operation: i32, vm: &VirtualMachine) -> PyResult {
fn flock(_io::Fildes(fd): _io::Fildes, operation: i32, vm: &VirtualMachine) -> PyResult {
let ret = unsafe { libc::flock(fd, operation) };
// TODO: add support for platforms that don't have a builtin `flock` syscall
if ret < 0 {
Expand All @@ -162,7 +162,7 @@ mod fcntl {
#[cfg(not(any(target_os = "wasi", target_os = "redox")))]
#[pyfunction]
fn lockf(
io::Fildes(fd): io::Fildes,
_io::Fildes(fd): _io::Fildes,
cmd: i32,
len: OptionalArg<PyIntRef>,
start: OptionalArg<PyIntRef>,
Expand Down
4 changes: 2 additions & 2 deletions 4 crates/stdlib/src/select.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ mod decl {
common::lock::PyMutex,
convert::{IntoPyException, ToPyObject},
function::OptionalArg,
stdlib::io::Fildes,
stdlib::_io::Fildes,
};
use core::{convert::TryFrom, time::Duration};
use libc::pollfd;
Expand Down Expand Up @@ -554,7 +554,7 @@ mod decl {
common::lock::{PyRwLock, PyRwLockReadGuard},
convert::{IntoPyException, ToPyObject},
function::OptionalArg,
stdlib::io::Fildes,
stdlib::_io::Fildes,
types::Constructor,
};
use core::ops::Deref;
Expand Down
4 changes: 2 additions & 2 deletions 4 crates/stdlib/src/ssl.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mod _ssl {
function::{
ArgBytesLike, ArgMemoryBuffer, Either, FuncArgs, OptionalArg, PyComparisonValue,
},
stdlib::warnings,
stdlib::_warnings,
types::{Comparable, Constructor, Hashable, PyComparisonOp, Representable},
},
};
Expand Down Expand Up @@ -976,7 +976,7 @@ mod _ssl {

// Warn if any deprecated options are being newly set
if (set & opt_no) != 0 {
warnings::warn(
_warnings::warn(
vm.ctx.exceptions.deprecation_warning,
"ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are deprecated".to_owned(),
2, // stack_level = 2
Expand Down
4 changes: 2 additions & 2 deletions 4 crates/vm/src/builtins/complex.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
convert::{IntoPyException, ToPyObject, ToPyResult},
function::{FuncArgs, OptionalArg, PyComparisonValue},
protocol::PyNumberMethods,
stdlib::warnings,
stdlib::_warnings,
types::{AsNumber, Comparable, Constructor, Hashable, PyComparisonOp, Representable},
};
use core::cell::Cell;
Expand Down Expand Up @@ -95,7 +95,7 @@ impl PyObjectRef {

let ret_class = result.class().to_owned();
if let Some(ret) = result.downcast_ref::<PyComplex>() {
warnings::warn(
_warnings::warn(
vm.ctx.exceptions.deprecation_warning,
format!(
"__complex__ returned non-complex (type {ret_class}). \
Expand Down
2 changes: 1 addition & 1 deletion 2 crates/vm/src/builtins/genericalias.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ pub fn subscript_generic(type_params: PyObjectRef, vm: &VirtualMachine) -> PyRes
PyTuple::new_ref(vec![type_params], &vm.ctx)
};

let args = crate::stdlib::typing::unpack_typevartuples(&params, vm)?;
let args = crate::stdlib::_typing::unpack_typevartuples(&params, vm)?;

generic_alias_class.call((generic_type, args.to_pyobject(vm)), vm)
}
Expand Down
4 changes: 3 additions & 1 deletion 4 crates/vm/src/builtins/tuple.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ impl PyPayload for PyTuple {

#[inline]
unsafe fn freelist_push(obj: *mut PyObject) -> bool {
let len = unsafe { &*(obj as *const crate::Py<PyTuple>) }.elements.len();
let len = unsafe { &*(obj as *const crate::Py<PyTuple>) }
.elements
.len();
if len == 0 || len > TupleFreeList::MAX_SAVE_SIZE {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion 2 crates/vm/src/builtins/union.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
convert::ToPyObject,
function::PyComparisonValue,
protocol::{PyMappingMethods, PyNumberMethods},
stdlib::typing::{TypeAliasType, call_typing_func_object},
stdlib::_typing::{TypeAliasType, call_typing_func_object},
types::{AsMapping, AsNumber, Comparable, GetAttr, Hashable, PyComparisonOp, Representable},
};
use alloc::fmt;
Expand Down
16 changes: 8 additions & 8 deletions 16 crates/vm/src/frame.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{
protocol::{PyIter, PyIterReturn},
scope::Scope,
sliceable::SliceableSequenceOp,
stdlib::{builtins, sys::monitoring, typing},
stdlib::{_typing, builtins, sys::monitoring},
types::{PyComparisonOp, PyTypeFlags},
vm::{Context, PyMethod},
};
Expand Down Expand Up @@ -9134,19 +9134,19 @@ impl ExecutingFrame<'_> {
}
bytecode::IntrinsicFunction1::TypeVar => {
let type_var: PyObjectRef =
typing::TypeVar::new(vm, arg.clone(), vm.ctx.none(), vm.ctx.none())
_typing::TypeVar::new(vm, arg.clone(), vm.ctx.none(), vm.ctx.none())
.into_ref(&vm.ctx)
.into();
Ok(type_var)
}
bytecode::IntrinsicFunction1::ParamSpec => {
let param_spec: PyObjectRef = typing::ParamSpec::new(arg.clone(), vm)
let param_spec: PyObjectRef = _typing::ParamSpec::new(arg.clone(), vm)
.into_ref(&vm.ctx)
.into();
Ok(param_spec)
}
bytecode::IntrinsicFunction1::TypeVarTuple => {
let type_var_tuple: PyObjectRef = typing::TypeVarTuple::new(arg.clone(), vm)
let type_var_tuple: PyObjectRef = _typing::TypeVarTuple::new(arg.clone(), vm)
.into_ref(&vm.ctx)
.into();
Ok(type_var_tuple)
Expand Down Expand Up @@ -9179,7 +9179,7 @@ impl ExecutingFrame<'_> {
let name = name
.downcast::<crate::builtins::PyStr>()
.map_err(|_| vm.new_type_error("TypeAliasType name must be a string"))?;
let type_alias = typing::TypeAliasType::new(name, type_params, compute_value);
let type_alias = _typing::TypeAliasType::new(name, type_params, compute_value);
Ok(type_alias.into_ref(&vm.ctx).into())
}
bytecode::IntrinsicFunction1::ListToTuple => {
Expand Down Expand Up @@ -9225,7 +9225,7 @@ impl ExecutingFrame<'_> {
) -> PyResult {
match func {
bytecode::IntrinsicFunction2::SetTypeparamDefault => {
crate::stdlib::typing::set_typeparam_default(arg1, arg2, vm)
crate::stdlib::_typing::set_typeparam_default(arg1, arg2, vm)
}
bytecode::IntrinsicFunction2::SetFunctionTypeParams => {
// arg1 is the function, arg2 is the type params tuple
Expand All @@ -9235,14 +9235,14 @@ impl ExecutingFrame<'_> {
}
bytecode::IntrinsicFunction2::TypeVarWithBound => {
let type_var: PyObjectRef =
typing::TypeVar::new(vm, arg1.clone(), arg2, vm.ctx.none())
_typing::TypeVar::new(vm, arg1.clone(), arg2, vm.ctx.none())
.into_ref(&vm.ctx)
.into();
Ok(type_var)
}
bytecode::IntrinsicFunction2::TypeVarWithConstraint => {
let type_var: PyObjectRef =
typing::TypeVar::new(vm, arg1.clone(), vm.ctx.none(), arg2)
_typing::TypeVar::new(vm, arg1.clone(), vm.ctx.none(), arg2)
.into_ref(&vm.ctx)
.into();
Ok(type_var)
Expand Down
2 changes: 1 addition & 1 deletion 2 crates/vm/src/ospath.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl PathConverter {
.class()
.is(crate::builtins::bool_::PyBool::static_type())
{
crate::stdlib::warnings::warn(
crate::stdlib::_warnings::warn(
vm.ctx.exceptions.runtime_warning,
"bool is used as a file descriptor".to_owned(),
1,
Expand Down
10 changes: 5 additions & 5 deletions 10 crates/vm/src/protocol/number.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
common::int::{BytesToIntError, bytes_to_int},
function::ArgBytesLike,
object::{Traverse, TraverseFn},
stdlib::warnings,
stdlib::_warnings,
};

pub type PyNumberUnaryFunc<R = PyObjectRef> = fn(PyNumber<'_>, &VirtualMachine) -> PyResult<R>;
Expand Down Expand Up @@ -59,7 +59,7 @@ impl PyObject {
} else if let Some(i) = self.number().int(vm).or_else(|| self.try_index_opt(vm)) {
i
} else if let Ok(Some(f)) = vm.get_special_method(self, identifier!(vm, __trunc__)) {
warnings::warn(
_warnings::warn(
vm.ctx.exceptions.deprecation_warning,
"The delegation of int() to __trunc__ is deprecated.".to_owned(),
1,
Expand Down Expand Up @@ -589,7 +589,7 @@ impl PyNumber<'_> {

let ret_class = ret.class().to_owned();
if let Some(ret) = ret.downcast_ref::<PyInt>() {
warnings::warn(
_warnings::warn(
vm.ctx.exceptions.deprecation_warning,
format!(
"__int__ returned non-int (type {ret_class}). \
Expand Down Expand Up @@ -622,7 +622,7 @@ impl PyNumber<'_> {

let ret_class = ret.class().to_owned();
if let Some(ret) = ret.downcast_ref::<PyInt>() {
warnings::warn(
_warnings::warn(
vm.ctx.exceptions.deprecation_warning,
format!(
"__index__ returned non-int (type {ret_class}). \
Expand Down Expand Up @@ -655,7 +655,7 @@ impl PyNumber<'_> {

let ret_class = ret.class().to_owned();
if let Some(ret) = ret.downcast_ref::<PyFloat>() {
warnings::warn(
_warnings::warn(
vm.ctx.exceptions.deprecation_warning,
format!(
"__float__ returned non-float (type {ret_class}). \
Expand Down
2 changes: 1 addition & 1 deletion 2 crates/vm/src/signal.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub fn assert_in_range(signum: i32, vm: &VirtualMachine) -> PyResult<()> {
#[allow(dead_code)]
#[cfg(all(not(target_arch = "wasm32"), feature = "host_env"))]
pub fn set_interrupt_ex(signum: i32, vm: &VirtualMachine) -> PyResult<()> {
use crate::stdlib::signal::_signal::{SIG_DFL, SIG_IGN, run_signal};
use crate::stdlib::_signal::_signal::{SIG_DFL, SIG_IGN, run_signal};
assert_in_range(signum, vm)?;

match signum as usize {
Expand Down
4 changes: 2 additions & 2 deletions 4 crates/vm/src/stdlib/ast.rs → crates/vm/src/stdlib/_ast.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub(crate) use python::_ast::module_def;
mod pyast;

use crate::builtins::{PyInt, PyStr};
use crate::stdlib::ast::module::{Mod, ModFunctionType, ModInteractive};
use crate::stdlib::ast::node::BoxedSlice;
use crate::stdlib::_ast::module::{Mod, ModFunctionType, ModInteractive};
use crate::stdlib::_ast::node::BoxedSlice;
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyRefExact, PyResult,
TryFromObject, VirtualMachine,
Expand Down
0 crates/vm/src/stdlib/ast/argument.rs → crates/vm/src/stdlib/_ast/argument.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/basic.rs → crates/vm/src/stdlib/_ast/basic.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/constant.rs → crates/vm/src/stdlib/_ast/constant.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/elif_else_clause.rs → ...es/vm/src/stdlib/_ast/elif_else_clause.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/exception.rs → crates/vm/src/stdlib/_ast/exception.rs
Show comments
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 crates/vm/src/stdlib/ast/expression.rs → crates/vm/src/stdlib/_ast/expression.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::*;
use crate::stdlib::ast::{
use crate::stdlib::_ast::{
argument::{merge_function_call_arguments, split_function_call_arguments},
constant::Constant,
string::JoinedStr,
Expand Down
2 changes: 1 addition & 1 deletion 2 crates/vm/src/stdlib/ast/module.rs → crates/vm/src/stdlib/_ast/module.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::*;
use crate::stdlib::ast::type_ignore::TypeIgnore;
use crate::stdlib::_ast::type_ignore::TypeIgnore;
use rustpython_compiler_core::SourceFile;

/// Represents the different types of Python module structures.
Expand Down
0 crates/vm/src/stdlib/ast/node.rs → crates/vm/src/stdlib/_ast/node.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/operator.rs → crates/vm/src/stdlib/_ast/operator.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/other.rs → crates/vm/src/stdlib/_ast/other.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/parameter.rs → crates/vm/src/stdlib/_ast/parameter.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/pattern.rs → crates/vm/src/stdlib/_ast/pattern.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/pyast.rs → crates/vm/src/stdlib/_ast/pyast.rs
Show comments
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 crates/vm/src/stdlib/ast/python.rs → crates/vm/src/stdlib/_ast/python.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub(crate) mod _ast {
class::{PyClassImpl, StaticType},
common::wtf8::Wtf8,
function::{FuncArgs, KwArgs, PyMethodDef, PyMethodFlags},
stdlib::ast::repr,
stdlib::_ast::repr,
types::{Constructor, Initializer},
warn,
};
Expand Down
2 changes: 1 addition & 1 deletion 2 crates/vm/src/stdlib/ast/repr.rs → crates/vm/src/stdlib/_ast/repr.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
AsObject, PyObjectRef, PyResult, VirtualMachine,
builtins::{PyList, PyTuple},
class::PyClassImpl,
stdlib::ast::NodeAst,
stdlib::_ast::NodeAst,
};
use rustpython_common::wtf8::Wtf8Buf;

Expand Down
2 changes: 1 addition & 1 deletion 2 crates/vm/src/stdlib/ast/statement.rs → crates/vm/src/stdlib/_ast/statement.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::*;
use crate::stdlib::ast::argument::{merge_class_def_args, split_class_def_args};
use crate::stdlib::_ast::argument::{merge_class_def_args, split_class_def_args};
use rustpython_compiler_core::SourceFile;

// sum
Expand Down
0 crates/vm/src/stdlib/ast/string.rs → crates/vm/src/stdlib/_ast/string.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/type_ignore.rs → crates/vm/src/stdlib/_ast/type_ignore.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/type_parameters.rs → crates/vm/src/stdlib/_ast/type_parameters.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ast/validate.rs → crates/vm/src/stdlib/_ast/validate.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/codecs.rs → crates/vm/src/stdlib/_codecs.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/collections.rs → crates/vm/src/stdlib/_collections.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ctypes.rs → crates/vm/src/stdlib/_ctypes.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ctypes/array.rs → crates/vm/src/stdlib/_ctypes/array.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ctypes/base.rs → crates/vm/src/stdlib/_ctypes/base.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ctypes/function.rs → crates/vm/src/stdlib/_ctypes/function.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ctypes/library.rs → crates/vm/src/stdlib/_ctypes/library.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ctypes/pointer.rs → crates/vm/src/stdlib/_ctypes/pointer.rs
Show comments
View file
Open in desktop
File renamed without changes.
0 crates/vm/src/stdlib/ctypes/simple.rs → crates/vm/src/stdlib/_ctypes/simple.rs
Show comments
View file
Open in desktop
File renamed without changes.
4 changes: 2 additions & 2 deletions 4 crates/vm/src/stdlib/ctypes/structure.rs → crates/vm/src/stdlib/_ctypes/structure.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::builtins::{PyList, PyStr, PyTuple, PyType, PyTypeRef, PyUtf8Str};
use crate::convert::ToPyObject;
use crate::function::{FuncArgs, OptionalArg, PySetterValue};
use crate::protocol::{BufferDescriptor, PyBuffer, PyNumberMethods};
use crate::stdlib::warnings;
use crate::stdlib::_warnings;
use crate::types::{AsBuffer, AsNumber, Constructor, Initializer, SetAttr};
use crate::{AsObject, Py, PyObjectRef, PyPayload, PyResult, VirtualMachine};
use alloc::borrow::Cow;
Expand Down Expand Up @@ -259,7 +259,7 @@ impl PyCStructType {
cls.name(),
base_type_name,
);
warnings::warn(vm.ctx.exceptions.deprecation_warning, msg, 1, vm)?;
_warnings::warn(vm.ctx.exceptions.deprecation_warning, msg, 1, vm)?;
}
}

Expand Down
4 changes: 2 additions & 2 deletions 4 crates/vm/src/stdlib/ctypes/union.rs → crates/vm/src/stdlib/_ctypes/union.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::builtins::{PyList, PyStr, PyTuple, PyType, PyTypeRef, PyUtf8Str};
use crate::convert::ToPyObject;
use crate::function::{ArgBytesLike, FuncArgs, OptionalArg, PySetterValue};
use crate::protocol::{BufferDescriptor, PyBuffer};
use crate::stdlib::warnings;
use crate::stdlib::_warnings;
use crate::types::{AsBuffer, Constructor, Initializer, SetAttr};
use crate::{AsObject, Py, PyObjectRef, PyPayload, PyResult, VirtualMachine};
use alloc::borrow::Cow;
Expand Down Expand Up @@ -177,7 +177,7 @@ impl PyCUnionType {
Python 3.19.",
cls.name(),
);
warnings::warn(vm.ctx.exceptions.deprecation_warning, msg, 1, vm)?;
_warnings::warn(vm.ctx.exceptions.deprecation_warning, msg, 1, vm)?;
}
}

Expand Down
0 crates/vm/src/stdlib/functools.rs → crates/vm/src/stdlib/_functools.rs
Show comments
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 crates/vm/src/stdlib/imp.rs → crates/vm/src/stdlib/_imp.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub use crate::vm::resolve_frozen_alias;
#[cfg(feature = "threading")]
#[pymodule(sub)]
mod lock {
use crate::{PyResult, VirtualMachine, stdlib::thread::RawRMutex};
use crate::{PyResult, VirtualMachine, stdlib::_thread::RawRMutex};

static IMP_LOCK: RawRMutex = RawRMutex::INIT;

Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.