Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nijel
Copy link
Member

@nijel nijel commented Jan 6, 2025

Proposed changes

The dummy tests were failing on my non-UTC development machine, because the timestamps were generated with mktime(), which uses the locale settings from the host. Changing this to use the timezone-aware now sorted it.

Extracted from #951 by @offbyone

Types of changes

Please check the type of change your PR introduces:

  • Release (new release request)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (PEP8, lint, formatting, renaming, etc)
  • Refactoring (no functional changes, no api changes)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build related changes (build process, tests runner, etc)
  • Other (please describe):

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.

Other information

Any other information that is important to this PR such as screenshots of how
the component looks before and after the change.

The dummy tests were failing on my non-UTC development machine, because
the timestamps were generated with mktime(), which uses the locale
settings from the host. Changing this to use the timezone-aware `now`
sorted it.
@nijel nijel self-assigned this Jan 6, 2025
@codecov
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.91%. Comparing base (326d4b3) to head (4f1507a).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
social_core/storage.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #953      +/-   ##
==========================================
+ Coverage   77.88%   77.91%   +0.02%     
==========================================
  Files         347      347              
  Lines       10669    10672       +3     
  Branches      504      503       -1     
==========================================
+ Hits         8310     8315       +5     
+ Misses       2200     2198       -2     
  Partials      159      159              
Flag Coverage Δ
unittests 77.91% <66.66%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nijel nijel merged commit 089e262 into python-social-auth:master Jan 6, 2025
4 of 9 checks passed
@nijel nijel deleted the timezone branch January 6, 2025 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants