online-judge
online-judge copied to clipboard
chore: replace one last django.utils.timezone.utc with datetime.timezone.utc
Motivation
I was trying to deploy DMOJ to a Ubuntu 24.04 LTS server, and for it to work, I had to upgrade to the latest version of Django. I realized that https://github.com/DMOJ/online-judge/commit/6285f972d5e4849c65ad7f21d6830aa469744743 already fixed most cases of django.utils.timezone.utc no longer existing (thanks @kiritofeng!), but there was one instance that was still causing errors.
Changes
- Replace
contests.pyuse of timezone.utc with datetime.timezone.utc too
Testing
Ran:
python3 -Wa manage.py test
on a server with MySQL, etc. installed as recommended in https://docs.dmoj.ca/#/site/installation
Codecov Report
:x: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 47.73%. Comparing base (fd7fb05) to head (c1fc4d5).
:warning: Report is 75 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| judge/views/contests.py | 25.00% | 3 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #2423 +/- ##
==========================================
+ Coverage 46.76% 47.73% +0.96%
==========================================
Files 251 260 +9
Lines 13317 13746 +429
==========================================
+ Hits 6228 6561 +333
- Misses 7089 7185 +96
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.