Commit Graph
17709 Commits
Author SHA1 Message Date
youknowdot 64330b80b9 Implement Unicode 17 grapheme iteration and properties (#9145)
* 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
2026-10-16 23:40:26 +09:00
youknowdot fd5b30eb5e Align socket and socketserver with Python 3.15 (#9156)
Import the canonical socket libraries and tests through update_lib, preserving the existing AF_ALG expected failures. Match setsockopt index/buffer conversion and error ordering, mask optlen with the final CPython deprecation warning, reject oversized Windows buffers before the host call, and preserve arbitrary-precision getaddrinfo ports and empty canonical names.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-16 10:14:55 +09:00
youknowdot 1ee9a29062 Preserve explicit AST source positions through compilation (#9138)
* Preserve explicit AST column locations through code generation

Assisted-by: OpenAI Codex:model version unavailable

* Remove obsolete location bindings after span migration

Assisted-by: OpenAI Codex:model version unavailable

* Propagate inconsistent AST span provenance without panicking

Assisted-by: OpenAI Codex:model version unavailable

* Preserve mapped positions when exporting optimized Pass nodes

Assisted-by: OpenAI Codex:model version unavailable

* Consolidate AST location regressions and satisfy strict compiler lints

Assisted-by: OpenAI Codex:model version unavailable

* Consolidate equivalent AST literal location cases

Replace the six-way literal-only optimizer matrix with one optimized-AST round-trip, preserving all assertions. Keep the distinct normalized-range identity, explicit Pass provenance, and synthetic format-spec regressions.

Validation: all four appended location cases passed using the verified final-f6a RustPython binary with unchanged native sources. Ran normal pre-commit hooks; no Cargo build or full cyclic snippet suite.

Assisted-by: OpenAI Codex:model version unavailable

* Reuse Ruff source locations in AST conversion

Replace redundant PySourceLocation, Row, and Column wrappers with the compiler-core re-export of Ruff SourceLocation. Use UTF-8 byte coordinates and retain the empty-source fallback. Share the normalized range conversion while preserving caller validation and signed semantic metadata.

Validation so far: independent source and boundary review, rustfmt, and git diff --check. Runtime validation follows after the shared build target is released.

Assisted-by: OpenAI Codex:model version unavailable

* Preserve the first AST preprocessing location error

Share first-error recording between generated-node allocation and synthetic-pass coordinate overflow. Exercise both real compiler-state failure paths in both orders using one MAX_ID location entry.

Validation: focused compiler-state regression, strict codegen all-target Clippy, unchanged full-source seals, rustfmt, and normal pre-commit hooks. No interpreter runtime or broad suite rerun for this error-only change.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-16 10:13:59 +09:00
dependabot[bot] 9a8b2f4102 build(deps): bump mac_address (#9157)
Bumps the unix group with 1 update in the / directory: [mac_address](https://github.com/repnop/mac_address).


Updates `mac_address` from 1.2.0 to 1.2.1
- [Commits](https://github.com/repnop/mac_address/commits)

---
updated-dependencies:
- dependency-name: mac_address
  dependency-version: 1.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: unix
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-16 10:10:56 +09:00
1ndahous3 8966195bba Provide the C++ shared-linker command in sysconfig (#9155)
Assisted-by: Codex:gpt-6
2026-10-16 10:10:24 +09:00
1ndahous3 d90aa0781f Preserve direct-base precedence in C3 method resolution (#9154)
Assisted-by: Codex:gpt-6
2026-10-16 10:08:59 +09:00
Jeong, YunWon 2dbe992438 Remove ucd_3_2_0 feature from rustpython-capi (#9153)
Drop the capi [features] table added in #9011 along with the root
ucd_3_2_0 forwarding to rustpython-capi and the default-features = false
on the workspace rustpython-capi dependency. The root ucd_3_2_0 feature
still enables rustpython-stdlib/ucd_3_2_0.

Assisted-by: Claude Code:claude-opus-5-5
2026-10-16 10:06:40 +09:00
youknowdot 1f4e9ffaf6 Align OS argument conversion and syscall handling with Python 3.15 (#9146)
* Align OS argument conversion and syscall handling with Python 3.15

Import canonical os tests through update_lib, retaining existing guards. Preserve raw descriptor validation, errno, audit ordering, signal retries and unlocked sendfile buffers.

Validation: independent source review passed; matching release build and nine bounded canonical cases pending.

Assisted-by: OpenAI Codex:model version unavailable

* Import canonical root-user test support for OS package

Add hash-pinned selective assignment migration within test.support and import the three Python 3.15.0 privilege helpers plus their public exports. Preserve unrelated support helpers and existing test markers.

Validation: 177 host updater tests pass; byte-identical canonical helper provenance verified. Independent source review passed. Native import validation pending integration onto current main.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-16 10:06:13 +09:00
Bas Schoenmaeckers 88f5189a93 Update pyo3 to 0.30 (#9152)
* Update `pyo3` to `0.30`

* Fix cfunction with no module as self
2026-10-15 17:15:18 +00:00
1ndahous3andJeong YunWon a61f37a1b7 Own generated native closures and retain their method definitions (#8962)
* Own generated native closures and retain their method definitions

Assisted-by: Codex:gpt-6

* Keep native callable GC traversal off the bind path

Revert method_descriptor and classmethod_descriptor to untracked
payloads. Their only object field, _method_def_owner, points to an
untracked HeapMethodDef.

Restore the derived Traverse for builtin_function_or_method without a
clear implementation. default_dealloc calls the clear slot on every
deallocation, so the custom clear allocated a Vec for each bound builtin.

Use the derived Traverse for builtin_method, skipping the static class.

Assisted-by: Claude Code:claude-opus-5-5

---------

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
2026-10-15 16:52:54 +00:00
1ndahous3 fdd38b8193 Avoid copying unchanged bytes results (#9149)
Assisted-by: Codex:gpt-6
2026-10-15 14:31:50 +00:00
1ndahous3 dcad0988e7 Fix Unicode StringIO overwrites and cache character positions (#9150)
Assisted-by: Codex:gpt-6
2026-10-15 14:30:53 +00:00
youknowdot 8e5709e797 Align native threading and libraries with Python 3.15 (#9148)
Preserve lock ownership and elapsed timeouts during interruptible waits; reject RLock constructor arguments and use replacement encoding for thread names. Generate associated libraries and tests from CPython d220409a13b77de7a6c30abe16ea90db01528edc using update_lib, retaining five existing markers and retiring one proven removed test owner.

AI-assisted source preparation and review. Runtime validation remains pending.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 22:46:26 +09:00
Joshua Megnauth a2c11aa51d Optional Unicode 3.2.0 but enabled by default (#9011)
Useful for smaller builds, like WebAssembly. The UCD 3.2.0 path is only
directly used in a handful of places in Python.

Assisted-by: GPT-5.6-Luna
2026-10-15 22:07:08 +09:00
Luan Taraschi bf404e0b7c Keep a bytearray exported while it formats with % (#9147)
bytearray.__mod__ copied the format and ran the arguments' __repr__,
__str__, __bytes__ and __index__ without holding an export, so a callback
could clear or extend the format and formatting went on with the old
copy:

    fmt = bytearray(b"%a end")
    class S:
        def __repr__(self):
            fmt.clear()
            return "E"
    fmt % S()   # bytearray(b'E end'), fmt left empty

CPython holds a buffer on the format for the whole call, so the resize
fails with BufferError and the format is left as it was. Taking an export
for the duration of __mod__ does the same here, the way bytearray.join
already does for its separator.

This lets test_mod_concurrent_mutation in test_bytes run again.

Assisted-by: Claude Code:claude-opus-5-5
2026-10-15 22:06:16 +09:00
youknowdot 901431963b Sync ten Python format and utility modules with Python 3.15 (#9144)
* Update ten Python library modules to Python 3.15 final

Migrate dependency-ordered linecache, locale, _pydecimal, decimal, random, uuid, wave, _strptime, zipapp and poplib with their canonical tests and WAV fixtures using update_lib.

Assisted-by: OpenAI Codex:model version unavailable

* Align dependent datetime and warning tests with Python 3.15 final

Generate complete dependent tests and pure datetime through update_lib from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve the existing tracemalloc expected failure. Pass warning module metadata to WarningMessage, use sys context after stack exhaustion, and identify invalid category classes with the existing qualified-name helper.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 21:59:44 +09:00
Chanho Lee e01021b902 Fix module docstring global name resolution (#9095)
* Fix module docstring global name resolution

Assisted-by: Claude Code:claude-opus-5-5

* Move module docstring test into syntax_doc.py

Assisted-by: Claude Code:claude-opus-5-5
2026-10-15 20:46:54 +09:00
Luan Taraschi 8de2cbe732 Fix object.__getstate__ deadlock and panic on __slotnames__ (#8981)
object_getstate_default kept the __slotnames__ list read-locked while it
looked up each slot attribute. A getter or __getattr__ that changed the
list (as in test_descr.test_issue24097) then waited forever for the write
lock. A non-str entry in a cached __slotnames__ hit an unwrap and
panicked.

Take a reference to each name and drop the lock before the lookup, raise
TypeError for a non-str name, let errors other than AttributeError
propagate, and check the list size after each item, as CPython does.

Assisted-by: Claude Code:claude-opus-5-5
2026-10-15 20:45:42 +09:00
youknowdot 365ff68354 Align base64 encodings and binascii keywords with Python 3.15 (#9139)
* Align base64 encodings with Python 3.15

Accept hexlify keyword arguments and migrate base64 and its tests directly from CPython v3.15.0 using update_lib.

Assisted-by: OpenAI Codex:model version unavailable

* Update Hypothesis fallback for multi-argument examples

Import the CPython 3.15 final fallback helper with scripts/update_lib migrate. Keep canonical base64 round-trip examples unchanged while passing their positional arguments as one subTest message.

Validation: six canonical base64 methods, fourteen fixed examples; bounded source-only runs with the existing same-native PR binary.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 20:43:52 +09:00
youknowdot 8f12a32256 Sync ten foundational Python libraries with Python 3.15 (#9140)
* Sync ten foundational Python libraries with CPython 3.15

Migrate _py_abc, stat, genericpath, ntpath, posixpath, functools, gettext, string, optparse, and mimetypes with related canonical tests using scripts/update_lib from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve the existing pure LRU hash-count expected failure.

Assisted-by: OpenAI Codex:model version unavailable

* Preserve positional-only annotation order for singledispatch

Emit positional-only annotations before regular positional annotations, matching declaration order and the canonical functools regression coverage.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 20:42:50 +09:00
youknowdot 9e18d7be6b Preserve explicit customizations during canonical library migration (#9142)
* Preserve explicit customizations during canonical library migration

Add bounded runtime, call, and doctest preservation plus explicit remaining-marker metadata. Support mapped legacy test-package migrations without losing ordered guards, and exclude cache directories from both migration paths while retaining canonical assets.

Validation: 53 bounded host-Python tooling tests passed. Tests inspect source and temporary files without executing migrated fixtures. Existing copy-library cache protection is unchanged. No Lib or interpreter changes.

Assisted-by: OpenAI Codex:model version unavailable

* Integrate migration preservation into existing updater modules

Keep migration orchestration and guarded package moves in cmd_migrate, and marker/doctest metadata in patch_spec. Reuse AST anchor validation and existing test modules, removing all eleven newly introduced helper, test, and data files.

Require caller-selected doctest metadata instead of embedding syntax-case policy. Reject guarded legacy doctests before package writes. Preserve the prior 53 test scenarios and add seven focused metadata regressions; all 60 bounded host tooling tests passed. No Lib, workflow, or native changes.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 19:54:38 +09:00
youknowdot 0384ddcd70 Align mmap operations and capability reporting with Python 3.15 (#9141)
Separate raw descriptor inspection from owned tracking, update flush and naming behavior, and expose resize only on implemented backends. Migrate canonical mmap tests using update_lib while preserving existing RustPython guards.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 19:53:53 +09:00
youknowdot 16e333bded Align asyncio initialization and future state with Python 3.15 (#9136)
* Align asyncio initialization and future state with Python 3.15

Reject native Future and Task reinitialization, validate task contexts, and restore task registration after failed eager context entry. Generate matching asyncio and concurrent Future sources and tests with update_lib from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve the existing pending-task reinitialization regression.

Assisted-by: OpenAI Codex:model version unavailable

* Remove asyncio snippet duplicating canonical reinitialization coverage

Keep the exact-final Lib tests as the reinitialization coverage instead of adding a new snippet for the same contract. Native and library implementation bytes remain unchanged.

Assisted-by: OpenAI Codex:model version unavailable

* Validate both objects in asyncio awaited-by helpers

Match CPython by ignoring non-native Future/Task waiters in add and discard. Keep the existing native reentrant hashing fixture reachable using Future subclasses and use native instances for its membership checks.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 10:02:39 +00:00
youknowdot 498adff3a9 Align JSON array hooks and libraries with Python 3.15 (#9135)
Generate the JSON library and selected tests with update_lib from CPython d220409a13b77de7a6c30abe16ea90db01528edc, preserving native bootstrap workarounds and test markers. Exclude generated cache directories at the library copy boundary.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 07:32:30 +00:00
youknowdot 8a9d66cfb3 Align OrderedDict views and sync pprint with CPython 3.15 (#9134)
* Align OrderedDict view inheritance and repr with CPython

Use dict view base payloads and inherited descriptors while preserving ordered iteration. Snapshot actual view iterators before rendering element reprs.

Assisted-by: OpenAI Codex:model version unavailable

* Sync pprint and its tests from CPython 3.15.0

Import the related library update using scripts/update_lib migrate from d220409a13b77de7a6c30abe16ea90db01528edc, preserving exact final source bytes.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 07:18:22 +00:00
youknowdot 28f19a476f Document snippet test placement policy (#9137)
Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 15:56:10 +09:00
youknowdot 9c832ee26c Align native datetime conversion with Python 3.15 (#9133)
Prefer index conversion for timestamps, accept float-convertible values, validate ISO timezone components, and apply final local fold detection consistently.

Implementation, source comparison, and bounded validation were assisted by OpenAI Codex.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 15:06:38 +09:00
youknowdot 4d54126c1f Update Unicode name preparation and codecs to Python 3.15 (#9132)
Import stringprep and related codecs from CPython 3.15.0 using scripts/update_lib. Preserve the existing Windows codec test marker.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 15:06:01 +09:00
youknowdot 92e20da822 Fix update_lib marker preservation for inline classes (#9131)
* Preserve inherited test markers in inline class migrations

Expand canonical inline class suites before appending retained inherited overrides, and validate generated syntax. Run focused migration-tool tests in a path-filtered Python-only CI job.

Assisted-by: OpenAI Codex:model version unavailable

* Run migration tool tests through existing CI conditions

Keep Rust build gates unchanged and run focused Python migration tests on Linux for tool-only changes. Remove the separate workflow.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 13:54:46 +09:00
Jeong, YunWonandyouknowdot 79e7c9da27 Support marshal format 6 and frozendict serialization (#9130)
Extract the Python 3.15 final mapping format while preserving current code-object field identities and owned writer references.

Assisted-by: OpenAI Codex:model version unavailable

Co-authored-by: youknowdot <dot@youknowone.org>
2026-10-15 13:53:38 +09:00
youknowdot edb5ac4334 Preserve partial keyword identity through vectorcall (#9127)
* Preserve partial keyword identity through vectorcall

Retain keyword objects in CALL_FUNCTION_EX and snapshot partial state before Python callbacks. Match CPython 3.15 final partial keyword merging without changing Lib or tests.

Assisted-by: OpenAI Codex:model version unavailable

* Register partial vectorcall through pyslot

Use the existing slot macro instead of a class extension hook. Return TypeError for non-string incoming names in the non-vectorcall fallback rather than panicking.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 04:47:09 +00:00
Jeong, YunWon 2e5febce5e Update jiff-tzdb to 0.1.9 (#9129)
jiff-tzdb 0.1.9 bundles tzdb 2026e. It is used through
jiff-tzdb-platform on Windows and wasm targets.

Assisted-by: Claude Code:claude-opus-5-5
2026-10-15 13:40:52 +09:00
youknowdot 3ab5c0c2f2 Align mapping boundaries with Python 3.15 final (#9128)
Support frozen mappings in str.maketrans and native JSON encoding, preserve integer translation keys, and protect mappingproxy dictionaries from unknown reflected comparisons.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 10:31:45 +09:00
codspeed[bot]andCodSpeed Bot ba54cce23a Pin the hash seed in the microbenchmark harness (#9126)
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>
2026-10-15 10:28:43 +09:00
youknowdot 8b2f9d8f2a Align percent formatting with Python 3.15 final (#9125)
Parse and convert percent fields in order, preserve callback precedence, and align argument-context errors and keyed conversion restrictions. Keep invalid character-length checks ahead of index conversion and cover bounded callback ordering.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 10:28:12 +09:00
youknowdot 2ddba03c39 Support frozen ElementTree attribute mappings (#9124)
* Support frozen ElementTree attribute mappings

Preserve assigned mapping identity while copying constructor attributes, and use checked union ownership through Element operations.

Assisted-by: OpenAI Codex:gpt-6.1-sol

* Sync final ElementTree runtime and companion tests

Import ElementTree.py from CPython d220409a13b77de7a6c30abe16ea90db01528edc through update_lib migrate. Copy six complete canonical tests with update_lib copy-test, preserving all surrounding test markers. This aligns pure-Python and native frozendict diagnostic expectations and covers the runtime import companion changes.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 10:27:39 +09:00
youknowdot 13d0c83753 Align Struct construction and complex formats with Python 3.15 (#9123)
Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 10:26:51 +09:00
youknowdot 32f5ac9c05 Reject invalidated type-cache entries and retain disassembly tracebacks (#9121)
Require matching cache/type versions to be nonzero in both readers, keeping
Acquire load order and the existing sequence-lock checks. Add a deterministic
native regression for cleared versions, mismatches, and valid negative cache
entries, without executing Python or introducing concurrency stress.

Render Python tracebacks when the existing disassembly snapshot helper fails.
The intermittent Windows AttributeError that prompted this investigation has
not been reproduced locally or proven to originate from the cache defect.

AI assistance: OpenAI Codex investigated, implemented, independently
source-reviewed, and performed focused automated validation of this change.
No human manual testing is claimed.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 10:24:48 +09:00
1ndahous3 0363ff4eb6 Support nonblocking pipes on Windows (#9110)
* Support nonblocking pipes on Windows

Assisted-by: Codex:gpt-6

* Remove redundant Windows pipe test coverage

Assisted-by: Codex:gpt-6
2026-10-15 10:24:04 +09:00
Jeong, YunWon 2ba57dae68 Add BUILD_LIST_FROM_ARG opcode behind CompileOpts::build_list_from_arg (#9104)
Add Instruction::BuildListFromArg = 219 (stack effect: pop 1, push 2): pop
the iterator, push an empty list whose capacity is the iterator's length
hint, push the iterator back. A failing length hint is ignored unless it is
SystemExit or KeyboardInterrupt.

With CompileOpts::build_list_from_arg set, a list comprehension with one
generator, no `if` and no `async for` emits it in place of BUILD_LIST 0 on
the non-inlined path and in place of BUILD_LIST 0; SWAP 2 on the inlined
path. The option defaults to false, so default output is unchanged.

Assisted-by: Claude
2026-10-15 10:05:35 +09:00
youknowdotandyouknowdot f9b07b786c Update gzip, tarfile, and shutil from CPython 3.15 (#9112)
* Preserve truncating FileIO mode and sync canonical IO compatibility

Keep truncation metadata in both host backends so writable update streams report wb+. Synchronize the complete final CPython _pyio module and two complete canonical mode test definitions through scripts/update_lib.

Assisted-by: OpenAI Codex: model identifier unavailable

* Update gzip, tarfile, and shutil from CPython 3.15

Regenerate six Lib files using scripts/update_lib from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve upstream tests without agent-added marks.

Assisted-by: OpenAI Codex:model version unavailable

* Sync canonical spooled tempfile mode expectation

Copy the complete TestSpooledTemporaryFile.test_properties definition from CPython 3.15.0 final d220409a using scripts/update_lib copy-test. Preserve all surrounding test content and existing markers.

Assisted-by: OpenAI Codex:model version unavailable

---------

Co-authored-by: youknowdot <336763669+youknowdot@users.noreply.github.com>
2026-10-15 10:03:58 +09:00
youknowdot 0f127b07e9 Add Python 3.15 math APIs using pymath (#9122)
* Add Python 3.15 math APIs using pymath

Pin pymath to merged dd1e9a4cf26d68caf3b549c09476f52e356e16a3
and expose isnormal, issubnormal, signbit, fmax and fmin through thin
wrappers. Share the existing integer functions through math.integer
and _math_integer, matching CPython module identity and metadata.

Migrate test_math.py and test_math_integer.py via scripts/update_lib
from CPython d220409a13b77de7a6c30abe16ea90db01528edc, preserving the
existing Windows remainder marker. Add bounded Python snippet coverage.

AI assistance: OpenAI Codex implemented and source-reviewed this change,
ran update_lib, and performed focused automated validation. No human
manual testing is claimed.

Assisted-by: OpenAI Codex:model version unavailable

* Track integer math tests in library updates

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 10:02:44 +09:00
dependabot[bot] 796f522306 build(deps): bump jiff (#9120)
Bumps the jiff group with 1 update in the / directory: [jiff](https://github.com/BurntSushi/jiff).


Updates `jiff` from 0.2.37 to 0.2.38
- [Release notes](https://github.com/BurntSushi/jiff/releases)
- [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.37...jiff-static-0.2.38)

---
updated-dependencies:
- dependency-name: jiff
  dependency-version: 0.2.38
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jiff
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-15 09:57:37 +09:00
1ndahous3 05cb67524a Cache SQLite statements and synchronize connection operations (#9109)
* Cache SQLite statements per connection

Assisted-by: Codex:gpt-6

* Keep SQLite connections alive across callbacks

Assisted-by: Codex:gpt-6

* Defer SQLite cleanup and preserve operation errors

Assisted-by: Codex:gpt-6

* Synchronize SQLite results and transaction transitions

Assisted-by: Codex:gpt-6

* Use the calling thread's VM for SQLite callbacks

Assisted-by: Codex:gpt-6
2026-10-15 09:56:14 +09:00
youknowdot 0f9321064d Implement bytearray.take_bytes with stable export length snapshots (#9119)
Keep export counts and logical lengths in one synchronized epoch so bounds checks can precede export rejection without recursively borrowing payload data. Preserve shared buffer ownership and callback lifetimes.

Assisted-by: OpenAI Codex:gpt-6.1-sol
2026-10-15 01:32:08 +09:00
youknowdot 5d5e3faa79 Implement Python 3.15 type alias and variadic metadata (#9113)
* Implement Python 3.15 type alias and variadic metadata

Add TypeAliasType qualified names and writable module metadata, and TypeVarTuple raw bounds and variance. Preserve Unicode names and validate arguments before invoking truthiness callbacks.

AI assistance: OpenAI Codex implemented and source-reviewed this split, prepared regressions, and ran focused automated validation. No human manual testing is claimed.

Assisted-by: OpenAI Codex:model version unavailable

* Sync canonical typing repr tests with Python 3.15 final

Copy six complete test definitions from CPython d220409a13b77de7a6c30abe16ea90db01528edc using scripts/update_lib copy-test with source and destination SHA256 pins. Preserve all surrounding tests and markers; no manual assertion edits or skips.

AI assistance: OpenAI Codex diagnosed old expected representations, performed the official copies and independent provenance review, and ran the six exact tests with the existing candidate release binary. All six pass; full suites were not rerun locally.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-14 16:14:46 +00:00
youknowdot 1b20f6a194 Use 64-bit timestamps for Windows CRT and FILETIME conversions (#9116)
Use the explicit 64-bit CRT ABI regardless of libc time_t width, and preserve 64-bit FILETIME seconds throughout stat producers and consumers. Add bounded Windows regressions for 2040 calendar and stat conversions while retaining existing historical timestamps and error behavior.

AI assistance: OpenAI Codex implemented and independently source-reviewed this split, prepared bounded Python regressions and performed cross-target compile checks. Windows runtime and human manual testing are not claimed.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 00:57:58 +09:00
1ndahous3 c85829b2d0 Reuse unlocked buffers in os.write (#9107)
* Reuse unlocked buffers in os.write

Assisted-by: Codex:gpt-6

* Snapshot buffers without immutable storage

Assisted-by: Codex:gpt-6
2026-10-15 00:56:02 +09:00
youknowdot 6e82636bee Add Python 3.15 encoding normalization helper (#9115)
Extract _codecs._normalize_encoding and delegate encodings.normalize_encoding
to it using the final CPython 3.15 library source. Preserve case and dots,
validate UTF-8 before NUL truncation, and retain wrapper warnings and bytes
conversion. Add bounded regression assertions without changing registry keys.

Lib/encodings/__init__.py was updated via scripts/update_lib migrate from
CPython d220409a13b77de7a6c30abe16ea90db01528edc, with byte-identical output.

AI assistance: OpenAI Codex implemented and source-reviewed this split,
ran update_lib, prepared bounded regressions and performed focused automated
validation. No human manual testing is claimed.

Assisted-by: OpenAI Codex:model version unavailable
2026-10-15 00:53:59 +09:00
1ndahous3 db33af9c3e Validate socket receive sizes and bound truncated results (#9108)
* Validate socket receive sizes and bound truncated results

Assisted-by: Codex:gpt-6

* Fix socket receive checks across platforms

Assisted-by: Codex:gpt-6
2026-10-14 23:56:06 +09:00