Commit Graph
332 Commits
Author SHA1 Message Date
Jeong, YunWon 2da102fab8 FromArgs with error_msg (#6804) 2026-01-20 02:10:19 +09:00
Jeong, YunWonandgithub-actions[bot] 82a8f67c71 Replace custom opcodes with CPython standard sequences (#6794)
* Replace custom opcodes with standard sequences

Remove RustPython-specific opcodes (BuildListFromTuples,
BuildMapForCall, BuildSetFromTuples, BuildTupleFromTuples)
and replace their usage with CPython 3.14 standard opcode
sequences:

- BuildListFromTuples → BUILD_LIST + LIST_EXTEND loop
- BuildSetFromTuples → BUILD_SET + SET_UPDATE loop
- BuildTupleFromTuples → BUILD_LIST + LIST_EXTEND + CALL_INTRINSIC_1(ListToTuple)
- BuildMapForCall → DICT_MERGE loop

Implement missing opcodes:
- ListExtend: Extend list with iterable elements
- SetUpdate: Add iterable elements to set
- DictMerge: Merge dict with duplicate key checking

* Auto-generate: generate_opcode_metadata.py

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-20 00:34:46 +09:00
Jeong, YunWon d7a885cea8 sys._clear_type_descriptors (#6795) 2026-01-19 16:43:20 +09:00
Jeong, YunWon 6a064aad3b Drop for PySSLSocket (#6791) 2026-01-19 10:01:11 +09:00
Jeong, YunWon 130bb82a43 LoadClosure as pseudo op (#6789) 2026-01-19 02:45:00 +09:00
Jeong, YunWon 0717b53123 Align CallFunctionEx to 3.14 (#6786) 2026-01-19 00:37:18 +09:00
Jeong, YunWonandCPython Devleopers 3a9f020234 update test_sys from 3.14.2 (#6781)
* sys.is_remote_debug_enabled, supports_isolated_interpreters

* Update test_sys form Python 3.14.2

---------

Co-authored-by: CPython Devleopers <>
2026-01-18 23:58:39 +09:00
Jiseok CHOI 050db4725f sqlite3: fix Connection.cursor() factory argument handling (#6783)
Fix test_is_instance in CursorFactoryTests by properly handling the
factory argument in Connection.cursor() method. Now the factory can
be passed as both positional and keyword argument, and returns the
correct subclass type instead of always returning PyRef<Cursor>.

- Use FromArgs derive macro with CursorArgs struct for argument parsing
- Return PyObjectRef instead of PyRef<Cursor> to allow subclasses
- Use fast_issubclass to validate returned cursor is a Cursor subclass
- Properly differentiate between 'no argument' and 'None passed'
2026-01-18 23:37:47 +09:00
Jeong, YunWon 9301ae2746 traverse and clear (#6780) 2026-01-18 23:23:11 +09:00
Jeong, YunWon 252fa816d6 sys._jit (#6779) 2026-01-18 21:54:44 +09:00
Jeong, YunWon 6f266651c0 better ssl write handling (#6763)
* ssl_write

* Fix thread count timing
2026-01-18 21:10:35 +09:00
Jeong, YunWon f8a78e6ab6 stack soft limit (#6754) 2026-01-18 18:09:55 +09:00
Jeong, YunWon 1ccd99ea20 use ast namespace (#6769) 2026-01-18 17:30:36 +09:00
Jeong, YunWon eb50246b41 fix annotation (#6767) 2026-01-18 15:24:17 +09:00
Jeong, YunWon 7c7b824aa9 fix asyncgen finalizer (#6761) 2026-01-18 14:18:30 +09:00
fanninpmandJeong, YunWon e4ce70bbda Update Lib/warnings to CPython 3.14 (#6762)
* Update Lib/warnings to CPython 3.14

* Add context_aware_warnings setting

XXX- The default setting of this and thread_inherit_context should be
true.

* Unmark passing test

* Mark failing tests

* Skip failing test in test_sys for now

Updating test_sys to CPython 3.14 is beyond the scope of this PR.

* test_improper_option is fixed

---------

Co-authored-by: Jeong, YunWon <jeong@youknowone.org>
2026-01-18 13:59:49 +09:00
Jeong, YunWon abea6bd114 traverse for generator (#6760) 2026-01-18 09:36:09 +09:00
Jeong, YunWonandCPython Devleopers ca76cb7bb0 thread_inherit_context, upgrade threading & contextvar (#6727)
* thread_inherit_context

* Update contextvar, threading from CPython 3.14.2

* partially patch test_sys to 3.14.2

---------

Co-authored-by: CPython Devleopers <>
2026-01-18 08:53:41 +09:00
Jeong, YunWon 11c9b0e783 fix finalizing and atexit timing (#6626)
* fix finalizing and atexit timing

* fix shutdown
2026-01-18 01:54:16 +09:00
Jeong, YunWon 6df3753229 Py 3.14 changes fix (#6755)
* marshal v5

* conditional blclk

* fix jit don't use lossy string

* add varname

* symboltable takes responsibility of __debug__
2026-01-18 01:02:40 +09:00
Shahar Naveh 6dd5e36d02 Remove misleading placeholder comments (#6757) 2026-01-17 22:53:00 +09:00
Jeong, YunWon faeed2cdcc clean up 2026-01-17 19:22:18 +09:00
Jeong, YunWon 33689c1d0f Fix jit failure 2026-01-17 19:22:00 +09:00
Jeong, YunWon 566b6f438b PEP 649 annotation phase 4 2026-01-17 19:21:11 +09:00
Jeong, YunWon a78b569d92 PEP 649 annotation phase 3 2026-01-17 19:21:11 +09:00
Jeong, YunWon 353a9f6104 PEP 649 annotation phase 2 2026-01-17 19:21:11 +09:00
Jeong, YunWon 51b628642c PEP 649 annotation phase 1 2026-01-17 19:21:11 +09:00
Jeong, YunWon fdfede7545 fix win clippy 2026-01-17 19:21:11 +09:00
Jeong, YunWon 0793bd3d08 co_consts 2026-01-17 19:21:11 +09:00
Jeong, YunWon f5b44f505a Fix Exception.__init__ 2026-01-17 19:21:11 +09:00
Jeong, YunWon 24bff8d5bf fix unsigned validation 2026-01-17 19:21:11 +09:00
Jeong, YunWon eafa0c0149 Fix int rounding 2026-01-17 19:21:11 +09:00
Jeong, YunWon db01a1d653 Remove pickle from itertools 2026-01-17 19:21:11 +09:00
Jeong, YunWon 2fe140fdb9 Fix bytes/bytearray fromhex 2026-01-17 19:21:11 +09:00
Jeong, YunWon 8d901a7300 Implement bool(NotImplemented) 2026-01-17 19:21:10 +09:00
Jeong, YunWon ea1e60e9ca mark version to 3.14 2026-01-17 19:21:10 +09:00
Jeong, YunWon f4363a6b27 PEP 750 tstring (#6744) 2026-01-17 18:41:40 +09:00
Jeong, YunWon 02cc257b42 Support pickle better with __getnewargs_ex__ (#6749)
* Implement pickle more

* add weakref check

* check exports in __setstate__

* remove reducelib
2026-01-17 18:37:16 +09:00
Terry Tianlin Luan 833f7343c8 Update email library v3.13.11 (#6642)
* Updated the email library + added test suite

* Added Windows altzone + Fixed memory error in `bytes_inner.rs`
2026-01-17 18:15:35 +09:00
Jeong, YunWonandgithub-actions[bot] e9a57d172b correct builtins type under function (#6745)
* correct buitins type

* Auto-format: ruff format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-17 00:00:16 +09:00
Shahar Naveh 380fa39eba Bytecode instrumented placeholder (#6741)
* Add all other bytecodes

* Mark passing/failing tests
2026-01-16 23:08:06 +09:00
Jeong, YunWon 746e71af87 reject SemLock reduce (#6738) 2026-01-16 10:18:31 +09:00
Jeong, YunWon a0ace054f3 Fix asyncio compile (#6739) 2026-01-16 09:12:16 +09:00
Lee DogeonandClaude Opus 4.5 3a702ac772 Improve json.loads performance (#6704)
* Parse JSON in Rust

* Reuse key when decoding JSON

* Unmark resolved test

* Parse null/true/false directly in call_scan_once

Parse JSON constants (null, true, false) directly in Rust within
call_scan_once() instead of falling back to Python scan_once.
This reduces Python-Rust boundary crossings for array/object values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Parse numbers directly in call_scan_once

Parse JSON numbers starting with digits (0-9) directly in Rust within
call_scan_once() by reusing the existing parse_number() method.
This reduces Python-Rust boundary crossings for array/object values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Parse NaN/Infinity/-Infinity in call_scan_once

Parse special JSON constants (NaN, Infinity, -Infinity) and negative
numbers directly in Rust within call_scan_once(). This handles:
- 'N' -> NaN via parse_constant callback
- 'I' -> Infinity via parse_constant callback
- '-' -> -Infinity or negative numbers via parse_constant/parse_number

This reduces Python-Rust boundary crossings for array/object values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Correct wrong index access

* Leave more flame span

* Refactor json scanstring with byte index

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 19:53:46 +09:00
Shahar Naveh e3890f9b4a Bytecode pseudo opcodes (#6715) 2026-01-15 02:52:25 +09:00
Jeong, YunWon 3d4aaaa6c1 thread.setname and context (#6726) 2026-01-14 17:20:52 +09:00
Lee Dogeon 49e6931c7e Introduce flame_guard in rustpython-stdlib too (#6722) 2026-01-14 09:14:05 +09:00
Shahar Naveh 9eeea925c7 Move OpArg to its own file (#6703)
* Move OpArg to its own file

* Fix merge

* Fix more merge
2026-01-14 08:58:49 +09:00
Jeong, YunWon bb57724d3b flush on WantWrite (#6717) 2026-01-13 22:05:49 +09:00
Jeong, YunWon f9e2f9d273 Upgrade math,cmath to 3.14.2 and totally delegate to pymath (#6705)
* Upgrade test_math, test_cmath from 3.14.2

* pymath 0.1.5
2026-01-13 22:05:32 +09:00