Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ dependencies = [
"greenlet>=3.0.3, <=3.1.1",
"gunicorn>=22.0.0; sys_platform != 'win32'",
"hashids>=1.3.1, <2",
# known issue with holidays 0.26.0 and above related to prophet lib #25017
"holidays>=0.25, <0.26",
# holidays>=0.45 required for security fix
"holidays>=0.45, <1",
"humanize",
"isodate",
"jsonpath-ng>=1.6.1, <2",
Expand Down Expand Up @@ -171,7 +171,7 @@ playwright = ["playwright>=1.37.0, <2"]
postgres = ["psycopg2-binary==2.9.6"]
presto = ["pyhive[presto]>=0.6.5"]
trino = ["trino>=0.328.0"]
prophet = ["prophet>=1.1.5, <2"]
prophet = ["prophet>=1.1.6, <2"]
redshift = ["sqlalchemy-redshift>=0.8.1, <0.9"]
risingwave = ["sqlalchemy-risingwave"]
shillelagh = ["shillelagh[all]>=1.2.18, <2"]
Expand Down
5 changes: 1 addition & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,13 @@ greenlet==3.1.1
# via
# apache-superset (pyproject.toml)
# shillelagh
# sqlalchemy
gunicorn==23.0.0
# via apache-superset (pyproject.toml)
h11==0.16.0
# via wsproto
hashids==1.3.1
# via apache-superset (pyproject.toml)
holidays==0.25
holidays==0.82
# via apache-superset (pyproject.toml)
humanize==4.12.3
# via apache-superset (pyproject.toml)
Expand Down Expand Up @@ -199,8 +198,6 @@ jsonschema-specifications==2025.4.1
# openapi-schema-validator
kombu==5.5.3
# via celery
korean-lunar-calendar==0.3.1
# via holidays
limits==5.1.0
# via flask-limiter
mako==1.3.10
Expand Down
9 changes: 2 additions & 7 deletions requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ greenlet==3.1.1
# apache-superset
# gevent
# shillelagh
# sqlalchemy
grpcio==1.71.0
# via
# apache-superset
Expand All @@ -353,7 +352,7 @@ hashids==1.3.1
# via
# -c requirements/base-constraint.txt
# apache-superset
holidays==0.25
holidays==0.82
# via
# -c requirements/base-constraint.txt
# apache-superset
Expand Down Expand Up @@ -415,10 +414,6 @@ kombu==5.5.3
# via
# -c requirements/base-constraint.txt
# celery
korean-lunar-calendar==0.3.1
# via
# -c requirements/base-constraint.txt
# holidays
lazy-object-proxy==1.10.0
# via openapi-spec-validator
limits==5.1.0
Expand Down Expand Up @@ -601,7 +596,7 @@ prompt-toolkit==3.0.51
# via
# -c requirements/base-constraint.txt
# click-repl
prophet==1.1.5
prophet==1.2.0
# via apache-superset
proto-plus==1.25.0
# via
Expand Down
21 changes: 16 additions & 5 deletions tests/unit_tests/utils/date_parser_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,22 @@ def test_datetime_eval() -> None:
expected = datetime(2018, 9, 3, 0, 0, 0)
assert result == expected

result = datetime_eval(
"holiday('Eid al-Fitr', datetime('2000-01-01T00:00:00'), 'SA')"
)
expected = datetime(2000, 1, 8, 0, 0, 0)
assert result == expected
# Saudi Arabia holidays - try both English and Arabic names as the default
# language varies by environment (ar in some envs, en_US in CI)
sa_holiday_test_passed = False
for holiday_name in ["Eid al-Fitr", "عطلة عيد الفطر"]:
try:
result = datetime_eval(
f"holiday('{holiday_name}', datetime('2000-01-01T00:00:00'), 'SA')"
)
expected = datetime(2000, 1, 8, 0, 0, 0)
assert result == expected
sa_holiday_test_passed = True
break
except ValueError:
continue

assert sa_holiday_test_passed

result = datetime_eval(
"holiday('Boxing day', datetime('2018-01-01T00:00:00'), 'UK')"
Expand Down
Loading