Changes out invocations of datetime.utcnow() for datetime.now(UTC).
boardwalkd's ui_method_sort_events_by_date would have made this a backwards incompatible change, but we just forcibly update the tzinfo on the datetime object to be UTC, so that existing workspace state can be preserved, and so that prior versions of the client can connect. (This might be revisited down the line.)
Adds W, UP, and DTZ rulesets into the ruff configuration (pycodestyle warnings, pyupgrade, flake8-datetimez) and formats accordingly.
Resolves Backblaze SVRENG-315.
Supersedes PR #71.
How was this tested?
With boardwalkd running on the current PR, and using both the ShouldSucceedTestWorkspace and the ShouldFailTestWorkspace on both the new and prior client version.
Checklist
[x] Have you updated the version in the [tool.poetry] section of
the pyproject.toml file (if applicable)?
What and why?
datetime.utcnow()
fordatetime.now(UTC)
.Resolves Backblaze SVRENG-315. Supersedes PR #71.
How was this tested?
With
boardwalkd
running on the current PR, and using both theShouldSucceedTestWorkspace
and theShouldFailTestWorkspace
on both the new and prior client version.Checklist
version
in the[tool.poetry]
section of thepyproject.toml
file (if applicable)?