Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ValueError on year zero #1583

Merged
merged 1 commit into from
Dec 18, 2024
Merged

fix ValueError on year zero #1583

merged 1 commit into from
Dec 18, 2024

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Makes creation of a Python date or datetime fail if the year is zero.

Related issue number

Fixes pydantic/pydantic#10967

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

@davidhewitt davidhewitt added the backport-2.27 Needs backport to 2.27 label Dec 17, 2024
Copy link

codspeed-hq bot commented Dec 17, 2024

CodSpeed Performance Report

Merging #1583 will not alter performance

Comparing dh/date-ranges (36b1ffd) with main (39435c2)

Summary

✅ 157 untouched benchmarks

Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, tysm!

@davidhewitt davidhewitt merged commit 15adfc7 into main Dec 18, 2024
29 checks passed
@davidhewitt davidhewitt deleted the dh/date-ranges branch December 18, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2.27 Needs backport to 2.27
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date field with year zero will raise ValueError instead of ValidationError
2 participants