Skip to content

migrate from utcfromtimestamp to fromtimestamp #25918

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

Merged
merged 33 commits into from
May 23, 2023
Merged

Conversation

smeet07
Copy link
Contributor

@smeet07 smeet07 commented May 19, 2023

PR summary

utcfromtimestamp is getting deprecated, making appropriate changes to avoid behavior changes

PR checklist

closes #25912

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@oscargus
Copy link
Member

oscargus commented May 19, 2023

Thank you! I think it will be solved if you change order of the imports and change datetime.timezone to timezone. (Now, first datetime is imported from datetime, so when you want to import timezone from datetime, it is not the "original" datetime, but datetime.datetime.)

(I take it that you edit in the browser? We should just remember to squeeze it down into one single commit when merging.)

@smeet07
Copy link
Contributor Author

smeet07 commented May 19, 2023

Thank you! I think it will be solved if you change order of the imports and change datetime.timezone to timezone. (Now, first datetime is imported from datetime, so when you want to import timezone from datetime, it is not the "original" datetime, but datetime.datetime.)

(I take it that you edit in the browser? We should just remember to squeeze it down into one single commit when merging.)

ahh makes sense

@oscargus
Copy link
Member

You also need to import timezone before datetime.

@smeet07 smeet07 requested a review from oscargus May 20, 2023 04:26
Copy link
Member

@oscargus oscargus left a comment

Choose a reason for hiding this comment

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

Thanks!

Note to second reviewer/merger: make sure you squash the commits before merging.

@oscargus oscargus added this to the v3.8.0 milestone May 23, 2023
@tacaswell tacaswell merged commit 6df1bb3 into matplotlib:main May 23, 2023
@tacaswell
Copy link
Member

Thank you for this @smeet07 and congratulations on your first merged Matplotlib PR 🎉 I hope we hear from you again!

@QuLogic
Copy link
Member

QuLogic commented May 24, 2023

@meeseeksdev backport to v3.7.x

@QuLogic QuLogic modified the milestones: v3.8.0, v3.7.2 May 24, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 24, 2023
oscargus added a commit that referenced this pull request May 24, 2023
…918-on-v3.7.x

Backport PR #25918 on branch v3.7.x (migrate from utcfromtimestamp to fromtimestamp)
devRD pushed a commit to devRD/matplotlib that referenced this pull request Jun 5, 2023
melissawm pushed a commit to melissawm/matplotlib that referenced this pull request Jun 15, 2023
QuLogic pushed a commit to fedora-python/matplotlib that referenced this pull request Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

deal with upcoming deprecations in CPython
4 participants