Commit Graph
1534 Commits
Author SHA1 Message Date
Jeong, YunWon d2166dd93a Fix sorted() to use __lt__ instead of __gt__ (#6887)
* test

* Fix sorted() to use __lt__ instead of __gt__

CPython's sort uses __lt__ for comparisons, but RustPython was using
__gt__. This caused issues when only __lt__ was overridden on a
subclass (e.g., NamedTuple with custom __lt__), as it would fall back
to the parent class's comparison instead of using the overridden method.
2026-01-28 16:55:51 +09:00
fanninpm 4c1c704bb1 Add ExpatError and error to pyexpat (#6889)
* Stub out xml.parsers.expat.ExpatError

* Alias `ExpatError` to `error`
2026-01-28 10:19:00 +09:00
364ddaab54 Bump cranelift from 0.127.2 to 0.128.0 (#6877)
* Bump cranelift from 0.127.2 to 0.128.0

Bumps [cranelift](https://github.com/bytecodealliance/wasmtime) from 0.127.2 to 0.128.0.
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/commits)

---
updated-dependencies:
- dependency-name: cranelift
  dependency-version: 0.128.0
  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>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
2026-01-27 13:20:06 +09:00
Jeong, YunWon edca32a194 Fix ssl shutdown (#6871)
* Fix ssl shutdown

* Fix thread
2026-01-27 02:50:15 +09:00
dependabot[bot] 0dd73170e5 Bump openssl-probe from 0.2.0 to 0.2.1
Bumps [openssl-probe](https://github.com/rustls/openssl-probe) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/rustls/openssl-probe/releases)
- [Commits](https://github.com/rustls/openssl-probe/compare/0.2.0...0.2.1)

---
updated-dependencies:
- dependency-name: openssl-probe
  dependency-version: 0.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 23:47:39 +09:00
Jeong YunWon 8c73f3cb30 emit RESUME 2026-01-26 10:40:22 +09:00
Jeong YunWon 9216500355 reimpl smallint 2026-01-26 10:40:22 +09:00
Jeong YunWon b4d09e081d get_common_constants 2026-01-26 10:40:22 +09:00
Noa 617cdc9724 Make validate_downcastable_from unsafe (#6851) 2026-01-26 10:39:08 +09:00
Jeong, YunWon 7eceb145b1 more optimization (#6860) 2026-01-25 10:18:47 +02:00
Jeong, YunWon 26d64b9fda impl more msvcrt 2026-01-25 00:18:55 +09:00
Jeong, YunWon e0e29260f5 Remove Copy from PyPayload 2026-01-24 22:03:30 +09:00
Jeong YunWon c0bdb9a3e5 align psuedo ops to 3.14.2 2026-01-24 16:09:40 +09:00
Jeong YunWon 771650a012 align HAVE_ARGUMENT 2026-01-24 16:09:40 +09:00
Noa f842fbe25d Use std::fmt::from_fn (#6850)
New in 1.93 - replaces our ad-hoc equivalent types.
2026-01-24 09:21:45 +09:00
Jeong, YunWon af7bbfa104 derive Copy where possible (#6844)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Made many lightweight/internal types trivially copyable to simplify
value handling across the codebase.
* Added a workspace lint to surface missing copy implementations as
warnings.
  * Extended buffer support with explicit retain/release hooks.

* **Bug Fixes**
* Improved diagnostics and debug output for thread/lock acquisition
scenarios.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-23 15:24:17 +00:00
Jeong, YunWon 37fe0cfae2 Seperate between scope exit & unconditional jump opcodes (#6841)
See:
https://github.com/python/cpython/blob/1fa166888bd33538aab3f501174d512d6df22408/Include/internal/pycore_opcode_utils.h#L39-L44

and
https://github.com/python/cpython/blob/1fa166888bd33538aab3f501174d512d6df22408/Include/internal/pycore_opcode_utils.h#L52-L55

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Refactor**
* Updated compiler control flow analysis for improved accuracy in
dead-code elimination and stack-depth tracking.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-23 14:56:39 +00:00
ShaharNaveh 2c2b13784e Clippy 2026-01-23 16:41:24 +02:00
ShaharNaveh a9364cbc52 Fix warnings 2026-01-23 16:41:19 +02:00
Lee Dogeon 5c7f6a2afa Update types from v3.14.2 (#6833)
This pull request updates `types` module to v3.14.2. While doing it, it
fixes also async-related feature. This pull request's base is generated
by #6827.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Generators that act as iterable coroutines are now recognized as
awaitable, improving async behavior.
* Yield-from and await interactions now handle coroutine-iterable
sources more consistently.

* **Bug Fixes**
* Reduces spurious TypeError cases when awaiting or yielding from
wrapped coroutine-like generators.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-23 23:23:02 +09:00
ShaharNaveh 2ee48bc5aa Seperate between scope exit & unconditional jump opcodes 2026-01-23 14:25:03 +02:00
Jeong, YunWon efce325cbf Fix asyncio related compiler/library issues (#6837)
* Fix socket bytes support

* fix unwind_fblock

* fix posix.sendfile

* fix ssl_write

* Fix SSL ZeroReturn

* fix context

* fix generator

* Enable unittest test_async_case again
2026-01-23 19:59:29 +09:00
Jeong, YunWonandgithub-actions[bot] 125ade5f55 fix clippy 1.93.0 (#6836)
* fix clippy 1.93.0

* Auto-format: cargo fmt --all

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-23 02:18:39 +09:00
Jeong, YunWon 11a59bb405 Merge pull request #6835 from youknowone/updatelib-ci
CI runs update_lib
2026-01-23 00:57:07 +09:00
Jeong, YunWon 8cbaf3c2ef typevar as module (#6834) 2026-01-22 22:06:14 +09:00
Jeong YunWon 0ba57b0632 Fix ast.Constant.__init__ 2026-01-22 20:59:49 +09:00
Jeong, YunWon 40a43f3210 instruction improvements (#6829)
New Features

Direct small-integer loading (0–255) and locals-loading for faster execution
Async-generator wrapping and improved generator resume behavior
Performance

Faster integer loads and streamlined jump/loop handling for better runtime performance
Bug Fixes

More robust StopIteration handling and stricter init return checks
Corrected iterator cleanup for async and sync loops
Improvements

Aligns loop and jump semantics with CPython 3.14 patterns
2026-01-22 17:25:56 +09:00
Jeong YunWon 20376451eb Implement Py_mod_create slot support in multi-phase init 2026-01-22 11:21:42 +09:00
Jeong YunWon bc02b2318c module_exec 2026-01-21 22:39:40 +09:00
Jeong YunWon 32d2406fa8 module_def 2026-01-21 22:39:40 +09:00
Jeong YunWon fee1a4b097 multiphase 2026-01-21 22:39:39 +09:00
Jeong YunWon 3ccff6d7c9 os.stat remove winodws-only attrs 2026-01-21 22:39:39 +09:00
Jeong YunWon 2fb2a7eda8 winapi.WaitForSingleObject 2026-01-21 20:44:25 +09:00
Jeong, YunWon 2df879c5ee Fix Drop to prevent TLS data loss (#6825)
Remove pending_tls_output.clear() from Drop implementation.

SSLSocket._real_close() in Python doesn't call shutdown() before
closing - it just sets _sslobj = None. This means pending TLS data
in the output buffer may not have been flushed to the socket yet.
Clearing this buffer in Drop causes data loss, resulting in empty
HTTP responses (test_socketserver failure on Windows).

The explicit clearing is also unnecessary since all struct fields
are automatically freed when the struct is dropped.
2026-01-21 17:29:22 +09:00
Jeong, YunWon a7f2351244 Remove BEFORE_WITH,BINARY_SUBSCR (#6822) 2026-01-21 02:58:24 +09:00
Jeong, YunWon 274e8b4b6b Remove JUMP_IF_NOT_EXC_MATCH, SET_EXC_INFO (#6820) 2026-01-21 01:23:43 +09:00
Jeong, YunWon e0cceaf31c Remove ReturnConst/Break/Continue ops (#6816)
* Remove ReturnConst

* Remove break/continue ops
2026-01-21 00:03:43 +09:00
Jeong, YunWon 0f28d4e199 Merge pull request #6811 from youknowone/functools
Implement more functools features and Update functools from v3.14.2
2026-01-20 19:18:14 +09:00
Lee Dogeon 0cad3cb8b8 Use empty list as default according to Python.asdl (#6812)
* Use empty list as default in ClassDef.{bases,keywords}

* Unmark resolved tests

* Use empty list as default in FunctionDef.type_params

* Use empty list as default in ClassDef.type_params
2026-01-20 18:02:42 +09:00
Jeong, YunWon 4d27603cb5 fix functools.reduce 2026-01-20 17:32:52 +09:00
Jeong, YunWon b472e88caf classmethod/staticmethod __annotate__ 2026-01-20 17:32:52 +09:00
Jeong, YunWon f0c3e7d51f Remove SUBSCRIPT, JUMP_IF_{TRUE,FALSE}_OR_POP (#6810)
* Align ForIter behavior (incomplete)

* Romove JUMP_IF_{TRUE,FALSE}_OR_POP, subscript

* Remove LoadAssetionError

* Update snapshot for ForIter behavior change
2026-01-20 16:21:23 +09:00
Jeong, YunWon 25a3d6dde1 functools.Placeholder 2026-01-20 13:45:52 +09:00
Jeong, YunWon 6e842cf110 PyPartial::__get__ 2026-01-20 11:42:59 +09:00
github-actions[bot] 6f41a9491b Auto-format: cargo fmt --all 2026-01-20 10:59:47 +09:00
Jeong, YunWon 1740b083b8 namespace constructor and __replace__ 2026-01-20 10:59:47 +09:00
Jeong, YunWon 700b34adeb Hashable for PyMappingProxy 2026-01-20 10:59:47 +09:00
Jeong, YunWon bb72418d9e _typing.Union 2026-01-20 10:59:47 +09:00
Jeong, YunWon 2bbb3d07c6 _abc 2026-01-20 10:59:47 +09:00
Jeong, YunWon ef2c0a6d9d More FromArgs message (#6806) 2026-01-20 10:37:27 +09:00