Skip to content

Incorrect error handling when compiler_set_qualname fails #156459

Closed

Description

@iritkatriel

compiler_set_qualname is called at the end of _PyCompile_EnterScope, after the compiler entered the scope. If it fails, _PyCompile_EnterScope returns error (without reverting the scope entry) and the caller would assume that there was no change in scope.

Linked PRs

Activity

  1. added
    3.13only security fixes
    3.14bugs and security fixes
    3.15bugs and security fixes
    3.16new features, bugs and security fixes
    type-bugAn unexpected behavior, bug, or error
    on Aug 27, 2026
  2. added a commit that references this issue on Aug 29, 2026
  3. added a commit that references this issue on Sep 12, 2026
  4. added a commit that references this issue on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixes3.14bugs and security fixes3.15bugs and security fixes3.16new features, bugs and security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions