Skip to content

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Adds iterable_schema, which is intended to solve my proposal in pydantic/pydantic#9541 (comment)

pydantic should update all existing uses of generator_schema to iterable_schema, which allows for lazy = False as a field-level setting. We should probably also have a config setting called lazy_iterables or similar, (TODO).

If we want to allow support for Iterator and Generator types in pydantic, those can use generator_schema.

Related issue number

pydantic/pydantic#9541

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

Copy link

codspeed-hq bot commented Sep 23, 2025

CodSpeed Performance Report

Merging #1792 will not alter performance

Comparing dh/iterable-schema (c45e43c) with main (0cd11fe)

Summary

✅ 163 untouched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant