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-141510 Update mapping methods in abstract.c to accept frozendict by da-woods · Pull Request #150692 · python/cpython

Conversation

@da-woods

@da-woods da-woods commented May 31, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

... as well as dict.

Specifically PyMapping_GetOptionalItem, PyMapping_Keys, PyMapping_Values and PyMapping_Items.

  • Issue: PEP 416: Add a builtin frozendict type #58370
  • Issue: PEP 814: Add built-in frozendict type #141510

Sorry, something went wrong.

Uh oh!

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

All reactions
@da-woods
Update mapping methods in abstract.c to accept frozendict as well as …
161ed33
…dict

Specifically `PyMapping_GetOptionalItem`, `PyMapping_Keys`, `PyMapping_Values` and `PyMapping_Items`.
@bedevere-app bedevere-app Bot added the awaiting review label May 31, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 31, 2026
PEP 416: Add a builtin frozendict type #58370
Closed
@da-woods

da-woods commented May 31, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

I think this is probably OK to attach to the "frozendict" implementation issue, but I can change it if not

(Edit: although I originally linked it to a previous proposal...)

All reactions

Sorry, something went wrong.

Uh oh!

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

@da-woods da-woods changed the title gh-58370 Update mapping methods in abstract.c to accept frozendict gh-141510 Update mapping methods in abstract.c to accept frozendict Jun 4, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jun 4, 2026
PEP 814: Add built-in frozendict type #141510
Closed
vstinner
vstinner reviewed Jun 18, 2026
View reviewed changes

@vstinner vstinner 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.

Please update test_mapping_keys_valuesitems() of Lib/test/test_capi/test_abstract.py to test frozendict.

Sadly, PyMapping_GetOptionalItem() doesn't seem to be tested by test_capi so far. But that can be done in another PR.

Sorry, something went wrong.

Uh oh!

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

All reactions
da-woods and others added 2 commits June 18, 2026 19:15
@da-woods
Add C API tests
5dbcd9a
@blurb-it
📜🤖 Added by blurb_it.
9efaa9c
vstinner
vstinner approved these changes Jun 19, 2026
View reviewed changes

@vstinner vstinner 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.

LGTM. Thanks for added tests, they seem to cover well your C changes.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jun 19, 2026
@vstinner vstinner added the needs backport to 3.15 bugs and security fixes label Jun 19, 2026
@vstinner

vstinner commented Jun 19, 2026

Copy link
Copy Markdown
Member

Tests / Sanitizers / TSan (free-threading) (pull_request): Cancelled after 60m

test_abc hangs in Parallel Tests: that's the known issue #151593.

Another issue is that installing dependencies took 33 minutes.

I re-run the job.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner enabled auto-merge (squash) June 19, 2026 08:19
@vstinner
vstinner merged commit a5568d0 into python:main Jun 19, 2026
104 of 106 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Jun 19, 2026
@miss-islington-app

miss-islington-app Bot commented Jun 19, 2026

Copy link
Copy Markdown

Thanks @da-woods for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Jun 19, 2026

Copy link
Copy Markdown

GH-151704 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Jun 19, 2026
vstinner pushed a commit that referenced this pull request Jun 19, 2026
@miss-islington @da-woods @blurb-it
[3.15] gh-141510 Add frozendict fast paths to abstract.c (GH-150692) (#…
2c09c0e
…151704)

gh-141510 Add frozendict fast paths to abstract.c (GH-150692)

Add frozendict to the fast paths of PyMapping_GetOptionalItem(),
PyMapping_Keys(), PyMapping_Values(), and PyMapping_Items().
(cherry picked from commit a5568d0)

Co-authored-by: da-woods <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@da-woods
da-woods deleted the patch-4 branch June 19, 2026 17:15
pyctrl pushed a commit to pyctrl/cpython that referenced this pull request Jul 5, 2026
@da-woods @blurb-it @pyctrl
pythongh-141510 Add frozendict fast paths to abstract.c (python#150692)
1ff92c0
Add frozendict to the fast paths of PyMapping_GetOptionalItem(),
PyMapping_Keys(), PyMapping_Values(), and PyMapping_Items().

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

2 participants

@da-woods @vstinner
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 01402520 — 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.