Skip to content

Simplify schema generation for uuid, url, and ip types#9975

Merged
sydney-runkle merged 1 commit intomainfrom
uuid-move
Jul 25, 2024
Merged

Simplify schema generation for uuid, url, and ip types#9975
sydney-runkle merged 1 commit intomainfrom
uuid-move

Conversation

@sydney-runkle
Copy link
Copy Markdown
Contributor

@sydney-runkle sydney-runkle commented Jul 25, 2024

Some std types, including uuid.UUID, various IP address types, and core_schema.Url/ core_schema.MultiHostUrl had complicated schema application patterns, jumping through annotation hoops that weren't needed.

This moves the generation of those schemas to the _generate_schema.py file directly!

This results in a minor improvement to the schema build time: https://codspeed.io/pydantic/pydantic/branches/uuid-move

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Jul 25, 2024
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3b97ab5
Status: ✅  Deploy successful!
Preview URL: https://98ff39ba.pydantic-docs.pages.dev
Branch Preview URL: https://uuid-move.pydantic-docs.pages.dev

View logs

@sydney-runkle sydney-runkle added relnotes-performance Used for performance improvements. and removed relnotes-fix Used for bugfixes. labels Jul 25, 2024
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jul 25, 2024

CodSpeed Performance Report

Merging #9975 will not alter performance

Comparing uuid-move (3b97ab5) with main (d7931c0)

Summary

✅ 14 untouched benchmarks

@github-actions
Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes-performance Used for performance improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants