chore: Bump holidays to 0.17.2 (#22354)
This commit is contained in:
parent
3a4131ffc7
commit
ff1d29c539
|
|
@ -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
|
||||
|
|
|
|||
2
setup.py
2
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",
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in New Issue