Repository navigation
Bump python from 3.14.6-slim-trixie to 3.14.10-slim-trixie - #306
dependabot[bot] wants to merge 1 commit into
27 errors in 14s
27 tests 0 ✅ 14s ⏱️
1 suites 0 💤
1 files 0 ❌ 27 🔥
Results for commit a54918e.
Annotations
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_api_version (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_markets_all (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_markets_one_mic (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_markets_multiple_mics (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_markets_bad_mic (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_status_all (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_status_one_mic (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_status_multiple_mics (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_status_bad_mic (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_status_cmes_open_close_time_not_same (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_hours_all (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_hours_one_mic (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_hours_bad_mic (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_hours_bad_start_date (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_hours_bad_end_date (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_hours_start_date_after_end_date (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_hours_cmes_open_close_time_not_same (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_holidays_all (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_holidays_all_no_holiday (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_holidays_one_mic (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_holidays_multiple_mics (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_holidays_bad_mic (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_holidays_bad_start_date (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_holidays_bad_end_date (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError
Check failure on line 0 in tests.test_api
github-actions / Test Results
test_holidays_start_date_after_end_date (tests.test_api) with error
junit/test-results.xml [took 0s]
Raw output
failed on setup with "NotImplementedError: implemented by subclasses"
self = <DatetimeArray>
['1969-01-01 00:00:00', '1970-01-01 00:00:00', '1971-01-01 00:00:00',
'1972-01-01 00:00:00', '1973-01...-01 00:00:00', '2199-01-01 00:00:00', '2200-01-01 00:00:00',
'2201-01-01 00:00:00']
Length: 233, dtype: datetime64[us]
offset = <OrthodoxEaster>
def _add_offset(self, offset: BaseOffset) -> Self:
assert not isinstance(offset, Tick)
# For pure-timedelta DateOffset with tz-aware data, add to UTC values
# directly to avoid nonexistent/ambiguous time errors from
# re-localizing wall-time results near DST (GH#28610).
if (
self.tz is not None
and isinstance(offset, RelativeDeltaOffset)
and not offset._use_relativedelta
):
# GH#64806 _add_timedeltalike_scalar casts to the finer of the two
# resolutions, so the result keeps offset._pd_timedelta's unit when
# that is finer than self's.
result = self._add_timedeltalike_scalar(offset._pd_timedelta)
if offset.normalize:
result = result.normalize()
return result
if self.tz is not None:
values = self.tz_localize(None)
else:
values = self
try:
> res_values = offset._add_datetime_ndarray(values._ndarray)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: DateOffset subclass OrthodoxEaster does not have a vectorized implementation
pandas/_libs/tslibs/offsets.pyx:855: NotImplementedError
During handling of the above exception, another exception occurred:
@pytest.fixture(scope="module")
def client():
> with TestClient(app) as client:
^^^^^^^^^^^^^^^
tests/conftest.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:572: in __enter__
portal.call(self.wait_startup)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:347: in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:608: in wait_startup
await receive()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:599: in receive
self.task.result()
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:449: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/anyio/from_thread.py:272: in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/testclient.py:589: in lifespan
await self.app(scope, self.stream_receive.receive, self.stream_send.send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/applications.py:1163: in __call__
await super().__call__(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/applications.py:96: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/errors.py:151: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/gzip.py:63: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/cors.py:79: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/middleware/exceptions.py:49: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py:18: in __call__
await self.app(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:683: in __call__
await self.middleware_stack(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/fastapi/routing.py:2726: in app
await self.lifespan(scope, receive, send)
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/starlette/routing.py:661: in lifespan
async with self.lifespan_context(app) as maybe_state:
^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/contextlib.py:210: in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
trading_calendar/main.py:69: in lifespan
exchanges.load()
trading_calendar/exchanges.py:1124: in load
calendar = Calendar(ecals.get_calendar(mic), exchange.get('country_code'))
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:326: in get_calendar
return cached if cached is not None else self._fabricate(name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/calendar_utils.py:220: in _fabricate
calendar = factory(**kwargs)
^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:325: in __init__
_all_days = pd.date_range(start, end, freq=self.day) # session labels
^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/functools.py:998: in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/exchange_calendars/exchange_calendar.py:755: in day
return CustomBusinessDay(
pandas/_libs/tslibs/offsets.pyx:7125: in pandas._libs.tslibs.offsets.CustomBusinessDay.__init__
???
pandas/_libs/tslibs/offsets.pyx:2517: in pandas._libs.tslibs.offsets.BusinessMixin._init_custom
???
pandas/_libs/tslibs/offsets.pyx:275: in pandas._libs.tslibs.offsets._get_calendar
???
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:1001: in holidays
rule.dates(start, end, return_name=True) for rule in self.rules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:661: in dates
holiday_dates = self._apply_rule(dates)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/tseries/holiday.py:752: in _apply_rule
dates += offset
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:3120: in __iadd__
return self + other
^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arraylike.py:211: in __add__
return self._arith_method(other, operator.add)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/datetimelike.py:879: in _arith_method
result = super()._arith_method(other, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/indexes/base.py:7818: in _arith_method
return super()._arith_method(other, op) # type: ignore[no-untyped-call]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/base.py:1717: in _arith_method
result = ops.arithmetic_op(lvalues, rvalues, op)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/array_ops.py:282: in arithmetic_op
res_values = op(left, right)
^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/ops/common.py:140: in new_method
return method(self, other)
^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.py:1334: in __add__
result = self._add_offset(other)
^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.15/x64/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py:828: in _add_offset
res_values = self.astype("O") + offset
^^^^^^^^^^^^^^^^^^^^^^^^^
pandas/_libs/tslibs/offsets.pyx:605: in pandas._libs.tslibs.offsets.BaseOffset.__radd__
???
pandas/_libs/tslibs/offsets.pyx:582: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:583: in pandas._libs.tslibs.offsets.BaseOffset.__add__
???
pandas/_libs/tslibs/offsets.pyx:594: in pandas._libs.tslibs.offsets.BaseOffset._add_dispatch
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E NotImplementedError: implemented by subclasses
pandas/_libs/tslibs/offsets.pyx:844: NotImplementedError