Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ea1e60e
mark version to 3.14
youknowone Jan 13, 2026
7594ef5
upgrade site to 3.14.2
youknowone Jan 13, 2026
280caea
upgrade venvlauncher
youknowone Jan 13, 2026
8d901a7
Implement bool(NotImplemented)
youknowone Jan 13, 2026
2fe140f
Fix bytes/bytearray fromhex
youknowone Jan 13, 2026
db01a1d
Remove pickle from itertools
youknowone Jan 13, 2026
eafa0c0
Fix int rounding
youknowone Jan 13, 2026
24bff8d
fix unsigned validation
youknowone Jan 13, 2026
f5b44f5
Fix Exception.__init__
youknowone Jan 13, 2026
0793bd3
co_consts
youknowone Jan 13, 2026
fdfede7
fix win clippy
youknowone Jan 16, 2026
51b6286
PEP 649 annotation phase 1
youknowone Jan 13, 2026
353a9f6
PEP 649 annotation phase 2
youknowone Jan 13, 2026
a78b569
PEP 649 annotation phase 3
youknowone Jan 13, 2026
566b6f4
PEP 649 annotation phase 4
youknowone Jan 14, 2026
dc93614
Add annotationlib,ann_module from 3.14.2
youknowone Jan 15, 2026
37cc6b4
fix whats_left to support __annotate__
youknowone Jan 16, 2026
96038e4
partially patch inspect for PEP 649 in 3.13
youknowone Jan 14, 2026
346481d
partially patch Lib/typing to 3.14
youknowone Jan 15, 2026
076d692
Upgrade string from CPython 3.14.2
Jan 15, 2026
5227938
mark and unmark unittest functions
youknowone Jan 17, 2026
33689c1
Fix jit failure
youknowone Jan 14, 2026
65e08c0
Update ensurepip from 3.14.2
Jan 16, 2026
ef22bf4
Update _colorize from CPython 3.14.2
Jan 16, 2026
d75f272
Update argparse from CPython 3.14.2
Jan 16, 2026
314a615
Update calendar from CPython 3.14.2
Jan 16, 2026
133bdf6
auto_mark_test uses regex to check Run tests? sequentially
youknowone Jan 17, 2026
faeed2c
clean up
youknowone Jan 17, 2026
60fb438
Auto-format: ruff check --select I --fix
github-actions[bot] Jan 17, 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
clean up
  • Loading branch information
youknowone committed Jan 17, 2026
commit faeed2cdcc8eb25f16f009e2ce4bc0f27cdb0bb7
7 changes: 1 addition & 6 deletions crates/codegen/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1191,12 +1191,7 @@ impl Compiler {

// Jump to body if format <= 2 (comparison is false)
let body_block = self.new_block();
emit!(
self,
Instruction::PopJumpIfFalse {
target: body_block,
}
);
emit!(self, Instruction::PopJumpIfFalse { target: body_block });

// Raise NotImplementedError
let not_implemented_error = self.name("NotImplementedError");
Expand Down
71 changes: 35 additions & 36 deletions crates/vm/src/builtins/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,12 +605,10 @@ impl PyFunction {
// Check for callable __annotate__ and clone it before calling
let annotate_fn = {
let annotate = self.annotate.lock();
if let Some(ref func) = *annotate {
if func.is_callable() {
Some(func.clone())
} else {
None
}
if let Some(ref func) = *annotate
&& func.is_callable()
{
Some(func.clone())
} else {
None
}
Expand Down Expand Up @@ -641,26 +639,24 @@ impl PyFunction {
}

#[pygetset(setter)]
fn set___annotations__(&self, value: PySetterValue, vm: &VirtualMachine) -> PyResult<()> {
match value {
PySetterValue::Assign(value) => {
if vm.is_none(&value) {
*self.annotations.lock() = None;
} else {
let annotations =
value.downcast::<crate::builtins::PyDict>().map_err(|_| {
vm.new_type_error("__annotations__ must be set to a dict object")
})?;
*self.annotations.lock() = Some(annotations);
}
// Clear __annotate__ when __annotations__ is set
*self.annotate.lock() = None;
}
PySetterValue::Delete => {
*self.annotations.lock() = None;
*self.annotate.lock() = None;
fn set___annotations__(
&self,
value: PySetterValue<Option<PyObjectRef>>,
vm: &VirtualMachine,
) -> PyResult<()> {
let annotations = match value {
PySetterValue::Assign(Some(value)) => {
let annotations = value.downcast::<crate::builtins::PyDict>().map_err(|_| {
vm.new_type_error("__annotations__ must be set to a dict object")
})?;
Some(annotations)
}
}
PySetterValue::Assign(None) | PySetterValue::Delete => None,
};
*self.annotations.lock() = annotations;

// Clear __annotate__ when __annotations__ is set
*self.annotate.lock() = None;
Ok(())
}

Expand All @@ -673,23 +669,26 @@ impl PyFunction {
}

#[pygetset(setter)]
fn set___annotate__(&self, value: PySetterValue, vm: &VirtualMachine) -> PyResult<()> {
match value {
PySetterValue::Assign(value) => {
if vm.is_none(&value) {
*self.annotate.lock() = Some(value);
} else if value.is_callable() {
*self.annotate.lock() = Some(value);
// Clear cached __annotations__ when __annotate__ is set
*self.annotations.lock() = None;
} else {
fn set___annotate__(
&self,
value: PySetterValue<Option<PyObjectRef>>,
vm: &VirtualMachine,
) -> PyResult<()> {
let annotate = match value {
PySetterValue::Assign(Some(value)) => {
if !value.is_callable() {
return Err(vm.new_type_error("__annotate__ must be callable or None"));
}
// Clear cached __annotations__ when __annotate__ is set
*self.annotations.lock() = None;
Some(value)
}
PySetterValue::Assign(None) => None,
PySetterValue::Delete => {
return Err(vm.new_type_error("__annotate__ cannot be deleted"));
}
}
};
*self.annotate.lock() = annotate;
Ok(())
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Expand Down
2 changes: 0 additions & 2 deletions crates/vm/src/vm/vm_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ impl VirtualMachine {
pub fn new_scope_with_main(&self) -> PyResult<Scope> {
let scope = self.new_scope_with_builtins();
let main_module = self.new_module("__main__", scope.globals.clone(), None);
// PEP 649: Don't automatically initialize __annotations__
// It will be lazily created by the descriptor when accessed

self.sys_module.get_attr("modules", self)?.set_item(
"__main__",
Expand Down
Loading