Skip to content

Convert _WITHIN config to timedelta#1241

Merged
jwag956 merged 1 commit into
mainfrom
within
Jun 16, 2026
Merged

Convert _WITHIN config to timedelta#1241
jwag956 merged 1 commit into
mainfrom
within

Conversation

@jwag956

@jwag956 jwag956 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator
  • Change all the SECURITY_XX_WITHIN from the internal <#>, (e.g. 2 days) to timedelta.
  • As part of flask-security init - accept the old style and convert to timedelta and issue a deprecation warning.
  • add a utility to convert a timedelta to a string - this is pretty lame - the intent is for most applications to use humanize - which we'll integrate in another PR. This will solve the localization issue (Translation of %(within)s #1153)
  • Pass the string - within - into the change_email_instructions template.

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.66%. Comparing base (6cb6a19) to head (2448b98).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1241   +/-   ##
=======================================
  Coverage   98.65%   98.66%           
=======================================
  Files          43       43           
  Lines        5364     5377   +13     
=======================================
+ Hits         5292     5305   +13     
  Misses         72       72           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Change all the SECURITY_XX_WITHIN from the internal <#>,<period> (e.g. 2 days) to timedelta.
- As part of flask-security init - accept the old style and convert to timedelta and issue a deprecation warning.
- add a utility to convert a timedelta to a string - this is pretty lame - the intent is for most applications
  to use humanize - which we'll integrate in another PR. This will solve the localization issue (#1153)
- Pass the string - within - into the change_email_instructions template.
@jwag956
jwag956 merged commit e880c74 into main Jun 16, 2026
20 checks passed
@jwag956
jwag956 deleted the within branch June 16, 2026 14:12
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.

1 participant