Skip to content

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

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-c92e2fd-3.13
Aug 15, 2026
Merged

[3.13] gh-155319: Fix the source line of a warning issued with module_globals (GH-155320)#155826
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-c92e2fd-3.13

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 15, 2026

Copy link
Copy Markdown
Member

(cherry picked from commit c92e2fd)

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

Resolved a conflict in call_show_warning(): this branch has no module argument.

…module_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 c92e2fd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 15, 2026 07:15
@serhiy-storchaka
serhiy-storchaka merged commit f61481f into python:3.13 Aug 15, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant