-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Replace pytz
dependency with zoneinfo
. Fix #2958
#3161
Conversation
1965b25
to
528014b
Compare
Hey Will. Many thanks for the contribution. There seems to be one or more CI failures with tests and linters. Would you be so kind as to take a look and see what needs to be done to fix those? |
Apologies, I've fixed the linting error but am stuck on the Python 3.8 test! Here's what I've done to troubleshoot:
Would be grateful for any pointers as to why the test is failing on the server but not locally! |
Let me know if you have any trouble fixing the import order that is causing the linter conformance failure. The solution to the "works locally but not in CI" mystery is that we haven't yet fully switched over to In the interim, I rectified that problem by adding With that problem fixed, the next issue has reared its head, which is a test failure in the Windows test environment. Could you take a look at the test failure output and see what you can come up with to fix that failure? |
Thanks @justinmayer! Useful to know. I think maybe maintainers need to approve tests so I'm not completely sure, but I believe the Windows problem may be because Windows doesn't have an IANA database so I should have used |
a8c9fe3
to
aae2fe2
Compare
Thanks for fixing (hopefully) the Windows test failure. By the way, it's usually not a good idea to add formatting changes to a PR that aren't related to changed lines of code. In this case, for example, there are a ton of changed lines in this PR that are probably the result of running Black, et al, on entire file(s). Those kinds of widespread formatting changes are usually best done in the context of separate PRs. Otherwise it's too hard to see the actual relevant code changes, because they are lost in a sea of formatting changes. So my suggestion would be to replace the last commit with one that just addresses problems that are fixed by |
aae2fe2
to
03b8eb6
Compare
03b8eb6
to
455deeb
Compare
Thank you! I realised that I need to turn off my Black linter after I'd pushed, so I'll remember to avoid doing so next time. I ought also to check the diff to make sure I'm not inadvertently pushing more changes than I expect. Hopefully the final commit with linting and substantive tests all passing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your work on this, Will. Nicely done! Tests are all now passing, and I don't see any glaring problems jumping out at me.
@avaris: Would you take a quick look at this, just as a second pair of eyes?
Brilliant, thanks Justin! I am conscious that the tests still depend on |
Many thanks for that offer, Will. Removing If @avaris doesn't have time to chime in within the next few hours, I'll go ahead and merge this so we can proceed. Any needed follow-up adjustments can be done "in post", as it were. 😊 |
pytz
dependency with zoneinfo
. Fix #2958
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you please make the same improvement noted above in the other two relevant files in this PR? That is:
pelican/tools/pelican_quickstart.py
pelican/utils.py
Thanks! Grepped for all zoneinfo references and all done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks to @willthong for the enhancement and to @avaris for reviewing! 🌟
Pull Request Checklist
Resolves: #2958
Also wasn't sure how to add tests for changed code - sorry.