Skip to content
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

add utcnow() helper function to avoid datetime.utcnow() #7717

Merged
merged 1 commit into from
Jul 6, 2023
Merged

add utcnow() helper function to avoid datetime.utcnow() #7717

merged 1 commit into from
Jul 6, 2023

Conversation

FelixSchwarz
Copy link
Contributor

datetime.utcnow() is deprecated since Python 3.12. This causes additional lines of output and thus breaks the test suite. I was not sure if all borg internals are ready to deal with timezone-aware datetime instances so tried to keep the changes minimal.

This error was detected during the Python 3.12 mass rebuild for the upcoming Fedora 39.

`datetime.utcnow()` is deprecated since Python 3.12. This causes additional lines of
output and thus breaks the test suite. I was not sure if all borg internals are
ready to deal with timezone-aware datetime instances so tried to keep the changes
minimal.
@codecov-commenter
Copy link

codecov-commenter commented Jul 6, 2023

Codecov Report

Merging #7717 (98f547f) into 1.2-maint (ae7fd9b) will decrease coverage by 0.25%.
The diff coverage is 93.33%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@              Coverage Diff              @@
##           1.2-maint    #7717      +/-   ##
=============================================
- Coverage      82.48%   82.23%   -0.25%     
=============================================
  Files             38       38              
  Lines          10670    10673       +3     
  Branches        2046     2046              
=============================================
- Hits            8801     8777      -24     
- Misses          1324     1347      +23     
- Partials         545      549       +4     
Impacted Files Coverage Δ
src/borg/archive.py 80.80% <83.33%> (-1.10%) ⬇️
src/borg/archiver.py 79.37% <100.00%> (-0.41%) ⬇️
src/borg/helpers/manifest.py 92.61% <100.00%> (ø)
src/borg/helpers/time.py 82.66% <100.00%> (+0.47%) ⬆️
src/borg/repository.py 83.60% <100.00%> (ø)

@ThomasWaldmann ThomasWaldmann merged commit c79e970 into borgbackup:1.2-maint Jul 6, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants