Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vendor croniter #27045

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"airflow",
"azure",
"coloredlogs",
"croniter",
"dask",
"databricks",
"databricks_api",
Expand Down
1 change: 1 addition & 0 deletions python_modules/dagster/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include LICENSE
include COPYING
include dagster/py.typed
include dagster/_grpc/__generated__/api_pb2.pyi
include dagster/_vendored/croniter/LICENSE
include dagster/_vendored/dateutil/LICENSE
exclude python_modules/dagster/dagster/_core/types/ruff.toml
recursive-include dagster *.md
Expand Down
3 changes: 1 addition & 2 deletions python_modules/dagster/dagster/_utils/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
from collections.abc import Iterator, Sequence
from typing import Optional, Union

from croniter import croniter as _croniter

import dagster._check as check
from dagster._core.definitions.partition import ScheduleType
from dagster._time import get_timezone
from dagster._vendored.croniter import croniter as _croniter
from dagster._vendored.dateutil.relativedelta import relativedelta
from dagster._vendored.dateutil.tz import datetime_ambiguous, datetime_exists

Expand Down
1 change: 1 addition & 0 deletions python_modules/dagster/dagster/_vendored/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ A package could be a good candidate for vendoring if it is relatively small and
Currently vendored packages:

- dateutil is vendored at the 2.9.0post0 release: https://pypi.org/project/python-dateutil/2.9.0.post0/ due to being frequently imported from two different pypi packages, https://pypi.org/project/python-dateutil/ and https://pypi.org/project/py-dateutil/, sometimes simultaneously (including in the default AWS EMR python environment as of June 2024)
- croniter is vendored at the 6.0.0 release: https://pypi.org/project/croniter/6.0.0/ due to the author planning to remove it from PyPI.

To vendor a package:

Expand Down
7 changes: 7 additions & 0 deletions python_modules/dagster/dagster/_vendored/croniter/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (C) 2010-2012 Matsumoto Taichi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 changes: 25 additions & 0 deletions python_modules/dagster/dagster/_vendored/croniter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import

from . import croniter as cron_m
from .croniter import (
DAY_FIELD,
HOUR_FIELD,
MINUTE_FIELD,
MONTH_FIELD,
OVERFLOW32B_MODE,
SECOND_FIELD,
UTC_DT,
YEAR_FIELD,
CroniterBadCronError,
CroniterBadDateError,
CroniterBadTypeRangeError,
CroniterError,
CroniterNotAlphaError,
CroniterUnsupportedSyntaxError,
croniter,
croniter_range,
datetime_to_timestamp,
)

croniter.__name__ # make flake8 happy
Loading
Loading