GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix disabled stream identity and conditional annotation operand checks by youknowdot · Pull Request #8960 · RustPython/RustPython

Conversation

@youknowdot

@youknowdot youknowdot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Two existing Python 3.14 paths violate runtime object contracts: disabling standard I/O creates fresh None objects, and conditional-annotation tracking assumes a user-rebindable global is an exact set.

Return the context's None singleton for all six disabled stream attributes, and validate the set operand before adding an annotation name. Include an embedding regression that actually runs without the stdio feature, and the unchanged canonical annotation regression from CPython's 3.14 maintenance backport.

Extracted from #8954 onto main f39b054b9c8cbbf884f53123eef028131789990c, retaining the unchanged Python 3.14 target. The mega PR retains these fixes until they are merged independently. No marshal or Python 3.15 behavior is included.

Fresh standalone validation on 8aeae47903cd431fcb31237597ae216c80512f65:

  • Rust workspace: 1,345 passed /18 ignored; separate C-API: 116 passed /4 ignored
  • Explicit no-stdio feature build: no_stdio_streams_are_none_singleton executed and passed (1 test); default builds compile it out
  • Both Clippy gates pass without warnings, release build passes, and runtime identity confirms Python 3.14 at this head
  • Full test_type_annotations: 49 run /1 skipped; test_setcomps: 2 run; test_site: 43 run /6 skipped. All complete successfully
  • Existing syntax_annotations_locals.py and builtin_set.py pass
  • Normal configured commit hooks pass; no existing assertions or expected-failure markers changed

The official annotation backport commit c21e7c45a9770fba9ea3b8d5abb52c19274a08ef is after CPython 3.14.7. The released 3.14.7 reference still crashes on that exact canonical regression; this is a maintenance fix, not a claim that the vulnerable released tag passes. The corrected native regression passes; the reference crash was not repeated.

AI assistance: prepared, reviewed and tested with Codex at the user's direction. Exact model metadata is unavailable; the commit records Assisted-by: Codex:model-version-unavailable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youknowdot
Fix disabled stream identity and annotation operand checks
8aeae47
Return the context's canonical None singleton when standard streams are
disabled. Check the exact set type before accessing user-rebindable
conditional-annotation tracking objects.

Both fixes apply to the unchanged Python 3.14 target. Include the no-stdio
embedding regression and the unchanged canonical regression from CPython's
3.14 maintenance backport c21e7c45, after the vulnerable 3.14.7 tag.

Extracted from the larger 3.15 migration; no marshal or version changes.

Assisted-by: Codex:model-version-unavailable
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: RustPython/RustPython/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ca0adea2-0369-40aa-a523-f2fb3af3da8a
📥 Commits

Reviewing files that changed from the base of the PR and between 7536730 and 8aeae47.

⛔ Files ignored due to path filters (1)
  • Lib/test/test_type_annotations.py is excluded by !Lib/**
📒 Files selected for processing (2)
  • crates/vm/src/frame.rs
  • crates/vm/src/vm/mod.rs
 _________________________________
< My bunny whiskers are tingling. >
 ---------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[x] lib: cpython/Lib/typing.py
[ ] test: cpython/Lib/test/test_typing.py (TODO: 1)
[x] test: cpython/Lib/test/test_type_aliases.py
[ ] test: cpython/Lib/test/test_type_annotations.py
[x] test: cpython/Lib/test/test_type_params.py
[x] test: cpython/Lib/test/test_genericalias.py

dependencies:

  • typing

dependent tests: (19 tests)

  • typing: test_annotationlib test_builtin test_copy test_enum test_fractions test_funcattrs test_functools test_genericalias test_grammar test_inspect test_isinstance test_patma test_peg_generator test_pydoc test_pyrepl test_type_aliases test_type_params test_types test_typing

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youknowone
youknowone requested changes Oct 4, 2026
View reviewed changes
Comment thread Lib/test/test_type_annotations.py

class RegressionTests(unittest.TestCase):
# gh-154902
def test_conditional_annotations_rebound(self):

@youknowone youknowone Oct 4, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this test originated from CPython? otherwise do not directly edit Lib/ files

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@youknowdot youknowdot Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is copied verbatim from CPython's official 3.14 maintenance backport c21e7c45, including the accompanying import itertools. The test body, input values, and assertions are unchanged. The only difference is placement within RegressionTests: this PR inserts it before the existing tests, while upstream appended it after test_complex_comprehension_inlining.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youknowdot youknowdot mentioned this pull request Oct 4, 2026
Integrate remaining Python 3.15 final runtime and libraries #8954
Draft
@youknowone
youknowone marked this pull request as ready for review October 5, 2026 00:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youknowone
youknowone approved these changes Oct 5, 2026
View reviewed changes
@youknowone
youknowone merged commit 6903fed into RustPython:main Oct 5, 2026
30 of 31 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@youknowone youknowone youknowone approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@youknowdot @youknowone
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.