diff --git a/src/prefect/client/orchestration/__init__.py b/src/prefect/client/orchestration/__init__.py index 7919fbea5619..0c934fc348d4 100644 --- a/src/prefect/client/orchestration/__init__.py +++ b/src/prefect/client/orchestration/__init__.py @@ -11,7 +11,7 @@ import certifi import httpcore import httpx -import pendulum + import pydantic from asgi_lifespan import LifespanManager from packaging import version @@ -130,6 +130,7 @@ PREFECT_SERVER_ALLOW_EPHEMERAL_MODE, PREFECT_TESTING_UNIT_TEST_MODE, ) +from prefect.types._datetime import now if TYPE_CHECKING: from prefect.tasks import Task as TaskObject @@ -607,7 +608,7 @@ async def get_runs_in_work_queue( List[FlowRun]: a list of FlowRun objects read from the queue """ if scheduled_before is None: - scheduled_before = pendulum.now("UTC") + scheduled_before = now("UTC") try: response = await self._client.post( diff --git a/src/prefect/client/schemas/schedules.py b/src/prefect/client/schemas/schedules.py index ed23e8ac6968..564f2a2b91f6 100644 --- a/src/prefect/client/schemas/schedules.py +++ b/src/prefect/client/schemas/schedules.py @@ -30,7 +30,7 @@ def is_valid_timezone(v: str) -> bool: Validate that the provided timezone is a valid IANA timezone. Unfortunately this list is slightly different from the list of valid - timezones in pendulum that we use for cron and interval timezone validation. + timezones we use for cron and interval timezone validation. """ from prefect._internal.pytz import HAS_PYTZ @@ -309,7 +309,7 @@ def valid_timezone(cls, v: Optional[str]) -> str: Validate that the provided timezone is a valid IANA timezone. Unfortunately this list is slightly different from the list of valid - timezones in pendulum that we use for cron and interval timezone validation. + timezones we use for cron and interval timezone validation. """ if v is None: return "UTC"