Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for validating v7 UUIDs #1634

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

astei
Copy link
Contributor

@astei astei commented Feb 13, 2025

Change Summary

Adds support for validating v7 UUIDs. UUID version 7 (along with version 6) are defined in RFC 9562 and has been seeing increased popularity. To pluck some really low-hanging fruit, implement support for it in pydantic.

Related issue number

n/a

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @davidhewitt

@astei
Copy link
Contributor Author

astei commented Feb 13, 2025

please review

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.58%. Comparing base (ab503cb) to head (a02d9e0).
Report is 291 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1634      +/-   ##
==========================================
- Coverage   90.21%   89.58%   -0.63%     
==========================================
  Files         106      115       +9     
  Lines       16339    17906    +1567     
  Branches       36       25      -11     
==========================================
+ Hits        14740    16041    +1301     
- Misses       1592     1846     +254     
- Partials        7       19      +12     
Files with missing lines Coverage Δ
python/pydantic_core/core_schema.py 95.08% <100.00%> (+0.31%) ⬆️
src/validators/uuid.rs 98.63% <100.00%> (+0.03%) ⬆️

... and 64 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a467e9...a02d9e0. Read the comment docs.

Copy link

codspeed-hq bot commented Feb 13, 2025

CodSpeed Performance Report

Merging #1634 will not alter performance

Comparing astei:astei/add-uuid-v7 (a02d9e0) with main (0a467e9)

Summary

✅ 157 untouched benchmarks

Copy link
Contributor

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidhewitt davidhewitt merged commit 7da4798 into pydantic:main Feb 13, 2025
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants