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 — gh-136492: Add `FrameLocalsProxyType` to `types` by ZeroIntensity · Pull Request #136546 · python/cpython

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Jul 11, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Expose PEP-667's FrameLocalsProxy type as FrameLocalsProxyType in the types module.

  • Issue: FrameLocalsProxy (PEP 667) is not registered as a subclass of abc.Mapping #136492

📚 Documentation preview 📚: https://cpython-previews--136546.org.readthedocs.build/en/136546/library/types.html#types.FrameLocalsProxyType

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

johnslavik reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
ZeroIntensity added 8 commits July 11, 2025 10:12
@ZeroIntensity
Expose FrameLocalsProxy in types and _types
78b842c
@ZeroIntensity
Add a test case.
e2ddcbe
@ZeroIntensity
Add a documentation entry.
22e056d
@ZeroIntensity
Use the 'type' suffix.
b8fd733
@ZeroIntensity
Add a whatsnew entry.
abbe1d3
@ZeroIntensity
Add blurb.
753c9bc
@ZeroIntensity
Fix the tests.
b087d9b
@ZeroIntensity
Sort the name alphabetically.
1971a14
@ZeroIntensity
ZeroIntensity requested a review from gaogaotiantian July 11, 2025 14:27
@bedevere-app bedevere-app Bot added the awaiting core review label Jul 11, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Jul 11, 2025
FrameLocalsProxy (PEP 667) is not registered as a subclass of abc.Mapping #136492
Closed
@ZeroIntensity
Sort alphabetically in _types.
fdeb2d0
picnixz
picnixz reviewed Jul 11, 2025
View reviewed changes
Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_types.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

ZeroIntensity added 3 commits July 11, 2025 11:08
@ZeroIntensity
Move whatsnew section.
c8600b9
@ZeroIntensity
Somewhat fix the tests.
70cc4db
@ZeroIntensity
Reduce the diff.
fee5256
@ZeroIntensity

ZeroIntensity commented Jul 11, 2025

Copy link
Copy Markdown
Member Author

Ugh, those test failures look like an existing bug on FrameLocalsProxy.

blockchainGuru1018 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity
Use a workaround for the tests.
a110148
blockchainGuru1018

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Jul 11, 2025

Copy link
Copy Markdown
Member

@python/organization-owners Could you block blockchainGuru1018 for spam & misguided reviews? TiA.

JacobCoffee reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gaogaotiantian
gaogaotiantian reviewed Jul 11, 2025
View reviewed changes
Comment thread Doc/library/types.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

gaogaotiantian
gaogaotiantian reviewed Jul 11, 2025
View reviewed changes
Comment thread Doc/library/types.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@gaogaotiantian

gaogaotiantian commented Jul 11, 2025

Copy link
Copy Markdown
Member

Ugh, those test failures look like an existing bug on FrameLocalsProxy.

Could you be more specific? Maybe raise an issue for that so I can fix it later?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity

ZeroIntensity commented Jul 11, 2025

Copy link
Copy Markdown
Member Author

Could you be more specific? Maybe raise an issue for that so I can fix it later?

There were a few things I had to skip in test_inspect. I think they're bugs, but I haven't investigated the test enough to be sure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity
Move PEP note and remove locals() reference.
929f81e
@gaogaotiantian

gaogaotiantian commented Jul 11, 2025

Copy link
Copy Markdown
Member

Okay now we need some typing expert to review this. @JelleZijlstra maybe?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity

ZeroIntensity commented Jul 12, 2025

Copy link
Copy Markdown
Member Author

I'd also appreciate it if @AA-Turner could take a look; he's done some recent work with types and _types.

AA-Turner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JelleZijlstra

JelleZijlstra commented Jul 12, 2025

Copy link
Copy Markdown
Member

You don't really need a static typing expert for the types module; it predates static typing and is useful even without static typing. The PR seems pretty straightforward to me.

ZeroIntensity reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

JelleZijlstra
JelleZijlstra reviewed Jul 12, 2025
View reviewed changes
Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_inspect/test_inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_inspect/test_inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/types.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity @JelleZijlstra
Update Doc/whatsnew/3.15.rst
fb710eb
Co-authored-by: Jelle Zijlstra <[email protected]>
@ZeroIntensity
Add a signature for FrameLocalsProxy()
5923263
@ZeroIntensity
ZeroIntensity requested a review from markshannon as a code owner July 12, 2025 20:58
ZeroIntensity added 4 commits July 15, 2025 03:54
@ZeroIntensity
Change the tp_name to types.FrameLocalsProxyType.
22c2bbe
@ZeroIntensity
Merge branch 'main' into frameslocalsproxy-types
9bca253
@ZeroIntensity
Fix type name in test_frame.
58e8577
@ZeroIntensity
Merge branch 'frameslocalsproxy-types' of https://github.com/zerointe…
bdabeaf
…nsity/cpython into frameslocalsproxy-types
AA-Turner
AA-Turner reviewed Jul 15, 2025
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2025-07-11-10-23-44.gh-issue-136492.BVi5h0.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/types.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_types.py Outdated
'MethodDescriptorType', 'MethodType', 'MethodWrapperType',
'ModuleType', 'NoneType', 'NotImplementedType', 'SimpleNamespace',
'TracebackType', 'UnionType', 'WrapperDescriptorType',
'FrameLocalsProxyType'

@AA-Turner AA-Turner Jul 15, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the list sorted (GH doesn't let me add a suggestion)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ZeroIntensity ZeroIntensity Jul 15, 2025

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had that originally but @picnixz had reservations about it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@AA-Turner AA-Turner Jul 15, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to keep the list sorted rather than attempt to minimise 3-4 lines of diff here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ZeroIntensity ZeroIntensity Jul 15, 2025

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@picnixz picnixz Jul 15, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion was to keep it sorted but by just adding the export on its own line.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AA-Turner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@ZeroIntensity ZeroIntensity Jul 20, 2025

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed this. I've updated it now; does that look better?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_types.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/types.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Objects/frameobject.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity @AA-Turner
Apply suggestions from code review
7a649c2
Co-authored-by: Adam Turner <[email protected]>
@AA-Turner AA-Turner changed the title gh-136492: Add FrameLocalsProxy to types gh-136492: Add FrameLocalsProxyType to types Jul 15, 2025
ZeroIntensity and others added 7 commits July 15, 2025 04:40
@ZeroIntensity
Revert "Fix type name in test_frame."
e0f674d
This reverts commit 58e8577.
@ZeroIntensity
Revert "Change the tp_name to types.FrameLocalsProxyType."
faa4cf4
This reverts commit 22c2bbe.
@ZeroIntensity
Merge branch 'frameslocalsproxy-types' of https://github.com/zerointe…
ca05198
…nsity/cpython into frameslocalsproxy-types
@ZeroIntensity
Revert "Reduce the diff."
0463c30
This reverts commit fee5256.
@ZeroIntensity
Fix tests that were broken by the tp_name revert.
59daace
Should I test before I push my changes? Yes. Will I ever do it? No.
@ZeroIntensity @AA-Turner
Unify how FrameType and FrameLocalsProxyType are created.
349374d
Co-authored-by: Adam Turner <[email protected]>
@ZeroIntensity
Keep it sorted but with a smaller diff.
287c993
AA-Turner
AA-Turner reviewed Jul 20, 2025
View reviewed changes
Comment thread Lib/test/test_inspect/test_inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner
trailing comma
047f59e
AA-Turner
AA-Turner approved these changes Jul 20, 2025
View reviewed changes

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

A

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Objects/frameobject.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jul 20, 2025
@ZeroIntensity @AA-Turner
Update frameobject.c
63e263e
Co-authored-by: Adam Turner <[email protected]>
@ZeroIntensity

ZeroIntensity commented Jul 20, 2025

Copy link
Copy Markdown
Member Author

Any final objections before I merge this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner

AA-Turner commented Jul 20, 2025

Copy link
Copy Markdown
Member

All good with me.

A

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner AA-Turner added the sprint label Jul 20, 2025
@ZeroIntensity
ZeroIntensity merged commit 8f59fbb into python:main Jul 20, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 20, 2025
@ZeroIntensity
ZeroIntensity deleted the frameslocalsproxy-types branch July 20, 2025 18:49
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@ZeroIntensity @JelleZijlstra
@AA-Turner @taegyunkim
pythongh-136492: Add FrameLocalsProxyType to types (pythonGH-136546)
bb70585
Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
@ZeroIntensity @JelleZijlstra
@AA-Turner @Agent-Hellboy
pythongh-136492: Add FrameLocalsProxyType to types (pythonGH-136546)
b4e0f1a
Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra left review comments
@picnixz picnixz picnixz left review comments
@gaogaotiantian gaogaotiantian gaogaotiantian left review comments
@AA-Turner AA-Turner AA-Turner approved these changes
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
+1 more reviewer
@blockchainGuru1018 blockchainGuru1018 blockchainGuru1018 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

sprint

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@ZeroIntensity @picnixz @gaogaotiantian @JelleZijlstra @AA-Turner @blockchainGuru1018
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.