Open MeggyCal opened 7 months ago
This change seems to only be for testing files and not for datetimes produced by this library. The things it is testing seems to be from its dependency https://github.com/jborean93/smbprotocol which was fixed with https://github.com/jborean93/smbprotocol/pull/252.
While yes our test should be updated it should be updated so it's not using the deprecated datetime.utcfromtimestamp
method but instead datetime.fromtimestamp(*args, tzinfo=timezone.utc)
.
In my point of view it is better for the compatibility when the library accepts also timezone-naive datetimes, so I didn't want the changes to be too widespread. Anyway, should I make more changes? Where, how?
The changes in this PR are just for tests and not part of the actual codebase. It also continues to use the deprecated utcfromtimestamp
method whereas it should be swapped to the fromtimestamp
methods. While this should be fixed this is for tests only so it's not user facing.
True, this is not user-facing, so it is not urgent to merge :smiling_face_with_tear: . And I agree this is more of a hotfix than improvement.
What I'm trying to say is I'm happy to merge this but it should be using the non-deprecated API fromtimestamp
not the deprecated one utcfromtimestamp
. Granted I've also not run CI in this repo for a while so there's bound to be other breakages.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.52%. Comparing base (
c5e8151
) to head (13461e9
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Python 3.12 now strongly preffers timezone-aware datetime objects and some libraries have already been adapted to that. I didn't investigate which libraries, maybe the change is only a PR and we patched it in our distribution. However, the produced datetimes are now timezone-aware (or will be in near future) and this adapts pypsexec tests to this change.