GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — FrameLocalsProxy is not a mapping · Issue #120097 · python/cpython

FrameLocalsProxy is not a mapping #120097

New issue
Copy link
New issue
Copy link
Closed
Closed
FrameLocalsProxy is not a mapping#120097
Copy link
Assignees
markshannon
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@markshannon
markshannon
opened on Jun 5, 2024
Issue body actions

Bug report

Bug description:

FrameLocalsProxy should be a mapping. I.e. it should subclass collections.abc.Mapping and match {} in a match statement.

from collections.abc import Mapping
import sys

def f():
    return sys._getframe().f_locals

proxy = f()

assert(instance(proxy, Mapping))

match proxy:
    case {}:
        kind = "mapping"
    case _:
        kind = "other"

assert(kind == "mapping")

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

  • GH-120097: Make FrameLocalsProxy a mapping #120101
  • [3.13] GH-120097: Make FrameLocalsProxy a mapping (GH-120101) #120749
Reacted by Kirill Podoprigora

Activity

  1. markshannon
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    3.13only security fixesonly security fixes
    3.14bugs and security fixesbugs and security fixes
    on Jun 5, 2024
  2. markshannon
    self-assigned this
    on Jun 5, 2024
  3. markshannon
    added a commit that references this issue on Jun 19, 2024

    GH-120097: Make FrameLocalsProxy a mapping (#120101)

    d1c673b
  4. miss-islington
    added a commit that references this issue on Jun 19, 2024

    pythonGH-120097: Make FrameLocalsProxy a mapping (pythonGH-120101)

    7b1502e
  5. mrahtz
    added a commit that references this issue on Jun 30, 2024

    pythonGH-120097: Make FrameLocalsProxy a mapping (python#120101)

    5639472
  6. estyxx
    added a commit that references this issue on Jul 17, 2024

    pythonGH-120097: Make FrameLocalsProxy a mapping (python#120101)

    b3a69be
  7. markshannon
    added a commit that references this issue on Aug 23, 2024

    [3.13] GH-120097: Make FrameLocalsProxy a mapping (GH-120101) (GH-120749

    95b4f9c
  8. markshannon
    closed this as completedon Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @markshannon
    markshannon

Labels

3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.