* Implement native Unicode 17 grapheme iteration
Add the CPython extended grapheme state machine, full-codepoint properties, and traced Segment/iterator types with positional index handling. Refresh canonical unicodedata tests through update_lib while retaining pending markers. Include a losslessly range-compressed exact-final property oracle and differential test.
Source-reviewed implementation; candidate runtime validation remains pending. Reference property generation completed against the pinned CPython Unicode extension.
Assisted-by: OpenAI Codex:model version unavailable
* Bind grapheme Segment methods to the Python object
Use the required Py<Segment> receiver for native descriptors; preserve payload ownership and representation behavior.
Assisted-by: OpenAI Codex:model version unavailable
* Use explicit object receivers for Segment descriptors
Keep the inherent impl on the local payload and receive &Py<Self>, as required for stdlib classes outside the VM crate.
Assisted-by: OpenAI Codex:model version unavailable
* Mark grapheme property lookups as must-use
Satisfy strict Clippy for the three pure property functions without changing their behavior.
Assisted-by: OpenAI Codex:model version unavailable
* Enable validated Unicode grapheme canonical tests
Remove seven stale expected-failure markers through update_lib metadata after native property parity, canonical methods, full Unicode 17 grapheme corpus, and reference-cycle GC validation.
Assisted-by: OpenAI Codex:model version unavailable
* Accept platform line endings in grapheme oracle header
Compare the complete provenance line without its line ending so the same exact Unicode 17 reference is accepted after Windows checkout conversion. Keep the complete code-point property sweep unchanged.
Assisted-by: OpenAI Codex:model version unavailable
* Keep grapheme property regression in test module
Move the existing complete Unicode 17 property regression into the existing cfg(test) module to satisfy strict Clippy. Preserve the fixture, assertions, code-point coverage, and platform-independent provenance line check unchanged.
Assisted-by: OpenAI Codex:model version unavailable
* Qualify grapheme iterator return type for generated bindings
Assisted-by: OpenAI Codex:model version unavailable
* Fix deprecated PyO3 code input import in benchmarks
Use the canonical code module path introduced in PyO3 0.30 without suppressing deprecation warnings.
Assisted-by: OpenAI Codex:model version unavailable
Settings::default() leaves hash_seed = None, so every benchmark process
draws a random str hash secret. That changes globals-dict probe lengths
between runs and makes dict/loop/string microbenchmarks swing by 10-17%
with no code change. Use a fixed seed so results only move when the
code does.
Co-authored-by: CodSpeed Bot <no-reply@codspeed.io>
* posix: add os.forkpty
pty.fork prefers forkpty so a nested spawn is a new session with its
own controlling tty. The openpty+login_tty fallback hung the
jsontests collector.
Assisted-by: Claude
* select: rebuild fd sets after EINTR
select(2) updates the sets in place. Retrying an interrupted call
with empty sets and a NULL timeout blocks forever.
Assisted-by: Claude
* http.server: keep CGI off the body-read timeout
A millisecond handler timeout races the client thread writing the
request and is inherited across CGI fork, which RSTs the client
under load.
Assisted-by: Claude
* Revert "http.server: keep CGI off the body-read timeout"
Lib edits outside a CPython copy are not allowed.
Assisted-by: Claude
* host_env: note why forkpty is libc not nix
Assisted-by: Claude
* benches: run deepcopy 10x more iterations
Assisted-by: Claude
* Unskip multiprocessing RLock repr test
Assisted-by: Grok:4.6
* Drop stable modules from the flaky MP CI list
Assisted-by: Grok:4.6
* Keep only multiprocessing fork on the flaky MP list
Assisted-by: Grok:4.6
* Drop gc_collect bench and unbreak two CI jobs
Remove benches/benchmarks/gc_collect.py so CodSpeed no longer
includes that execution benchmark.
On Windows, run test_multiprocessing_spawn serially; the
parallel snippets job hit a regrtest worker temp-dir error
while that suite was still running.
Install cargo-shear from a pinned prebuilt binary so the job
does not fall back to compiling 1.13.4 from source.
Assisted-by: Grok:4.6
* Unskip hang tests that now pass under -m test
Drop the RustPython hang skips on interpreter shutdown,
submit-after-shutdown, and connection pickling after they
passed with rustpython -m test.
Remove the unused expectedFailureIf around killpg on the
resource tracker deadlock test; os.killpg is present.
Pass matrix flaky-MP extras through the job environment
instead of interpolating them into the run script.
Assisted-by: Grok:4.6
* Restore hang skips and isolate spawn on CI
Put test_multiprocessing_spawn and
test_multiprocessing_forkserver back on the serial flaky MP
list. Ubuntu timed out in spawn test_notify_all under -j, and
forkserver.test_processes needed a rerun.
Restore the hang skips on interpreter shutdown, submit-after
shutdown, and connection pickling.
Assisted-by: Grok:4.6
* Run gc_collect ten times per benchmark iteration
Assisted-by: Grok:4.6
* Reuse the prebuilt rustpython for CI whats_left
whats_left was invoking cargo build --release without threading,
so the snippets job rebuilt the interpreter after the earlier
release build.
Assisted-by: Grok:4.6
* Split CI cargo run and test into build then execute
Assisted-by: Grok:4.6
* Compile doctests in the CI build step
cargo test --no-run skips doctests, so rustdoc compilation
was still happening in the run step.
Assisted-by: Grok:4.6
* Drop cron-ci.yaml from this PR
A pull_request path filter matches the whole PR, so every
push was starting the periodic benchmark and coverage jobs.
Assisted-by: Grok:4.6
* Run doctests in their own CI step
cargo test --doc --no-run is rejected, so doctests cannot
be compiled without also executing them.
Assisted-by: Grok:4.6
* Do not run benchmark targets in rust tests
--all-targets includes Criterion benches, which cargo test
does not run by default.
Assisted-by: Grok:4.6
Add dependency-free CPU-bound workloads adapted from pyperformance 1.14.0 to cover interpreter, standard-library serialization, regex, numeric, and garbage-collection paths under the existing Criterion and CodSpeed harnesses. Keep inputs deterministic and scale expensive cases for simulation while checking that benchmark execution does not leak interpreter state.
Assisted-by: Codex:gpt-5.6-sol
Alias criterion to codspeed-criterion-compat so the existing benchmark suites can be measured by CodSpeed with CPU simulation on every pull request, and add the workflow running them.
Co-authored-by: CodSpeed Bot <no-reply@codspeed.io>
Defer locals dict allocation for function frames until first access.
Most function frames only use fastlocals and never touch the locals
dict, so this skips one dict heap allocation per function call.
Also remove a redundant code.clone() in invoke_with_locals.
Func call ~23% faster, method call ~15% faster in benchmarks.
Change benchmark interpreter from without_stdlib to with_init to load
Rust-optimized native modules like _json, ensuring benchmarks measure
actual optimized performance rather than pure Python fallbacks.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add microbenchmark for `sorted`
I chose 5 * Iterations to try better show that RustPython
sort implementation scales noticeably worse CPython's
with respect to the number of elements.
* Mention how to run a specific benchmark
* Update python version in bench README
3.13 better reflects the current state of the project vs 3.7.
The original hash algorithm just XOR'd all the hashes of the elements of
the set, which is problematic. The CPython algorithm is required to pass
the tests.
- Replace `PyFrozenSet::hash` with CPython's algorithm
- Remove unused `hash_iter_unorded` functions
- Add `frozenset` benchmark
- Enable tests
- Lower performance expectations on effectiveness test
- Adjust `slot::hash_wrapper` so that it doesn't rehash the computed
hash value in the process of converting PyInt to PyHash.
Update the actual benchmark harnesses.
Because the internal APIs previously used are no longer available, I
opted to use `compile` and `exec` from within the CPython context to
compile and execute code. There's probably more overhead to that than
the internal API had, but that overhead should be consistent per
benchmark.
If anyone cares about hyperoptimizing benchmarks then they can optimize
the harness as well.