Skip to content

it's no longer possible to delete items from f_locals (FrameLocalsProxy) in 3.13+ #125590

Closed
@deanagarrott

Description

@deanagarrott

Bug report

Bug description:

           try:
                driver.switch_to.alert.accept()
                driver.switch_to.alert.dismiss()
            except:
                pass

In the example script above, if the code falls into the except: pass block due to an alert not being displayed, the script will ultimately fail (even if no coding errors are encountered) with FAILED (errors=1) .
Also, the following messages will be displayed in the output:
image

This code works fine in Python 3.12. The script succeeds with message OK and none of the above error messages. We can't move to 3.13 version until this is fixed.

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions