Skip to content

Commit

Permalink
chore: Bump holidays to 0.17.2 (#22354)
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneTorap authored Dec 7, 2022
1 parent 3a4131f commit ff1d29c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_git_sha() -> str:
"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",
Expand Down
4 changes: 2 additions & 2 deletions superset/utils/date_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
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,
Expand Down Expand Up @@ -385,7 +385,7 @@ def eval(self) -> datetime:
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())
Expand Down

0 comments on commit ff1d29c

Please sign in to comment.