pydantic / pydantic-core

Core validation logic for pydantic written in rust
MIT License
1.4k stars 232 forks source link

Expose wrapped iterator in SerializationIterator #1399

Open yorickvP opened 1 month ago

yorickvP commented 1 month ago

Change Summary

We're currently working around pydantic#8907 by parsing the pointer out of the repr(). To make this workaround slightly better, we'd like to expose the wrapped iterator in SerializationIterator via .iterator.

Related issue number

Checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.54%. Comparing base (ab503cb) to head (6e3ed61). Report is 156 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1399 +/- ## ========================================== - Coverage 90.21% 89.54% -0.68% ========================================== Files 106 109 +3 Lines 16339 17348 +1009 Branches 36 41 +5 ========================================== + Hits 14740 15534 +794 - Misses 1592 1794 +202 - Partials 7 20 +13 ``` | [Files](https://app.codecov.io/gh/pydantic/pydantic-core/pull/1399?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic) | Coverage Δ | | |---|---|---| | [src/serializers/type\_serializers/generator.rs](https://app.codecov.io/gh/pydantic/pydantic-core/pull/1399?src=pr&el=tree&filepath=src%2Fserializers%2Ftype_serializers%2Fgenerator.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic#diff-c3JjL3NlcmlhbGl6ZXJzL3R5cGVfc2VyaWFsaXplcnMvZ2VuZXJhdG9yLnJz) | `81.39% <ø> (-13.46%)` | :arrow_down: | ... and [39 files with indirect coverage changes](https://app.codecov.io/gh/pydantic/pydantic-core/pull/1399/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/pydantic/pydantic-core/pull/1399?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/pydantic/pydantic-core/pull/1399?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic). Last update [39a6b10...6e3ed61](https://app.codecov.io/gh/pydantic/pydantic-core/pull/1399?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic).
yorickvP commented 1 month ago

Test failure looks unrelated.

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #1399 will not alter performance

Comparing yorickvP:yorickvp/expose-sit-iterator (6e3ed61) with main (39a6b10)

Summary

✅ 155 untouched benchmarks