Commit Graph

16043 Commits

Author SHA1 Message Date
Jeong, YunWon
0e48ca95f2 extend timeout 2026-02-28 10:35:38 +09:00
Jeong, YunWon
211823e498 Fix dict race condition 2026-02-28 10:35:38 +09:00
Shahar Naveh
72570c521c Update CI ruff to 0.15.4 (#7250)
* Update CI ruff to 0.15.4

* Format
2026-02-28 10:34:38 +09:00
Shahar Naveh
2447d99b12 Specify minor version for pyo3 (#7248)
* Specify minor version for pyo3

* Auto-format: ruff format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-28 10:34:04 +09:00
Shahar Naveh
e51d6f0df7 Disallow warnings patches (#7249)
* Apply patches

* Remove struct cfg_attr

* Auto-format: ruff format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-27 23:48:09 +09:00
Shahar Naveh
4f577e5f99 Update ruff to 0.15.4 (#7246)
* Update ruff to 0.15.4

* Unmark passing test
2026-02-27 22:59:41 +09:00
Jiseok CHOI
221dfc2e02 Fix IOBase.isatty() to raise ValueError on closed files (#7233)
* Fix IOBase.isatty() to raise ValueError on closed files

* Add snippet test for IOBase.isatty() closed check
2026-02-27 21:04:47 +09:00
Jiseok CHOI
c5472e2a4e sqlite3: reject negative fetchmany values (#7240) 2026-02-27 21:03:40 +09:00
Jiseok CHOI
f7fe9c53cb sqlite3: reject negative arraysize values (#7238) 2026-02-27 20:59:15 +09:00
Jiseok CHOI
f8d8e25de4 Fix IOBase.fileno() incorrect error message (#7232)
fileno() was calling _unsupported with "truncate" instead of "fileno",
causing UnsupportedOperation('truncate') to be raised instead of
UnsupportedOperation('fileno').

CPython 3.14 reference: Modules/_io/iobase.c calls iobase_unsupported(state, "fileno")
Fixes: ever0de/RustPython#1
2026-02-27 20:46:42 +09:00
Jeong, YunWon
89fb3494f4 Merge pull request #7223 from youknowone/tarfile
Update tarfile from v3.14.3 and fix bugs
2026-02-27 20:44:16 +09:00
Shahar Naveh
8b27eaf8f1 Update test_atexit.py to 3.14.3 (#7217) 2026-02-27 19:29:59 +09:00
Jeong, YunWon
f1511c4be0 Merge pull request #7242 from ShaharNaveh/update-xml
Update `xml` to 3.14.3
2026-02-27 19:25:25 +09:00
ShaharNaveh
eed53cbe9d Patch test_sax.py 2026-02-27 10:05:21 +01:00
ShaharNaveh
fa68faa2e5 Mark failing tests at test_pyexpat.py 2026-02-27 09:58:46 +01:00
ShaharNaveh
b7589a752b Mark failing tests on test_minidom.py 2026-02-27 09:55:31 +01:00
ShaharNaveh
c6562efce5 Patch test_xml_etree.py 2026-02-27 09:49:35 +01:00
ShaharNaveh
fd5e91dbff Update xml to 3.14.3 2026-02-27 09:44:41 +01:00
Jeong, YunWon
36cffabeda xz2->liblzma and remove liblzma-sys 2026-02-27 17:39:12 +09:00
Jeong, YunWon
ff02c266ac Unmark test_lzma 2026-02-27 16:53:55 +09:00
Jeong, YunWon
3be78c6545 new_lzma_error 2026-02-27 16:53:55 +09:00
CPython Developers
df9fb69de5 Update tarfile from v3.14.3 2026-02-27 16:53:55 +09:00
Jiseok CHOI
09cf49204b fix: add flush method to BytesIO (#7235) 2026-02-27 16:53:17 +09:00
Shahar Naveh
4c2537010d Update http from 3.14.3 (#7137)
* Update `http` from 3.14.3

* Reapply patch

* Update `test/certdata` from 3.14.3

* Revert "Update `test/certdata` from 3.14.3"

This reverts commit fa8fb388b3.

* Update `test_httpservers.py`

* Reapply long test patch

* Mark failing tests

* Skip flaky test

* Allow password to be None

* Unmark passing test

* Fix error message

* Clippy

---------

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2026-02-27 05:44:37 +00:00
Jeong, YunWon
684001ffa2 Instrumented instruction (#7212)
* Update test_monitoring from CPython 3.14.3

* patch test_monitoring not to entirely skipped

* impl sys.monitoring

* Update test_compile from v3.14.3

* instrumented instructions

* Implement side-table instrumented opcode execution

Add CoMonitoringData with line_opcodes and per_instruction_opcodes
side-tables. INSTRUMENTED_LINE and INSTRUMENTED_INSTRUCTION read
original opcodes from side-tables and re-dispatch after firing events.

- Add decode_exception_table() and CodeUnits::replace_op()
- Add Instruction::to_instrumented/to_base/is_instrumented mappings
- Three-phase instrument_code: de-instrument, re-instrument regular,
  then layer INSTRUCTION and LINE with side-table storage
- Mark exception handler targets as line starts in LINE placement
- InstrumentedLine resolves side-table chain atomically when wrapping
  InstrumentedInstruction
- InstrumentedForIter fires both BRANCH_LEFT and BRANCH_RIGHT
- Remove callback on DISABLE return for non-local events

* mark failing tests

* set_f_lineno, set_f_lasti, PyAtomic refactor

- Implement set_f_lineno with stack analysis and deferred unwinding
- Add Frame::set_lasti() for trace callback line jumps
- Implement co_branches() on code objects
- Clear _cache_format in opcode.py (no inline caches)
- Fix getattro slot inheritance: preserve native slot from inherit_slots
- Fix BRANCH_RIGHT src_offset in InstrumentedPopJumpIf*
- Move lasti increment before line event for correct f_lineno
- Skip RESUME instruction from generating line events
- Defer stack pops via pending_stack_pops/pending_unwind_from_stack
  to avoid deadlock with state mutex
- Fix ForIter exhaust target in mark_stacks to skip END_FOR
- Prevent exception handler paths from overwriting normal-flow stacks
- Replace #[cfg(feature = "threading")] duplication with PyAtomic<T>
  from rustpython_common::atomic (Radium-based unified API)
- Remove expectedFailure from 31 now-passing jump tests

* Unmark successful tests

test_peepholer
test_bdb

---------

Co-authored-by: CPython Developers <>
2026-02-27 13:23:33 +09:00
Jeong, YunWon
1fdd4fd35c Fix dict concurrency stability (#7231) 2026-02-27 13:23:12 +09:00
Jeong, YunWon
4567c689ce Unmark successful tests
test_peepholer
test_bdb
2026-02-27 09:07:23 +09:00
Jeong, YunWon
20a93c54c4 set_f_lineno, set_f_lasti, PyAtomic refactor
- Implement set_f_lineno with stack analysis and deferred unwinding
- Add Frame::set_lasti() for trace callback line jumps
- Implement co_branches() on code objects
- Clear _cache_format in opcode.py (no inline caches)
- Fix getattro slot inheritance: preserve native slot from inherit_slots
- Fix BRANCH_RIGHT src_offset in InstrumentedPopJumpIf*
- Move lasti increment before line event for correct f_lineno
- Skip RESUME instruction from generating line events
- Defer stack pops via pending_stack_pops/pending_unwind_from_stack
  to avoid deadlock with state mutex
- Fix ForIter exhaust target in mark_stacks to skip END_FOR
- Prevent exception handler paths from overwriting normal-flow stacks
- Replace #[cfg(feature = "threading")] duplication with PyAtomic<T>
  from rustpython_common::atomic (Radium-based unified API)
- Remove expectedFailure from 31 now-passing jump tests
2026-02-27 09:07:23 +09:00
Jeong, YunWon
fa1e75a809 mark failing tests 2026-02-27 09:07:23 +09:00
Jeong, YunWon
9c329bd62f Implement side-table instrumented opcode execution
Add CoMonitoringData with line_opcodes and per_instruction_opcodes
side-tables. INSTRUMENTED_LINE and INSTRUMENTED_INSTRUCTION read
original opcodes from side-tables and re-dispatch after firing events.

- Add decode_exception_table() and CodeUnits::replace_op()
- Add Instruction::to_instrumented/to_base/is_instrumented mappings
- Three-phase instrument_code: de-instrument, re-instrument regular,
  then layer INSTRUCTION and LINE with side-table storage
- Mark exception handler targets as line starts in LINE placement
- InstrumentedLine resolves side-table chain atomically when wrapping
  InstrumentedInstruction
- InstrumentedForIter fires both BRANCH_LEFT and BRANCH_RIGHT
- Remove callback on DISABLE return for non-local events
2026-02-27 09:07:22 +09:00
Jeong, YunWon
4ef1b48155 instrumented instructions 2026-02-27 09:06:56 +09:00
CPython Developers
3c7b25d0fa Update test_compile from v3.14.3 2026-02-27 09:06:56 +09:00
Jeong, YunWon
739f92e872 impl sys.monitoring 2026-02-27 09:06:55 +09:00
Jeong, YunWon
f35d0fde0b patch test_monitoring not to entirely skipped 2026-02-27 04:36:46 +09:00
CPython Developers
abc7d6dfe6 Update test_monitoring from CPython 3.14.3 2026-02-27 04:36:46 +09:00
Jeong, YunWon
93099e35e7 Remove PyStr::as_str, use as_wtf8/PyUtf8Str instead (#7218)
- Remove as_str() from PyStr/Py<PyStr> (was panicking on surrogates)
- Add Wtf8Concat trait and concat! macro for WTF-8 formatting
- Add impl From<&str> for &Wtf8 conversion
- Add AsPyStr/DictKey impls for PyUtf8Str types
- Migrate all call sites to as_wtf8(), to_str(), or PyUtf8Str
- Fix exception message APIs to accept Wtf8Buf
- Deduplicate inner-scope imports across modules
2026-02-27 04:20:11 +09:00
Jeong, YunWon
a47572c89e Revert "ast.NodeVisitor for import tracking (#7229)" (#7230)
This reverts commit 804a7e42fc.
2026-02-27 03:55:13 +09:00
Shahar Naveh
804a7e42fc ast.NodeVisitor for import tracking (#7229) 2026-02-27 03:07:57 +09:00
Jeong, YunWon
c98215ab3a Clear frame locals and stack on generator close + Add dir_fd support for rmdir, remove/unlink, scandir (#7222)
* Clear frame locals and stack on generator close

Add Frame::clear_locals_and_stack() to release references held by
closed generators/coroutines, matching _PyFrame_ClearLocals behavior.
Call it from Coro::close() after marking the coroutine as closed.

Update test_generators.py expectedFailure markers accordingly.

* Add dir_fd support for rmdir, remove/unlink, scandir

- rmdir: use unlinkat(fd, path, AT_REMOVEDIR) when dir_fd given
- remove/unlink: use unlinkat(fd, path, 0) when dir_fd given
- scandir: accept fd via fdopendir, add ScandirIteratorFd
- listdir: rewrite fd path to use raw readdir instead of nix::dir::Dir
- DirEntry: add d_type and dir_fd fields for fd-based scandir
- Update supports_fd/supports_dir_fd entries accordingly

* cells_free
2026-02-27 01:58:33 +09:00
Shahar Naveh
457d328294 update_lib test format fix + deps for atexit & eintr (#7227)
* update_lib deps for atexit & eintr

* Fix test format
2026-02-26 12:03:47 +09:00
Shahar Naveh
8cf8cb561a Update compileall.py to 3.14.3 (#7225) 2026-02-25 21:15:55 +09:00
Shahar Naveh
56de2cd76c Don't skip test_glob on windows (#7224) 2026-02-25 21:01:51 +09:00
Copilot
9f250a0f6e Fix upgrade-pylib workflow to use Python 3.14 (#7216) 2026-02-24 16:22:44 +09:00
CPython Developers
1df878e5d3 Update annotationlib from v3.14.3 2026-02-24 16:22:44 +09:00
CPython Developers
000025e09c Update zipfile from v3.14.3 2026-02-24 14:23:19 +09:00
Jeong, YunWon
3ec7b5c375 Implement Windows SemLock in _multiprocessing module (#7199)
* Implement Windows SemLock in _multiprocessing module

Add SemLock class using Windows semaphore APIs (CreateSemaphoreW,
WaitForSingleObjectEx, ReleaseSemaphore) so test_multiprocessing
suites are no longer skipped with "lacks a functioning sem_open".
Also add sem_unlink as no-op and flags dict for Windows.

* Fix _multiprocessing recv to return bytes and improve SemLock reliability

- recv() now returns bytes instead of int (matching CPython)
- Remove spurious GetLastError() check after CreateSemaphoreW
- Add signal checking during blocking SemLock acquire

* Include winerror in OSError.__reduce__ on Windows

* Remove expectedFailure for tests now passing with Windows SemLock

* Fix OSError.__reduce__ to preserve winerror when filename is None

When filename is None, __reduce__ was reconstructing a 2-element
(errno, msg) tuple, dropping the winerror at position 3 in the
original args. Use the original args tuple instead, matching CPython.

* Validate maxvalue > 0 in SemLock and document winerror __reduce__ divergence

* Reject embedded null characters in mmap tagname and _winapi file mapping names
2026-02-24 10:12:29 +09:00
Shahar Naveh
f784a562f8 Update datetime to 3.14.3 (#7084) 2026-02-24 01:07:30 +00:00
Jeong, YunWon
dc7cd26c3c cold block reordering and jump normalization (#7210)
* cold block reordering and jump normalization

Add mark_cold, push_cold_blocks_to_end, and normalize_jumps
passes to the codegen CFG pipeline. Use JumpNoInterrupt for
exception handler exit paths in try-except-finally compilation.

* mark test_peepholer
2026-02-24 08:53:07 +09:00
Jeong, YunWon
0244657770 [workflow] fix upgrade-pylib (#7211) 2026-02-24 00:15:55 +09:00
dependabot[bot]
f478ace1a4 Bump github/gh-aw from 0.45.0 to 0.49.4 (#7209)
Bumps [github/gh-aw](https://github.com/github/gh-aw) from 0.45.0 to 0.49.4.
- [Release notes](https://github.com/github/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](58d1d157fb...bf34f99475)

---
updated-dependencies:
- dependency-name: github/gh-aw
  dependency-version: 0.49.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 23:36:55 +09:00