Repository navigation
test(stdlib): table-driven call-table differential tests against CPython 3.14 - #715
Merged
Merged
Conversation
Walk every fixed-signature row in MATH_FUNCTIONS, WAVE_FUNCTIONS, REST_FIXED and SPECIAL_FUNCTIONS (153 forms), batch them into thirteen programs, and compare native stdout plus exit status against CPython 3.14. Rows with a tracked difference are xfail with the issue reference: #712 unicodedata.mirrored return kind, #713 platform.platform output, #714 os.path.realpath on a missing target. The coverage test fails if a table row has no probe.
The compiled binary pins its declared target (3.14.9) while the CI oracle can run a different 3.14 patch (3.14.7). Compare the 3.14 line so the differential row stays meaningful on both hosts.
… call-table sweep
espetro
force-pushed
the
work/difftab586
branch
from
October 27, 2026 07:47
be75ba9 to
c6bf041
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #586
What changed
tests/test_stdlib_call_table.py, a table-driven differential sweep over the complete fixed-signature stdlib call table: 153 forms (18MATH_FUNCTIONS, 23WAVE_FUNCTIONS, 104REST_FIXED, 8SPECIAL_FUNCTIONS).--emit bin --call run, runs as a native binary, and runs the same source under CPython 3.14 (sys.executable). Comparison is stdout line-by-line plus exit status. Each probe emits exactly one stdout line, so a mismatch maps back to its table row.platform.python_versionis compared on the 3.14 line rather than the patch, because the binary pins its declared target while the CI oracle can run a different 3.14 patch.unicodedata.mirroredreturns bool instead of int, fix(platform): platform.platform output differs from CPython 3.14 #713platform.platformoutput shape, fix(posixpath): realpath raises on a missing target where CPython returns a path #714os.path.realpathon a missing target raisesRuntimeErrorinstead of resolving lexically.docs/reference/divergences.md. The xfail references the issue, and the batch passes once the row is fixed.Test output
uv run pytest tests/test_stdlib_call_table.py -n 2 -q --no-header -rxX:The nine passing batches cover 119 forms; the three xfail batches execute 34 more forms, with the three divergent rows named above. Total wall time stays under the 90 second budget with
-n 2.CI
The first run (
ded3134) passedruff and compat2and test shards 1/3 and 2/3. Shard 3/3 failed becauseplatform.python_version()prints the pinned target patch (3.14.9) while that runner's oracle is3.14.7.be75ba9compares the3.14.line instead. In the follow-up runruff and compat2passed; the test shards were still queued when this body was updated, so the final CI result is not claimed here.Not done
d: str = tempfile.mkdtemp()) is re-evaluated on every read, so two prints ofddiffer. The sweep runs probes insiderun()and does not depend on it.