Skip to content

fix(msgspec): handle boolean timezone constraints#863

Open
77652189 wants to merge 1 commit into
litestar-org:mainfrom
77652189:fix-msgspec-boolean-tz-constraints
Open

fix(msgspec): handle boolean timezone constraints#863
77652189 wants to merge 1 commit into
litestar-org:mainfrom
77652189:fix-msgspec-boolean-tz-constraints

Conversation

@77652189

Copy link
Copy Markdown

Summary

  • handle msgspec boolean tz constraints when generating constrained datetimes
  • generate datetime values before falling back to date constraint handling
  • update the msgspec regression test to validate tz=True and tz=False

Closes #768

Testing

  • uv run --extra msgspec pytest tests/test_msgspec_factory.py -q
  • original issue MCVE with Meta(tz=True)
  • uv run ruff check polyfactory/value_generators/constrained_dates.py polyfactory/factories/base.py polyfactory/field_meta.py tests/test_msgspec_factory.py

@77652189 77652189 requested a review from adhtruong as a code owner June 11, 2026 03:13
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.

Bug: date value generator incompatible with masgspec datetime 'tz' constraint

1 participant