You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2022/12/07 08:18:05 UTC
[superset] branch master updated: chore: Bump holidays to 0.17.2 (#22354)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new ff1d29c539 chore: Bump holidays to 0.17.2 (#22354)
ff1d29c539 is described below
commit ff1d29c5399c90e5c186dcdf2aea2eb41f34367e
Author: EugeneTorap <ev...@gmail.com>
AuthorDate: Wed Dec 7 11:17:57 2022 +0300
chore: Bump holidays to 0.17.2 (#22354)
---
requirements/base.txt | 2 +-
setup.py | 2 +-
superset/utils/date_parser.py | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/requirements/base.txt b/requirements/base.txt
index 42742cd2c3..3f494c6b9e 100644
--- a/requirements/base.txt
+++ b/requirements/base.txt
@@ -114,7 +114,7 @@ hashids==1.3.1
# via apache-superset
hijri-converter==2.2.4
# via holidays
-holidays==0.16.0
+holidays==0.17.2
# via apache-superset
humanize==3.11.0
# via apache-superset
diff --git a/setup.py b/setup.py
index 1ccdebbaea..ac6f53387a 100644
--- a/setup.py
+++ b/setup.py
@@ -94,7 +94,7 @@ setup(
"graphlib-backport",
"gunicorn>=20.1.0",
"hashids>=1.3.1, <2",
- "holidays>=0.16.0, <0.17",
+ "holidays>=0.17.2, <0.18",
"humanize",
"isodate",
"markdown>=3.0",
diff --git a/superset/utils/date_parser.py b/superset/utils/date_parser.py
index f0a525570a..00e6c7a2b4 100644
--- a/superset/utils/date_parser.py
+++ b/superset/utils/date_parser.py
@@ -26,7 +26,7 @@ import parsedatetime
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta
from flask_babel import lazy_gettext as _
-from holidays import CountryHoliday
+from holidays import country_holidays
from pyparsing import (
CaselessKeyword,
Forward,
@@ -385,7 +385,7 @@ class EvalHolidayFunc: # pylint: disable=too-few-public-methods
holiday_year = dttm.year if dttm else parse_human_datetime("today").year
country = country.eval() if country else "US"
- holiday_lookup = CountryHoliday(country, years=[holiday_year], observed=False)
+ holiday_lookup = country_holidays(country, years=[holiday_year], observed=False)
searched_result = holiday_lookup.get_named(holiday)
if len(searched_result) == 1:
return dttm_from_timetuple(searched_result[0].timetuple())