Commit Graph

15601 Commits

Author SHA1 Message Date
Jeong, YunWon
d8e582ef6e _locale.localeconv (#6941) 2026-02-02 02:02:12 +09:00
Jeong, YunWon
5e732c5e2a Fix wasip2 build (#6935) 2026-02-02 01:26:17 +09:00
CPython Developers
5997507216 Update ast from v3.14.2 2026-02-02 01:20:23 +09:00
Jeong, YunWon
68ebb61f7b fix: Include hard_deps in git commit (#6940)
Bug: update_lib quick ast was not committing _ast_unparse.py
because git_commit() only added lib_path and test_paths,
but not hard_deps.

Fixed by:
- Add hard_deps parameter to git_commit()
- Collect hard_deps from DEPENDENCIES in main()
- Add hard_deps to paths_to_add in git_commit()
2026-02-02 00:47:29 +09:00
Jeong, YunWon
d90792258d import .gitattributes from CPython (#6939) 2026-02-02 00:27:21 +09:00
Jeong, YunWon
153b0da60d automark add reasons to reason-less expectedFailures and handles parent better (#6936) 2026-02-01 22:58:07 +09:00
Jeong, YunWon
dd09f41dcc clear_after_fork (#6933) 2026-02-01 19:42:30 +09:00
Jeong, YunWon
0b9c90fcc4 Update enum from v3.14.2 (#6932)
---------

Co-authored-by: CPython Developers <>
2026-02-01 19:14:55 +09:00
Jeong, YunWon
97861c6809 Rework exception compiler to use CFG-based handler analysis (#6909)
Move exception handler tracking from compile-time fblock metadata to
a post-codegen CFG analysis pass, matching flowgraph.c's pipeline.

Compiler changes (compile.rs):
- Remove fb_handler, fb_stack_depth, fb_preserve_lasti from FBlockInfo
- Remove handler_stack_depth() and current_except_handler() helpers
- Emit SetupFinally/SetupCleanup/SetupWith/PopBlock pseudo instructions
  instead of manually tracking handlers in fblocks
- Add dead blocks after raise/break/continue/return to prevent
  dead code from corrupting the except stack
- Add missing PopTop after CallIntrinsic1 ImportStar
- Fix async comprehension SetupFinally/GetANext emission order
- Fix try-except* handler: move BUILD_LIST/COPY before handler loop
- Rework unwind_fblock for HandlerCleanup, TryExcept, FinallyTry,
  FinallyEnd, and With/AsyncWith to emit proper PopBlock sequences

New CFG analysis passes (ir.rs):
- mark_except_handlers(): mark blocks targeted by SETUP_* instructions
- label_exception_targets(): walk CFG with except stack to set
  per-instruction handler info and convert POP_BLOCK to NOP
- convert_pseudo_ops(): lower remaining pseudo ops after analysis
- Compute handler entry depth from SETUP_* type in max_stackdepth()
  (SETUP_CLEANUP=+2, SETUP_FINALLY/SETUP_WITH=+1)
- Fix SEND jump_effect from -1 to 0 (receiver stays until END_SEND)
- Add underflow guard for handler stack_depth calculation

Instruction metadata (instruction.rs):
- SetupCleanup/SetupFinally/SetupWith now carry target: Arg<Label>
- Add is_block_push()/is_pop_block() to PseudoInstruction/AnyInstruction
- Fix LoadSpecial stack_effect from (2,2) to (1,1)
- Set Setup* stack_effect_info to (0,0) for fall-through consistency

Fixes 3 test_coroutines expectedFailures:
- test_with_8, test_for_assign_raising_stop_async_iteration{,_2}
2026-02-01 17:53:57 +09:00
Jeong, YunWon
25bf682006 Fix number __format__ (#6930) 2026-02-01 17:17:09 +09:00
Jeong, YunWon
0546bb0410 more deps grouping (#6931) 2026-02-01 17:01:56 +09:00
Lee Dogeon
c6f7c6e273 Remove RustPython-specific workaround in timeit module (#6923) 2026-02-01 14:52:36 +09:00
Jeong, YunWon
5e4c3b07fb gc is vm/stdlib (#6929) 2026-02-01 13:21:24 +09:00
Jeong, YunWon
fdf93c5a19 Merge pull request #6928 from fanninpm/3.14-test-pep646-syntax
Update `test_pep646_syntax` from v3.14.2
2026-02-01 13:18:29 +09:00
Jeong, YunWon
380500c92d Merge pull request #6927 from fanninpm/3.14-test-termios
Update `test_termios` from v3.14.2
2026-02-01 13:18:04 +09:00
Jeong, YunWon
db4a2d5a9f Merge pull request #6921 from fanninpm/3.14-test-frozen
Update `test_frozen` from v3.14.2
2026-02-01 13:17:39 +09:00
Jeong, YunWon
294eb2c904 Merge pull request #6926 from fanninpm/3.14-test-string
Update `test_string` from v3.14.2
2026-02-01 13:16:57 +09:00
Jeong, YunWon
80e9172de0 Merge pull request #6922 from fanninpm/3.14-test-osx-env
Update `test_osx_env` from v3.14.2
2026-02-01 12:13:05 +09:00
Jeong, YunWon
60bec8a561 rework weakref (#6916)
* Replace WeakListInner with inline atomic weakref list and stripe locks

Remove heap-allocated WeakListInner (OncePtr<PyMutex<WeakListInner>>).
WeakRefList now holds two inline atomic pointers (head, generic).
PyWeak.parent replaced with wr_object pointing directly to referent.
Add weakref_lock module with AtomicU8 spinlock array for thread safety.
Rewrite upgrade/clear/drop_inner/count/get_weak_references with stripe lock.
Make Pointers methods public in linked_list.rs.
Remove expectedFailure from test_subclass_refs_dont_replace_standard_refs.

* Auto-format: cargo fmt --all

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-01 12:12:33 +09:00
Jeong, YunWon
3e629287da Merge pull request #6925 from fanninpm/3.14-test-select
Update `test_select` from v3.14.2
2026-02-01 12:10:39 +09:00
Padraic Fanning
f6d1fe4aa1 Add test_pep646_syntax to platform-independent tests 2026-01-31 21:48:51 -05:00
Padraic Fanning
deb517d346 Mark failing tests 2026-01-31 21:34:47 -05:00
CPython Developers
17e810e6ed Update test_frozen from v3.14.2-288-g06f9c8ca1c 2026-01-31 21:34:47 -05:00
Padraic Fanning
2bb027ac6a Mark failing tests 2026-01-31 21:23:23 -05:00
CPython Developers
553be2af33 Update test_pep646_syntax from v3.14.2-288-g06f9c8ca1c 2026-01-31 21:18:15 -05:00
Padraic Fanning
331c0bd613 Mark failing and erroring tests 2026-01-31 21:12:03 -05:00
Padraic Fanning
539f79b0b7 Skip crashing tests 2026-01-31 21:11:46 -05:00
CPython Developers
b220bddd06 Update test_termios from v3.14.2-288-g06f9c8ca1c 2026-01-31 21:05:57 -05:00
CPython Developers
771d563171 Update test_string from v3.14.2-288-g06f9c8ca1c 2026-01-31 21:00:06 -05:00
Padraic Fanning
04ee6b8adc Mark failing tests 2026-01-31 20:51:53 -05:00
Padraic Fanning
023f5efc43 Skip test that took too long 2026-01-31 20:51:34 -05:00
CPython Developers
fe3d273bfd Update test_select from v3.14.2-288-g06f9c8ca1c 2026-01-31 20:48:48 -05:00
CPython Developers
bb8f759725 Update test_osx_env from v3.14.2-288-g06f9c8ca1c 2026-01-31 19:56:55 -05:00
Jeong, YunWon
1a437fc818 Merge pull request #6920 from fanninpm/3.14-test-fork1
Update `test_fork1` from v3.14.2
2026-02-01 09:42:04 +09:00
Jeong, YunWon
111ced08e4 Fix member_descriptor to match CPython behavior (#6915)
descriptor.rs:
- Add __objclass__, __name__ (pymember) and __reduce__ (pymethod)
- Add type check (descr_check) in descr_get; simplify None branch
- Remove incorrect BASETYPE flag
- Add MemberKind::Object (_Py_T_OBJECT = 6)
- Prevent Bool slot deletion (TypeError)
- Raise AttributeError on ObjectEx deletion when already None

pyclass.rs (derive-impl):
- Remove duplicate MemberKind enum; use MemberKindStr (Option<String>)
- Simplify MemberNursery map key from (String, MemberKind) to String
- Support #[pymember(type="object")] for _Py_T_OBJECT semantics

test_inspect.py:
- Remove expectedFailure from test_getdoc (now passing)
2026-02-01 09:41:38 +09:00
Jeong, YunWon
714d1ce58b gc module internal structure and API (#6910)
* gc module internal structure and API

Add gc_state module with GcState, GcGeneration, GcDebugFlags, GcStats.
Replace gc module stubs with working API backed by gc_state.
Add gc_callbacks and gc_garbage to Context.
Add is_gc_tracked, gc_finalized, gc_get_referents to PyObject.
Collection is stubbed (returns 0) — actual algorithm to follow.

* fix dict/weakref/generators

* unmark test_asyncio

* apply review
2026-02-01 08:51:39 +09:00
Shahar Naveh
988b8b865e Make to_oparg to return a Result<Self, MarshalError> (#6914) 2026-02-01 08:50:16 +09:00
Jeong, YunWon
7ea22806d4 Merge pull request #6912 from fanninpm/3.14-test-_locale
Update `test__locale` from v3.14.2
2026-02-01 08:49:12 +09:00
ShaharNaveh
07ba834381 Update os constant to libc 0.2.180 & target cpython 3.14 2026-02-01 08:48:20 +09:00
Padraic Fanning
d04a50e835 Mark expected failures 2026-02-01 08:47:12 +09:00
CPython Developers
379e285e03 Update test_extcall from v3.14.2-288-g06f9c8ca1c 2026-02-01 08:47:12 +09:00
fanninpm
c6307d3a52 Update test_coroutines from v3.14.2 (#6918)
* Update test_coroutines from v3.14.2-288-g06f9c8ca1c

* Mark expected failures on Linux

---------

Co-authored-by: CPython Developers <>
2026-02-01 08:46:00 +09:00
Padraic Fanning
6f9320bb11 Mark failing test 2026-01-31 15:21:00 -05:00
CPython Developers
a8b0ffbfcb Update test_fork1 from v3.14.2-288-g06f9c8ca1c 2026-01-31 15:17:44 -05:00
Padraic Fanning
4d537c7b09 Skip tests that panic on macOS (and windows) 2026-01-31 15:13:23 -05:00
CPython Developers
7675e10236 Update test__locale from v3.14.2-288-g06f9c8ca1c 2026-01-31 15:13:23 -05:00
Shahar Naveh
c771427c38 Use stack_effect_info for getting pop&push count (#6913) 2026-01-31 23:45:46 +09:00
Jeong, YunWon
ba8749b792 Align del behavior (#6772)
* slot_del

* refcount inc_by for atomicity

* temp patch multithreading

* apply review
2026-01-31 23:09:10 +09:00
Copilot
cdd47b6a59 Upgrade hmac to Python 3.14.2 (#6863)
---------

Co-authored-by: moreal <26626194+moreal@users.noreply.github.com>
2026-01-31 18:40:34 +09:00
fanninpm
10cbfa9361 Add f_trace_opcodes (#6911)
* Add f_trace_opcodes

Needed for bdb, and, by extension, pdb, to work.

* Fix compile error
2026-01-31 17:03:17 +09:00