Skip to content

migrate from utcfromtimestamp to fromtimestamp#25918

Merged
tacaswell merged 33 commits into
matplotlib:mainfrom
smeet07:patch-1
May 23, 2023
Merged

migrate from utcfromtimestamp to fromtimestamp#25918
tacaswell merged 33 commits into
matplotlib:mainfrom
smeet07:patch-1

Conversation

@smeet07

@smeet07 smeet07 commented May 19, 2023

Copy link
Copy Markdown
Contributor

PR summary

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

PR checklist

closes #25912

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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

oscargus commented May 19, 2023

Copy link
Copy Markdown
Member

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

smeet07 commented May 19, 2023

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Member

You also need to import timezone before datetime.

Comment thread lib/matplotlib/backends/backend_ps.py Outdated
@smeet07
smeet07 requested a review from oscargus May 20, 2023 04:26

@oscargus oscargus left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@QuLogic

QuLogic commented May 24, 2023

Copy link
Copy Markdown
Member

@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
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
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