Skip to content

Conversation

sydney-runkle
Copy link
Contributor

Fix #9549

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Aug 1, 2024
Copy link

cloudflare-workers-and-pages bot commented Aug 1, 2024

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1915046
Status: ✅  Deploy successful!
Preview URL: https://06f8108c.pydantic-docs.pages.dev
Branch Preview URL: https://fix-mapping.pydantic-docs.pages.dev

View logs

Copy link

codspeed-hq bot commented Aug 1, 2024

CodSpeed Performance Report

Merging #10020 will not alter performance

Comparing fix-mapping (1915046) with main (41f2d48)

Summary

✅ 17 untouched benchmarks

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic
  __init__.py
  pydantic/_internal
  _generate_schema.py
Project Total  

This report was generated by python-coverage-comment-action

@sydney-runkle sydney-runkle requested a review from adriangb August 1, 2024 19:53
@dmontagu
Copy link
Contributor

dmontagu commented Aug 1, 2024

As in #10021 I'm a bit nervous that this could cause a breaking change for someone that might currently be using these types as field annotations, since it will change their behavior. But I guess it's probably worth the improvement.

@sydney-runkle sydney-runkle changed the title Fix mapping schema build issue Fix Mapping and MutableMapping schemas to handle subclasses Aug 1, 2024
@sydney-runkle
Copy link
Contributor Author

sydney-runkle commented Aug 1, 2024

Agreed, I think this is worth the improvement for now. I would categorize this as a bug fix honestly, given the incorrect placement of Mapping in the dict types list.

@sydney-runkle
Copy link
Contributor Author

I think we can handle our subclass behavior in a separate PR.

@sydney-runkle sydney-runkle changed the title Fix Mapping and MutableMapping schemas to handle subclasses Fix Mapping and MutableMapping annotations to use mapping schema instead of dict schema Aug 1, 2024
@sydney-runkle sydney-runkle added the relnotes-change Used for changes to existing functionality which don't have a better categorization. label Aug 1, 2024
@sydney-runkle sydney-runkle merged commit 1e41385 into main Aug 1, 2024
@sydney-runkle sydney-runkle deleted the fix-mapping branch August 1, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes-change Used for changes to existing functionality which don't have a better categorization. relnotes-fix Used for bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeAdapter for collections.abc.MutableMapping fails when validate_python called on a collections.UserDict in strict mode
2 participants