Closed carlsmedstad closed 1 year ago
Interesting... I guess I assumed that the local zone would default to pytz's version of UTC or something.
I explicitly quashed that deprecation warning because I thought that passing the timezone directly into the datetime init function would produce unexpected results on Python 3.8 (3.9?) and under---burned myself on that one in the past---but I suppose I might have to get to the bottom of that anyway. Worst case, we branch based on the Python version.
Will take a look; thanks!
Describe the bug
Running the tests on a system with no timezone set makes
pyhanko_tests/cli_tests/conftest.py fail
:This is due to the following deprecated use of datetime:
On a system with a timezone set, this part still produces a deprecation warning:
See this for more info: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
To Reproduce
Running in a docker image is the easiest way to reproduce.
Expected behavior
Tests should pass, regardless of if a timezone is set or not.
Environment (please complete the following information):