-
Notifications
You must be signed in to change notification settings - Fork 78
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
Python deprecation fixes #309
Merged
Merged
Conversation
This file contains 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
Setuptools v72 deprecated the 'setup.py test' command, so stop using that for running tests. Instead, execute the 'unittest' module directly, using our protocol to pass the test suite name as an environment variable to the module test loader. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
…atplotlib Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
tohojo
force-pushed
the
unittest-runner
branch
from
September 10, 2024 13:22
3ce1d8f
to
52c69d5
Compare
Python 3.12 deprecated datetime.utcnow() and datetime.utcfromtimestamp() in an attempt to move users away from the naive datetime representations. However, we already do all our own UTC offset handling, and we need to continue to do so to stay backwards compatible, cf commit: 5f15409 ("resultset: Guess timezone offset from data instead of using system time"). So we really want to keep using the naive representations; so implement our own versions of the deprecated functions and keep using those. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
The heading of the default SummaryFormatter output didn't use the format_date() wrapper to handle UTC conversions correctly, which meant it output wrong dates for the test runs. Fix this by correctly using the helper. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Old Python versions don't define datetime.UTC, so conditionally import it and just use the old datetime.utcnow() and datetime.utcfromtimestamp() functions on those Python versions. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
tohojo
changed the title
Makefile: Don't use 'setup.py test' to run unittests
Python deprecation fixes
Sep 10, 2024
Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Exclude some more version combinations that seem to cause crashes on fork() when using PySide2. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
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.
Setuptools v72 deprecated the 'setup.py test' command, so stop using that for
running tests. Instead, execute the 'unittest' module directly, using our
protocol to pass the test suite name as an environment variable to the module
test loader.
Python 3.12 also deprecated
datetime.utc*()
, so add our own implementations to continue using them.