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

✅ Implement tzinfo.fromutc method for TzInfo in pydantic-core #7019

Merged
merged 2 commits into from Aug 23, 2023

Conversation

lig
Copy link
Contributor

@lig lig commented Aug 7, 2023

Change Summary

This PR adds tests for pydantic/pydantic-core#864

Related issue number

Fix #6735

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @hramezani

@cloudflare-pages
Copy link

cloudflare-pages bot commented Aug 7, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a9de33
Status: ✅  Deploy successful!
Preview URL: https://98186f46.pydantic-docs2.pages.dev
Branch Preview URL: https://lig-6735-tzinfo-type-doesnt.pydantic-docs2.pages.dev

View logs

class Model(BaseModel):
value: datetime

m = Model(value='2015-10-21T15:28:00.000000+01:00')
Copy link
Contributor

Choose a reason for hiding this comment

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

I would use aware_datetime_type fixture here rather than creating a Model instance manually.

@lig lig force-pushed the lig/6735-tzinfo-type-doesnt-provide-proper-dst branch from 6206fc0 to 5a9de33 Compare August 23, 2023 16:28
@lig lig marked this pull request as ready for review August 23, 2023 16:40
@lig
Copy link
Contributor Author

lig commented Aug 23, 2023

please review

@lig lig merged commit 8467fdd into main Aug 23, 2023
50 checks passed
@lig lig deleted the lig/6735-tzinfo-type-doesnt-provide-proper-dst branch August 23, 2023 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TzInfo type doesn't provide proper dst
4 participants