$ the-wire · showcase
model_fields_set moves to a bitset; real-world model corpora enter the benchmark suite
By RepoJournal · Filed · About FastAPI & Pydantic · Composed from the cited sources · methodology
Pydantic replaces the Python set behind __pydantic_fields_set__ with a bitset-backed ModelFieldsSet, and its benchmarking effort pivots from flaky startup timings to frozen model graphs, including 2,621 model declarations from the OpenAI SDK.
Improve performance of `model_fields_set` pydantic/pydantic
__pydantic_fields_set__ is now an instance of a new ModelFieldsSet class implemented in pydantic-core, tracking explicitly set fields as a bitset instead of a Python set of field names. The work started from memory issues in pydantic-core, so long-lived models with many fields are where the footprint difference shows up.
Benchmark frozen model corpora from MCP and AI SDKs pydantic/pydantic
Frozen model-only workloads for large real Pydantic graphs were added to the CodSpeed CPU-simulation suite: MCP with 518 model declarations, OpenAI with 2,621, and Anthropic with 1,186, all requiring Python 3.10+. They measure construction and eager schema building without whole-SDK imports, child-process timing, or new SDK dependencies.
Revert "Add fresh-interpreter library startup benchmarks" pydantic/pydantic
The fresh-interpreter library startup benchmarks were reverted. As the PR puts it, "These were too unstable due to limitations of wall time measurements on GH runners," so startup numbers from that suite are gone from the dashboard until a measurement approach holds up.
Benchmark larger JSON model lists pydantic/pydantic
A new benchmark covers TypeAdapter(list[Inner]).validate_json(), nested-model benchmarks go from 100 to 1,000 items, and the list cases in test_model_json_streaming[*] go from 1,000 to 10,000 values. The resized cases carry new benchmark IDs, so CodSpeed starts fresh baselines rather than comparing different input sizes.
Fix broken anchor and outdated test paths in SECURITY.md and contributing guide (#14133) pydantic/pydantic
SECURITY.md and the contributing guide picked up fixes for a broken anchor and outdated test paths, so the docs now point contributors at the right places.