Repository navigation
python io: bare builtin open and I/O module references count again (io contract C1) (#9311) - #9314
Merged
Merged
Conversation
…o contract C1) (#9311) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
1 similar comment
Contributor
|
No description provided. |
Contributor
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
squid-protocol
marked this pull request as ready for review
November 25, 2026 17:51
#9311) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
CI shepherd: the head of this PR (8f5c201) is not the one a maintainer labelled |
Contributor
|
No description provided. |
Contributor
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 #9311
What failed
rosetta-auditon main: pythonmain.py: io expected 3, got 0(1 of 57 languages; the other 56 pass). Real regression, not a flake: #9308 narrowed pythoniotoopen(/module.fn(, but the keyword-rosetta python plant is bare (reader = open,folder = pathlib,plug = socket) anddocs/io_rule_contract.mdC1 explicitly lets python's bare builtinopenfire.Fix
python.pyio: restore bareopenand the I/O module names (requests httpx aiohttp boto3 pathlib socket sqlalchemy psycopg2 asyncpg), guarded so the collisions #9308 removed stay out: attribute access (self.socket), a name being assigned / keyworded (socket = s,open=True), strings,import/fromlines.Class sweep
Class: a keyword-family rule narrowed past what the corpus plants / the contract allows. Siblings checked: every other #9308 family (telemetry, sync_locks, thread_sleeps, comprehensions, bitwise_ops, time_date_logic) and embedded_python io pass the full rosetta run (0 regressions, 57 languages). Two
test_python_strict.pytests were already stale on main from #9308 (.filter(negative; operator-inside-string positive); updated to the #8863 behaviour.Evidence
rosetta_audit.py --corpus <keyword-rosetta main>: 57 checked, 0 regressions.family_red_cells.py --lang python: 0 red cells.audit_check.py: all clear;ruff format --checkclean.crucible_check.py --update(12 files, small python drift: airflow fingerprint/cluster floats and net-mitigated io counts from the restored bare io hits).Cross-repo: none (corpus unchanged; no companion PR).
🤖 Generated with Claude Code