Skip to content

[3.15] gh-155319: Fix the source line of a warning issued with module_globals (GH-155320) - #155824

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-c92e2fd-3.15
Open

[3.15] gh-155319: Fix the source line of a warning issued with module_globals (GH-155320)#155824
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-c92e2fd-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

warn_explicit() computed the source line from the loader of the module
whose globals were passed as module_globals, but did not pass it to
WarningMessage. It also raised IndexError if lineno was out of the range
of the module source.
(cherry picked from commit c92e2fd)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…globals (pythonGH-155320)

warn_explicit() computed the source line from the loader of the module
whose globals were passed as module_globals, but did not pass it to
WarningMessage.  It also raised IndexError if lineno was out of the range
of the module source.
(cherry picked from commit c92e2fd8f9c8af3ea383dec6222cfcca47a405ff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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