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: Replace MappingProxyType with frozendict by vstinner · Pull Request #144904 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Feb 17, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • 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
@vstinner
pythongh-141510: Replace MappingProxyType with frozendict
df40ed7
@vstinner
vstinner requested a review from encukou as a code owner February 17, 2026 11:12
@vstinner vstinner added the skip news label Feb 17, 2026
@vstinner
vstinner requested review from a team, ericvsmith, gpshead, hauntsaninja and picnixz as code owners February 17, 2026 11:12
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 17, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Feb 17, 2026
PEP 814: Add built-in frozendict type #141510
Closed
vstinner
vstinner commented Feb 17, 2026
View reviewed changes
Comment thread Lib/email/headerregistry.py Resolved

Uh oh!

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

@vstinner

vstinner commented Feb 17, 2026

Copy link
Copy Markdown
Member Author

Oh, the "Run mypy on Lib/tomllib" job fails with "Name frozendict is not defined" because it runs on an older Python version which doesn't have this new built-in type:

Run mypy --config-file Lib/tomllib/mypy.ini
Lib/tomllib/_parser.py:43: error: Name "frozendict" is not defined 
[name-defined]
    BASIC_STR_ESCAPE_REPLACEMENTS: Final = frozendict(
                                           ^~~~~~~~~~
Found 1 error in 1 file (checked 4 source files)
Error: Process completed with exit code 1.
All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
Revert tomllib change
98e6e45
@vstinner

vstinner commented Feb 17, 2026

Copy link
Copy Markdown
Member Author

I reverted the tomllib change to workaround the mypy issue.

All reactions

Sorry, something went wrong.

Uh oh!

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

bitdancer
bitdancer reviewed Feb 18, 2026
View reviewed changes

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

Approving the email change only, I'm not familiar with the other code bases.

Sorry, something went wrong.

Uh oh!

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

vstinner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Lib/email/headerregistry.py Resolved

Uh oh!

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

@vstinner
Update _EMPTY_METADATA comment
38bb5b0
@vstinner

vstinner commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

cc @picnixz

All reactions

Sorry, something went wrong.

Uh oh!

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

picnixz
picnixz approved these changes Feb 18, 2026
View reviewed changes

@picnixz picnixz left a comment •
edited
Loading

Uh oh!

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

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.

Ok for HMAC & other hashlib-related changes (they are only tests and essentially, I wanted an immutable view of a mapping so it serves us well)

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 core review labels Feb 18, 2026
@benediktjohannes

benediktjohannes commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Oh, tests are failing

0:13:17 load avg: 10.90 [1/1/1] test_dataclasses failed (1 failure)
Re-running test_dataclasses in verbose mode (matching: test_field_repr)
test_field_repr (test.test_dataclasses.TestCase.test_field_repr) ... FAIL

FAIL: test_field_repr (test.test_dataclasses.TestCase.test_field_repr)

Traceback (most recent call last):
File "/Users/runner/work/cpython/cpython/Lib/test/test_dataclasses/init.py", line 79, in test_field_repr
self.assertEqual(repr_output, expected_output)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: "Fiel[159 chars]dict(),kw_only=<dataclasses._MISSING_TYPE obje[50 chars]one)" != "Fiel[159 chars]dict({}),kw_only=<dataclasses._MISSING_TYPE ob[52 chars]one)"

All reactions

Sorry, something went wrong.

Uh oh!

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

@benediktjohannes

benediktjohannes commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

I'll have a look on this as soon as I've got some time

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner added 2 commits February 18, 2026 20:50
@vstinner
Merge branch 'main' into frozendict_mappingproxy
6089774
@vstinner
Update test_dataclasses for repr(frozendict)
5e3b1c4
@vstinner

vstinner commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

I updated my branch and I updated test_dataclasses for repr(frozendict) change.

metadata=frozendict({})

I updated repr(frozendict) of empty frozendict to: frozendict() instead of frozendict({}).

benediktjohannes 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.

@benediktjohannes

benediktjohannes commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner enabled auto-merge (squash) February 18, 2026 19:59
@vstinner
vstinner merged commit 0bbdb4e into python:main Feb 18, 2026
48 checks passed

Uh oh!

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

@vstinner
vstinner deleted the frozendict_mappingproxy branch February 18, 2026 20:23
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 18, 2026
@vstinner

vstinner commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

Merged. Thanks for reviews.

benediktjohannes 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.

brijkapadia pushed a commit to brijkapadia/cpython that referenced this pull request Feb 28, 2026
@vstinner @brijkapadia
pythongh-141510: Replace MappingProxyType with frozendict (python#144904
b7da1f0
)
@abdoulrasheed abdoulrasheed mentioned this pull request Mar 1, 2026
Many pure python tools that have a special cases for dict should accept frozendict as well. #145056
Open
@vstinner vstinner mentioned this pull request Apr 7, 2026
gh-145478: Implement frozendict into functools.partial #145960
Closed
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@vstinner @ljfp
pythongh-141510: Replace MappingProxyType with frozendict (python#144904
e781b26
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bitdancer bitdancer bitdancer left review comments
@picnixz picnixz picnixz approved these changes
@encukou encukou Awaiting requested review from encukou
@hauntsaninja hauntsaninja Awaiting requested review from hauntsaninja
@ericvsmith ericvsmith Awaiting requested review from ericvsmith ericvsmith is a code owner
@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

skip news

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.

5 participants

@vstinner @benediktjohannes @encukou @bitdancer @picnixz
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.