Skip to content

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Jun 26, 2023

Change Summary

The goal here is to expose the PydanticUndefinedType. I'm unsure if this is the best way to do it.

The motivation is that FastAPI wants the type of PydanticUndefined, and I can't get that since PydanticUndefined is an object(). See FastAPI code for more details.

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

@Kludex
Copy link
Member Author

Kludex commented Jun 26, 2023

please review

@codecov-commenter
Copy link

Codecov Report

Merging #693 (7bb97b9) into main (4c2a8f8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #693   +/-   ##
=======================================
  Coverage   93.72%   93.72%           
=======================================
  Files          99       99           
  Lines       13804    13805    +1     
  Branches       25       25           
=======================================
+ Hits        12938    12939    +1     
  Misses        860      860           
  Partials        6        6           
Impacted Files Coverage Δ
pydantic_core/__init__.py 81.81% <ø> (ø)
src/argument_markers.rs 86.88% <100.00%> (ø)
src/lib.rs 100.00% <100.00%> (ø)
src/validators/model.rs 98.41% <100.00%> (ø)
src/validators/with_default.rs 99.10% <100.00%> (ø)

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 4c2a8f8...7bb97b9. Read the comment docs.

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 26, 2023

CodSpeed Performance Report

Merging #693 feat/add-PydanticUndefinedType (7bb97b9) will improve performances by 10.2%.

Summary

🔥 1 improvements
❌ 0 regressions
✅ 124 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

Benchmarks breakdown

Benchmark main feat/add-PydanticUndefinedType Change
🔥 test_small_class_core_model 59 µs 53.5 µs +10.2%

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.

Looks good to me 👍

@Kludex Kludex merged commit dfae003 into main Jun 26, 2023
@Kludex Kludex deleted the feat/add-PydanticUndefinedType branch June 26, 2023 14:03
@Kludex
Copy link
Member Author

Kludex commented Jun 26, 2023

Ha! My first PR in rust. 😎

davidhewitt pushed a commit to pydantic/pydantic that referenced this pull request Oct 20, 2025
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.

3 participants