diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 05:35:26 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 05:35:26 -0500 |
| commit | f716a9fe6455d39eef01e718aae68dae61c19704 (patch) | |
| tree | 0c52bbae1c242fbc296bd650fcd1167685f81492 /dev-python/jinja2-time/files | |
| parent | 3f9cf298e89cd5037b982abba06091224ee76daf (diff) | |
| download | baldeagleos-repo-f716a9fe6455d39eef01e718aae68dae61c19704.tar.gz baldeagleos-repo-f716a9fe6455d39eef01e718aae68dae61c19704.tar.xz baldeagleos-repo-f716a9fe6455d39eef01e718aae68dae61c19704.zip | |
Adding metadata
Diffstat (limited to 'dev-python/jinja2-time/files')
| -rw-r--r-- | dev-python/jinja2-time/files/jinja2-time-0.2.0-arrow-compat.patch | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/dev-python/jinja2-time/files/jinja2-time-0.2.0-arrow-compat.patch b/dev-python/jinja2-time/files/jinja2-time-0.2.0-arrow-compat.patch deleted file mode 100644 index 04d2993c453f..000000000000 --- a/dev-python/jinja2-time/files/jinja2-time-0.2.0-arrow-compat.patch +++ /dev/null @@ -1,38 +0,0 @@ -From aa4af9af0a0a5111a8ad21bc1b43bbdb586ee8af Mon Sep 17 00:00:00 2001 -From: Vincent Bernat <vincent@bernat.ch> -Date: Sun, 3 Nov 2019 07:48:08 +0100 -Subject: [PATCH] Use shift() instead of replace() to modify dates - -Previously, the `replace()` method from arrow was shifting the date -when the arguments were using the plural form. Since Arrow 0.9.0, this -has been deprecated in favor of a `shift()` method. Arrow 0.14.5 -completely removed the ability for `replace()` to shift dates. This -leads to errors like `AttributeError: unknown attribute: "hours"` when -using plural form. - -This commit replace the use of `replace()` by `shift()` since the -intent is always to shift the current date. ---- - jinja2_time/jinja2_time.py | 6 +++--- - setup.py | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/jinja2_time/jinja2_time.py b/jinja2_time/jinja2_time.py -index ce713cb..717c8a0 100755 ---- a/jinja2_time/jinja2_time.py -+++ b/jinja2_time/jinja2_time.py -@@ -19,11 +19,11 @@ def _datetime(self, timezone, operator, offset, datetime_format): - d = arrow.now(timezone) - - # Parse replace kwargs from offset and include operator -- replace_params = {} -+ shift_params = {} - for param in offset.split(','): - interval, value = param.split('=') -- replace_params[interval.strip()] = float(operator + value.strip()) -- d = d.replace(**replace_params) -+ shift_params[interval.strip()] = float(operator + value.strip()) -+ d = d.shift(**shift_params) - - if datetime_format is None: - datetime_format = self.environment.datetime_format |
