Commit Graph
16258 Commits
Author SHA1 Message Date
Shahar Naveh fca69f5b78 Remove some tests from PLATFORM_INDEPENDENT_TESTS (#7459)
* Remove some platform dependent tests

* Mark failing tests
2026-03-18 21:55:56 +09:00
Jeong, YunWon 65c5e24a1a Add per-type vectorcall for builtin constructors (#7407)
Add vectorcall fast paths for dict, list, set, int, float, str,
bool, tuple, frozenset. Clear vectorcall when __init__/__new__ is
overridden in Python. Prevent constructor vectorcall inheritance
to heap subclasses. Fix stat_result to use struct_sequence_new
with reference-copy for hidden time fields.
2026-03-18 21:44:35 +09:00
Jeong, YunWon 667119c89e Merge pull request #7440 from youknowone/pycode
Upgrade test_code and fix code bugs
2026-03-17 20:53:42 +09:00
Lee DogeonCPython DevelopersClaude Opus 4.6
02bf41996c Implement complex.from_number (#7453)
Co-authored-by: CPython Developers <>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 20:50:28 +09:00
Shahar Naveh 0e49b70256 Cleanup ci.yaml matrix usage (#7260)
* cleanup

* Don't enable all resources on windows
2026-03-17 20:46:33 +09:00
Jeong, YunWon 60c1f77288 update cspell config (#7452)
* add allowCompoundWords

* cspell dict
2026-03-17 20:18:31 +09:00
dependabot[bot] 80459c8367 Bump lz4_flex from 0.12.0 to 0.12.1 (#7449)
Bumps [lz4_flex](https://github.com/pseitz/lz4_flex) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/pseitz/lz4_flex/releases)
- [Changelog](https://github.com/PSeitz/lz4_flex/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pseitz/lz4_flex/compare/0.12.0...0.12.1)

---
updated-dependencies:
- dependency-name: lz4_flex
  dependency-version: 0.12.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 12:57:31 +09:00
dependabot[bot] 9df79ffb27 Bump rustix from 1.1.3 to 1.1.4 (#7444)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGES.md)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v1.1.3...v1.1.4)

---
updated-dependencies:
- dependency-name: rustix
  dependency-version: 1.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 12:57:23 +09:00
dependabot[bot] 5f15660002 Bump num_enum from 0.7.5 to 0.7.6 in the num_enum group (#7443)
Bumps the num_enum group with 1 update: [num_enum](https://github.com/illicitonion/num_enum).


Updates `num_enum` from 0.7.5 to 0.7.6
- [Commits](https://github.com/illicitonion/num_enum/compare/0.7.5...0.7.6)

---
updated-dependencies:
- dependency-name: num_enum
  dependency-version: 0.7.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: num_enum
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 12:57:14 +09:00
dependabot[bot] 58eff33a23 Bump actions/download-artifact from 8.0.0 to 8.0.1 (#7448)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v8...v8.0.1)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 12:56:58 +09:00
dependabot[bot] 5794a2a1fe Bump strum_macros from 0.27.2 to 0.28.0 (#7445)
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.27.2 to 0.28.0.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/compare/v0.27.2...v0.28.0)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-version: 0.28.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>
2026-03-17 12:24:29 +09:00
Jeong, YunWon 8a05c5ca94 Fix test_code: compiler and code object improvements
- Add CO_NESTED flag (0x10) for nested function scopes
- Emit LOAD_SMALL_INT for integers 0..=255 instead of LOAD_CONST
- Eliminate dead constant expression statements (no side effects)
- Ensure None in co_consts for functions with no other constants
- Add code.__replace__() for copy.replace() support
- Mark test_co_lnotab and test_invalid_bytecode as expectedFailure
2026-03-17 10:54:12 +09:00
dependabot[bot] 57923b6870 Bump marocchino/sticky-pull-request-comment from 2 to 3 (#7447)
Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2 to 3.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](https://github.com/marocchino/sticky-pull-request-comment/compare/v2...v3)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 23:45:52 +09:00
dependabot[bot] c1b9639389 Bump github/gh-aw from 0.56.2 to 0.58.3 (#7446)
Bumps [github/gh-aw](https://github.com/github/gh-aw) from 0.56.2 to 0.58.3.
- [Release notes](https://github.com/github/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/gh-aw/compare/f1073c5498ee46fec1530555a7c953445417c69b...08a903b1fb2e493a84a57577778fe5dd711f9468)

---
updated-dependencies:
- dependency-name: github/gh-aw
  dependency-version: 0.58.3
  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-03-16 23:45:26 +09:00
Lee DogeonandClaude Opus 4.6 2117c92b9b Cleanup some direct magic method definitions (#7441)
* Migrate direct __repr__ definitions to Representable trait

Move legacy #[pymethod] __repr__ to impl Representable for:
- PySSLContext, PySSLSocket (ssl.rs)
- BufferedReader, BufferedWriter, BufferedRandom (_io.rs)

Enable __repr__ guard in derive to prevent future direct definitions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Migrate direct __del__ definition to Destructor trait for PySocket

Move #[pymethod] __del__ to impl Destructor for PySocket.
Preserves ResourceWarning emission and close behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Remove redundant __iter__ pymethods from PyFuture and PyTask

Both types already have impl Iterable, so the direct #[pymethod]
__iter__ definitions were duplicates. Enable __iter__/__next__
guards in derive to prevent future direct definitions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Enable derive guards for __get__/__set__/__delete__ descriptor methods

All concrete types already use GetDescriptor/SetDescriptor traits.
Activate the compile-time guard to prevent future direct definitions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Enable derive guards for AsMapping/AsSequence slot methods

Remove redundant #[pymethod(name = "__len__")] from PyStr
(already provided via AsMapping/AsSequence trait impls).

Enable compile-time guards for __len__, __contains__, __getitem__,
__setitem__, __delitem__ to prevent future direct definitions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 22:49:45 +09:00
Jeong, YunWon 065d355248 Consume nested scope tables in optimized-out asserts (#7438)
When -O flag removes assert statements, any nested scopes
(generators, comprehensions, lambdas) inside the assert
expression still have symbol tables in the sub_tables list.
Without consuming them, the next_sub_table index gets
misaligned, causing later scopes to use wrong symbol tables.

Walk the skipped assert expression with an AST visitor to
find and consume nested scope symbol tables, keeping the
index aligned with AST traversal order.
2026-03-16 16:09:17 +09:00
Jeong, YunWon 33ef1b9057 Implement code object __eq__/__hash__
- Add Comparable and Hashable traits for PyCode
- Compare by name, args, flags, bytecode, consts, names, vars, linetable
- Hash by tuple of key attributes matching CPython's code_hash
- Remove unused custom_ops slice in Instruction::try_from
- Add co_lnotab intentional non-implementation comment
2026-03-16 15:25:29 +09:00
Jeong, YunWon efde23033e Fix code_offset_to_line handling 2026-03-16 15:25:29 +09:00
CPython Developers decc27cd31 Upgrade test_code from CPython 3.14.3 2026-03-16 15:25:29 +09:00
Shahar Naveh caa64088c6 Pin checkout to commit. Don't persist creds if not needed (#7430) 2026-03-16 12:34:43 +09:00
Lee Dogeon 1614e88b97 Implement missing slots for NoneType (#7437)
* Define only wrapper_descriptor

* Implement missing slots for NoneType
2026-03-16 11:58:40 +09:00
Jeong, YunWon d8a52ff3ed Mark RustPython 0.5.0 2026-03-16 11:32:27 +09:00
ShaharNaveh 6cc516ec56 Update _test_eintr.py from 3.14.3 2026-03-16 00:10:09 +09:00
Lee Dogeon f5b1ea7c60 Preserve imaginary zero signs when adding real values to complex numbers (#7421)
* Preserve imaginary zero signs when adding real values to complex numbers

* Refactor complex_add with match expression

* Correct complex real subtract op

* Remove unnecessary vm arugment
2026-03-15 17:04:23 +09:00
Shahar Naveh 92135de258 Newtype var_nums oparg (#7431) 2026-03-15 17:01:03 +09:00
Shahar Naveh 44b4eff2fe Don't trigger update libs status on forks (#7428) 2026-03-14 20:23:08 +09:00
Shahar Naveh 17ac73888d Update ruff to 0.15.6 (#7427)
* Update ruff to `0.15.6`

* Unmark passing tests
2026-03-14 20:22:42 +09:00
Lee Dogeon 3f1ce34422 Match divmod zero-division message with CPython (#7426) 2026-03-14 20:21:23 +09:00
Jeong, YunWon e9ba43935e Upgrade pymath to 0.2.0 (#7429) 2026-03-14 20:13:30 +09:00
Jiseok CHOI ccad9c168a Fix sqlite3 Cursor.fetchmany to not fetch rows when size=0 (#7425) 2026-03-14 15:49:55 +09:00
Lee Dogeon 257cf6fa0e Match __module__ setter behavior to CPython (#7424)
* Remove stale __firstlineno__ when updating type.__module__

* Register and use __firstlineno__ as identifier
2026-03-14 15:48:48 +09:00
Lee Dogeon ae73aab6a4 Handle chr() range checks without Rust integer overflow (#7422) 2026-03-14 15:47:45 +09:00
Lee Dogeon 3106c30d58 Make singleton builtin types immutable (#7423) 2026-03-14 09:45:43 +09:00
Shahar NavehandLee Dogeon 692c777e48 Update test_marshal.py from 3.14.3 (#7409)
---------

Co-authored-by: Lee Dogeon <dev.moreal@gmail.com>
2026-03-14 09:45:12 +09:00
Jeong, YunWon 13a0623eb1 Adapt bitflagset to use enum (#7419) 2026-03-14 09:44:02 +09:00
Jiseok CHOI 7e2154f382 Fix classmethod descr_get to match CPython behavior (#7420)
Simplify classmethod.__get__ to always create a PyBoundMethod binding
  the callable to the class, matching CPython's cm_descr_get which simply
  calls PyMethod_New(cm->cm_callable, type).

  The previous implementation incorrectly tried to call __get__ on the
  wrapped callable, which broke when a bound method was passed to
  classmethod() (e.g. classmethod(A().foo)).
2026-03-14 03:40:16 +09:00
Jeong, YunWon 6062c58aec Fix SSL read over-consuming TCP data (#7418)
Use single-record reading (recv_one_tls_record) for all SSL
reads, not just handshake. This prevents rustls from eagerly
consuming close_notify alongside application data, which left
the TCP buffer empty and caused select()-based servers to miss
readability and time out.

Also fix recv_one_tls_record to return Eof (not WantRead) when
peek returns empty bytes, since empty peek means the peer has
closed the TCP connection.
2026-03-13 21:02:31 +09:00
Jeong, YunWon e26aa9640b Fix SSL handshake over-reading in STARTTLS (#7417)
During STARTTLS handshake, sock_recv(16KB) could consume
application data that arrived alongside handshake records.
The consumed data ended up in rustls's internal buffer where
select() could not detect it, causing asyncore-based servers
to miss readable events and the peer to time out.

Use MSG_PEEK to find the TLS record boundary, then recv()
only one complete record. Remaining data stays in the kernel
TCP buffer, visible to select(). This matches OpenSSL's
default no-read-ahead behaviour.

Fixes flaky test_poplib (TestPOP3_TLSClass) failures.
2026-03-13 11:46:35 +09:00
김은빈 85d4aeaa45 Fix weakref proxy number protocol, right-side ops, and non-iterator error (#7410) 2026-03-13 11:36:16 +09:00
dependabot[bot] a223d9a8b0 Bump memmap2 from 0.9.9 to 0.9.10 (#7415)
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.9.9 to 0.9.10.
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.9...v0.9.10)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-version: 0.9.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-13 10:19:04 +09:00
dependabot[bot] 1d29813249 Bump quote from 1.0.44 to 1.0.45 (#7414)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.44 to 1.0.45.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.44...1.0.45)

---
updated-dependencies:
- dependency-name: quote
  dependency-version: 1.0.45
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-13 08:53:48 +09:00
dependabot[bot] 3a6bb4e839 Bump the openssl group with 2 updates (#7413)
Bumps the openssl group with 2 updates: [openssl](https://github.com/rust-openssl/rust-openssl) and [openssl-sys](https://github.com/rust-openssl/rust-openssl).


Updates `openssl` from 0.10.75 to 0.10.76
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.75...openssl-v0.10.76)

Updates `openssl-sys` from 0.9.111 to 0.9.112
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.111...openssl-sys-v0.9.112)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.76
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: openssl
- dependency-name: openssl-sys
  dependency-version: 0.9.112
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: openssl
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-13 08:53:28 +09:00
Jeong, YunWon fabc571fc6 Merge pull request #7411 from youknowone/ci-format
Fix pr-format CI to fail on formatting changes
2026-03-13 08:53:01 +09:00
Shahar Naveh f5a0e37e1c Upgrade libc to 0.2.183 (#7406) 2026-03-13 01:21:18 +09:00
EtherealPsyche 18147fda61 If the host_env feature is enabled, then enable the _ctypes module on the Android platform. (#7402) 2026-03-13 01:20:32 +09:00
Jeong, YunWon c06cf05dea fmt 2026-03-13 01:19:10 +09:00
Jeong, YunWon acb9937c49 Fix pr-format CI to fail on formatting changes
Add git diff --exit-code step to fail the check when
formatters produce changes. Previously reviewdog only
posted suggestions without failing the workflow.
2026-03-13 01:19:10 +09:00
김은빈 76556540d1 Add strict parameter to map() builtin (#7405)
* Add strict parameter to map() builtin

* Refactor map IterNext to match zip style
2026-03-12 15:02:53 +00:00
Jeong, YunWon 18122a31b9 Merge pull request #7408 from ShaharNaveh/update-test-gen
Update generator related tests from 3.14.3
2026-03-12 23:47:31 +09:00
Jeong, YunWon a7c2c1d3f2 Merge pull request #7404 from moreal/bump-3.14.3-modulefinder
Bump 3.14.3 modulefinder
2026-03-12 23:42:27 +09:00