Update to work with latest tech stack - #26
Merged
Conversation
pganssle
force-pushed
the
fix_tzabbr
branch
4 times, most recently
from
June 11, 2019 20:43
c844e90 to
9f49fe0
Compare
gpshead
reviewed
Jun 11, 2019
gpshead
reviewed
Jun 12, 2019
pganssle
force-pushed
the
fix_tzabbr
branch
2 times, most recently
from
June 12, 2019 01:11
f29969a to
db04ede
Compare
gpshead
approved these changes
Jun 12, 2019
gpshead
reviewed
Jun 12, 2019
| def utcoffset(self, dt): | ||
| return self._get_localized(dt).utcoffset() # pragma: no cover | ||
|
|
||
| def dst(self, dt): |
There was a problem hiding this comment.
dst needs to be a method (as this is) but above in the constructor you set .dst as an attribute.
Contributor
Author
There was a problem hiding this comment.
Oooh, good catch, changed it to is_dst.
Would be nice to get actual coverage of this and utcoffset, but it seems wrong to add a test for something that should not really be part of the public interface.
dateutil expects tzinfos to return an actual tzinfo object, which is causing failures with recent versions. This switches tzabbr over to acting as a proxy for its associated pytz zone rather than a passive label.
This should be able to build a single universal wheel, so there is no need for separate Python 2 and Python 3 releases. This also uses PEP 517 for the builds and drops invocations of setup.py
If this is necessary, it should probably be done in a CI stage, or with parametrized tox environments.
When the default locale cannot be detected, `locale.getdefaultlocale` may return `(None, None)`. This works around the issue.
This makes the mock functions work like the underlying builtin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This has many changes, but this was necessary to update various parts of the module's stack (there's been a lot of churn in packaging these past few years, so that part had pretty aggressively bit-rotted).
The biggest changes are:
setup.py.tzabbra real, usabletzinfo, since that is whatdateutilis expecting - even though it's a thin proxy over an underlyingpytzzone.pep517.buildto run the builds andtwineto upload them. This avoidssetup.pyinvocations entirely, which is desirable.setup.py test(deprecated) to usingtox, which allows you to declare dependencies per-environment, runs the tests in a virtual environment, etc.run_tests_all_pytz.py. Because it was trying to act as some sort of PyPI client and pip installing old versions ofpytz. I think this would be better accomplished with parametrized tox environment, but I'm not really sure it's necessary at all -pytzis very stable these days, as is this project.Fixes #25.
I'll note that this also really could use a
python_requiresin thesetup(), but I wasn't sure which versions are supported.