Commit Graph
15838 Commits
Author SHA1 Message Date
ShaharNaveh 720c9639c4 Update test_defaultdict.py from 3.14.3 2026-02-13 18:06:47 +09:00
Jeong, YunWon bedf8278a6 Merge pull request #7089 from youknowone/io
Update io from v3.14.3 and fix
2026-02-13 15:20:32 +09:00
Jeong, YunWon a1f469db16 Update scripts/update_lib/cmd_quick.py 2026-02-13 15:20:19 +09:00
Jeong, YunWon f1282f8553 mark typing 2026-02-13 14:13:30 +09:00
Jeong, YunWon d8276943d7 Fix BytesIO and add bytearray.resize
- Add bytearray.resize() method
- BytesIO: support keyword arg for initial_bytes
- BytesIO.seek: clamp negative positions to 0
- BytesIO.close: raise BufferError on active exports
- BytesIO.getbuffer: check closed state
- Set UnsupportedOperation.__module__ to "io"
2026-02-13 14:13:30 +09:00
CPython Developers ae9caada50 Update io from v3.14.3 2026-02-13 14:13:30 +09:00
Jeong, YunWon 44d9c70d18 [update_lib] _pyio deps 2026-02-13 14:00:00 +09:00
ShaharNaveh 706e99a742 Update test_long.py from 3.14.3 2026-02-13 13:55:05 +09:00
ShaharNaveh fe966d5fef Update _pylong.py from 3.14.3 2026-02-13 13:55:05 +09:00
ShaharNaveh a1d30432d5 Update urllib from 3.14.3 2026-02-13 13:44:28 +09:00
ShaharNaveh 1d64b4991f Update test_functools.py from 3.14.3 2026-02-13 13:44:08 +09:00
ShaharNaveh 9676a1a5dd Update test_deque.py from 3.14.3 2026-02-13 13:43:46 +09:00
ShaharNaveh 223cedb49d Update test_future_stmt from 3.14.3 2026-02-13 13:43:29 +09:00
ShaharNaveh 98a47a66dd Update test_positional_only_arg.py from 3.14.3 2026-02-13 13:43:18 +09:00
ShaharNaveh 93af6e16d1 Update test_funcattrs.py from 3.14.3 2026-02-13 13:43:04 +09:00
ShaharNaveh 8203153d60 Update test_property.py from 3.14.3 2026-02-13 13:42:52 +09:00
ShaharNaveh 58352f08f2 Update test_sundry.py from 3.14.3 2026-02-13 13:42:38 +09:00
ShaharNaveh c51be99876 Update wave.py from 3.14.3 2026-02-13 13:42:22 +09:00
Jeong, YunWon 9ba591aa06 Merge pull request #7085 from youknowone/extcall
Fix dict unpacking order and improve error messages
2026-02-13 00:19:33 +09:00
Shahar Naveh 945996602b fix miri ci (#7093) 2026-02-13 00:17:53 +09:00
Jeong, YunWon 64cd3db977 Add non-iterability guard, deduplicate dict flush and missing args format 2026-02-12 14:14:38 +09:00
Jeong, YunWon 11275507b3 Remove expectedFailure from test_bad_newobj_ex_args 2026-02-12 01:49:31 +09:00
Jeong, YunWon 0ec406fc95 fix 2026-02-12 01:01:35 +09:00
CPython Developers 58a37bc839 Update test_unpack_ex from v3.14.2 2026-02-12 01:01:35 +09:00
CPython Developers d22ff7bdf6 Update test_extcall from v3.14.2 2026-02-12 01:01:35 +09:00
Jeong, YunWon 487191a914 Fix dict unpacking order and improve error messages
- Rewrite compile_dict to preserve insertion order with ** unpacking
- Fix function call error messages to include function name and
keyword-only argument counts
- Fix missing keyword-only argument error to list all missing args
- Fix starred expression error messages to match CPython
- Fix "cannot unpack non-iterable" error message
- Remove resolved expected failure markers in test_extcall and
test_unpack_ex
2026-02-12 01:01:35 +09:00
Jeong, YunWon 278b7edc8a Fix annotation scope, deadlock, MRO, and HEAPTYPE issues (#7087)
* Fix annotation scope, deadlock, MRO, and HEAPTYPE issues

Annotation scope:
- Remove module-level annotation re-scan that created phantom
  sub_tables, breaking annotation closure for comprehensions
- Add async comprehension check in symbol table with
  is_in_async_context(); annotation/type-params scopes are
  always non-async
- Save/restore CompileContext in enter/exit_annotation_scope
  to reset in_async_scope

Deadlock prevention:
- Fix TypeVar/ParamSpec/TypeVarTuple __default__ and
  evaluate_default by cloning lock contents before acquiring
  a second lock or calling Python

Other fixes:
- Add HEAPTYPE flag to Generic for correct pickle behavior
- Guard heaptype_ext access in name_inner/set___name__/
  set___qualname__ with safe checks instead of unwrap
- Fix MRO error message to include base class names
- Add "format" to varnames in TypeAlias annotation scopes
- Fix single-element tuple repr to include trailing comma

* Unmark failing markers
2026-02-12 00:30:18 +09:00
Shahar Naveh ce095a1c0a Update ruff to 0.15.0 (#7086) 2026-02-12 00:11:11 +09:00
Jeong, YunWon 42b3f9ac9d Unmark failing markers 2026-02-11 18:38:10 +09:00
Jeong, YunWon 18555f0cd7 Fix annotation scope, deadlock, MRO, and HEAPTYPE issues
Annotation scope:
- Remove module-level annotation re-scan that created phantom
  sub_tables, breaking annotation closure for comprehensions
- Add async comprehension check in symbol table with
  is_in_async_context(); annotation/type-params scopes are
  always non-async
- Save/restore CompileContext in enter/exit_annotation_scope
  to reset in_async_scope

Deadlock prevention:
- Fix TypeVar/ParamSpec/TypeVarTuple __default__ and
  evaluate_default by cloning lock contents before acquiring
  a second lock or calling Python

Other fixes:
- Add HEAPTYPE flag to Generic for correct pickle behavior
- Guard heaptype_ext access in name_inner/set___name__/
  set___qualname__ with safe checks instead of unwrap
- Fix MRO error message to include base class names
- Add "format" to varnames in TypeAlias annotation scopes
- Fix single-element tuple repr to include trailing comma
2026-02-11 18:37:42 +09:00
Jeong, YunWon adddfe605a Merge pull request #7078 from youknowone/typing
Implement more typing
2026-02-11 18:33:26 +09:00
Jeong, YunWon 84a2581372 Merge pull request #7073 from youknowone/time
update test_time and implement more time module
2026-02-11 18:29:35 +09:00
ShaharNaveh b394da7b50 Update statistics.py from 3.14.3 2026-02-11 18:01:41 +09:00
Jeong, YunWon 46a86ec036 Merge pull request #7067 from youknowone/doctest
Update doctest,test_generators from v3.14.2 and fix generator bugs
2026-02-11 17:49:59 +09:00
Copilot 344eb92d16 Sync test_abstract_numbers with CPython v3.14.3 (#7080) 2026-02-11 17:42:16 +09:00
Shahar Naveh c31458e50b Update test_tabnanny.py from 3.14.3 (#7083) 2026-02-11 17:41:57 +09:00
Jeong, YunWon 42740f7ce6 Rename constevaluator_alloc to const_evaluator_alloc, add to cspell dict 2026-02-11 17:00:30 +09:00
Jeong, YunWon 96f160211f Propagate can_see_class_scope to annotation scopes in type param blocks
Annotation scopes now inherit can_see_class_scope from parent scopes
(not just direct Class parents), allowing annotations in generic
methods inside classes to access class variables via __classdict__.

Remove 3 expectedFailure markers from test_type_params.
2026-02-11 17:00:30 +09:00
Jeong, YunWon af5c5f13bc Fix nonlocal type param check, __class_getitem__, __set_name__ note, sre module names
- Reject nonlocal binding for type parameters in symboltable
- Enable __class_getitem__ on memoryview, Template, Interpolation
- Fix __set_name__ error note to quote attribute name
- Set re.Match and re.Pattern module to "re" instead of "_sre"
- Migrate parking_lot::Mutex to PyMutex in typevar.rs
- Collapse nested if-let chains in typing_type_repr (clippy)
- Remove 5 expectedFailure markers from test files
2026-02-11 17:00:29 +09:00
Jeong, YunWon 821e29e92c Add _ConstEvaluator, evaluate_* getters, format validation
- Implement _ConstEvaluator type in _typing module with STRING
  format support via typing_type_repr (port of _Py_typing_type_repr)
- Add evaluate_bound, evaluate_constraints, evaluate_default
  pygetset properties to TypeVar, ParamSpec, TypeVarTuple
- Emit format validation in evaluator scopes
  (compile_type_param_bound_or_default, TypeAlias value scopes)
  so evaluators raise NotImplementedError for unsupported formats
- Add non-default-after-default SyntaxError in scan_type_params
- Fix ParamSpec default_value to use Mutex for proper caching
- Fix TypeVar constructor: evaluate_constraints set to None
  instead of constraints tuple for eager-constructed TypeVars
- Pass format=1 (FORMAT_VALUE) to all lazy evaluator calls
- Remove 6 expectedFailure markers from test_type_params
2026-02-11 16:59:33 +09:00
CPython Developers abec3606cf Update test_time from v3.14.3 2026-02-11 16:57:51 +09:00
Shahar Naveh 9ce0d0913c Updated libs status show datetime utc (#7082) 2026-02-11 16:57:36 +09:00
Jeong, YunWon 38562d4bce Use libc time functions on unix for time module
- Replace chrono-based gmtime/localtime/mktime/strftime/asctime/ctime
  with direct libc calls (gmtime_r, localtime_r, mktime, strftime)
  on unix, keeping chrono as fallback for non-unix platforms
- Add checked_tm_from_struct_time for struct_time field validation
- Accept None in gmtime/localtime/ctime (OptionalArg<Option<>>)
- Fix StructTimeData field order: tm_zone before tm_gmtoff
- Fix PyStructTime slot_new to accept optional dict argument
2026-02-11 16:54:13 +09:00
Jeong, YunWon 25f545f059 apply tests
Assisted-by: Codex:gpt-6
2026-02-11 16:50:23 +09:00
CPython Developers 895140afa1 Update test_generators from v3.14.2 2026-02-11 16:47:11 +09:00
CPython Developers 182fc3d79c Update doctest from v3.14.2 2026-02-11 16:47:03 +09:00
Jeong, YunWon 0c1b4cc387 Implement generator/coroutine lifecycle, tracing, and error handling
- Add interactive REPL mode: auto-print expression results in single mode
- Implement Destructor for PyGenerator and PyCoroutine
- Add locals_dirty tracking and locals_to_fast() for frame sync
- Add per-line tracing with prev_line tracking in execution loop
- Fix gen_throw to close sub-iterator on GeneratorExit (gen_close_iter)
- Pass callable object as arg in c_call/c_return/c_exception trace events
- Distinguish [Errno] vs [WinError] for CRT vs Win32 API errors
- Fix tee thread safety with AtomicBool running flag
- Fix division error messages to match expected format
2026-02-11 16:46:36 +09:00
Jeong, YunWon 0f8f6ee3c0 Replace std::sync::LazyLock with common::lock::LazyLock (#7079) 2026-02-11 16:09:42 +09:00
Jeong, YunWonandgithub-actions[bot] 37fa0cbf56 Replace once_cell with std::sync::OnceLock/core::cell::OnceCell (#7077)
* Replace `once_cell` with `std::sync::OnceLock`/`core::cell::OnceCell`

- Replace `once_cell::sync::{Lazy, OnceCell}` with
  `std::sync::{LazyLock, OnceLock}`
- Replace `once_cell::unsync::{Lazy, OnceCell}` with
  `core::cell::{LazyCell, OnceCell}`
- Inline `get_or_try_init` at call sites (unstable in std as of 1.93)
- Replace `OnceCell::with_value()` with `OnceCell::from()` in codecs.rs
- Remove `once_cell` direct dependency from common and vm crates

* Auto-format: cargo fmt --all

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-11 11:08:16 +09:00
Jeong, YunWon 1fa991de09 Add import_ensure_initialized to import_module_level (#7076)
Wait for module initialization to complete when a module is
already in sys.modules but still being initialized by another
thread. Check __spec__._initializing and call
_lock_unlock_module to block until the import finishes.
2026-02-11 10:57:10 +09:00