pydantic / pydantic-core

Core validation logic for pydantic written in rust
MIT License
1.34k stars 207 forks source link

Fix field_serializer doesn't have include or exclude param #1320

Closed nix010 closed 3 weeks ago

nix010 commented 1 month ago

Change Summary

Fix the issue raised in pydantic repo #1319

Related issue number

fix #1319

Checklist

Selected Reviewer: @adriangb

nix010 commented 1 month ago

please review

codecov[bot] commented 1 month ago

Codecov Report

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

:loudspeaker: Thoughts on this report? Let us know!

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #1320 will not alter performance

Comparing nix010:fix-field-serializer-not-have-exclude-and-include (e61f069) with main (34d789f)

Summary

✅ 155 untouched benchmarks

sydney-runkle commented 1 month ago

@nix010,

Thanks for all of your awesome contributions! Just FYI, we have a slack you can join here for more rapid feedback / discussion :). https://join.slack.com/t/pydanticlogfire/shared_invite/zt-2b57ljub4-936siSpHANKxoY4dna7qng

davidhewitt commented 3 weeks ago

Agreed that a special-case here seems suspicious to me.

As per https://github.com/pydantic/pydantic/issues/9538#issuecomment-2158480313 I need convincing that the original behaviour is unwanted.

sydney-runkle commented 3 weeks ago

Closing as resolved according to https://github.com/pydantic/pydantic/issues/9538#issuecomment-2158480313, thanks @davidhewitt !