Skip to content

gh-156891: Fix shlex source inclusion at EOF - #156892

Open
lpyu001 wants to merge 4 commits into
python:mainfrom
lpyu001:shlex
Open

lpyu001 wants to merge 4 commits into
python:mainfrom
lpyu001:shlex

Conversation

@lpyu001

@lpyu001 lpyu001 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Fix shlex source inclusion when the source filename is the final token of its parent stream. Newly pushed streams now start with a valid lexical state, and popping a stream restores the parent state.

Fix shlex source inclusion when the source filename is the final token of its parent stream. Newly pushed streams now start with a valid lexical state, and popping a stream restores the parent state.
Reset the lexical state when switching to a new input source so a source filename at the end of its parent stream does not cause the child stream to be skipped.

Co-Authored-By: lipengyu <lipengyu@kylinos.cn>
Keep the regression coverage focused on resetting lexical state when a new source is pushed.

Co-authored-by: lipengyu <lipengyu@kylinos.cn>

@BHUVANSH855 BHUVANSH855 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, i think this bug also needs to be fixed on other branches also 3.15, 3.14, 3.13.
once maintainers add the labels to backport.

@lpyu001 lpyu001 closed this Sep 23, 2026
@lpyu001
lpyu001 deleted the shlex branch September 23, 2026 02:54
@lpyu001
lpyu001 restored the shlex branch September 23, 2026 02:57
@lpyu001 lpyu001 reopened this Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants