EAScheduler 0.2.4__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {eascheduler-0.2.4/src/EAScheduler.egg-info → eascheduler-0.2.6}/PKG-INFO +13 -5
- {eascheduler-0.2.4 → eascheduler-0.2.6}/requirements_setup.txt +2 -2
- {eascheduler-0.2.4 → eascheduler-0.2.6/src/EAScheduler.egg-info}/PKG-INFO +13 -5
- eascheduler-0.2.6/src/EAScheduler.egg-info/requires.txt +4 -0
- eascheduler-0.2.6/src/eascheduler/__version__.py +1 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/builder/helper.py +5 -6
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/helpers/time_replace.py +2 -2
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/job_control/base.py +2 -2
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/prod_operation.py +9 -9
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/prod_time.py +1 -1
- eascheduler-0.2.4/src/EAScheduler.egg-info/requires.txt +0 -4
- eascheduler-0.2.4/src/eascheduler/__version__.py +0 -1
- {eascheduler-0.2.4 → eascheduler-0.2.6}/LICENSE +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/MANIFEST.in +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/setup.cfg +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/setup.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/EAScheduler.egg-info/SOURCES.txt +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/EAScheduler.egg-info/dependency_links.txt +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/EAScheduler.egg-info/top_level.txt +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/builder/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/builder/filters.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/builder/jobs.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/builder/triggers.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/builder/utils.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/const.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/default.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/errors/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/errors/errors.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/errors/handler.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/executor/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/executor/base.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/helpers/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/helpers/dst_param.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/helpers/helpers.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/job_control/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/job_control/job_countdown.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/job_control/job_datetime.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/job_control/job_onetime.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/job_stores/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/job_stores/base.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/job_stores/memory.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/jobs/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/jobs/base.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/jobs/event_handler.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/jobs/job_countdown.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/jobs/job_datetime.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/jobs/job_onetime.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/base.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/prod_filter.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/prod_filter_holiday.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/prod_group.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/prod_interval.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/producers/prod_sun.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/py.typed +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/schedulers/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/schedulers/async_scheduler.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/schedulers/base.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/task_managers/__init__.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/task_managers/base.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/task_managers/parallel.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/src/eascheduler/task_managers/sequential.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/tests/test_const.py +0 -0
- {eascheduler-0.2.4 → eascheduler-0.2.6}/tests/test_default.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: EAScheduler
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Easy async scheduling with a nice interface
|
|
5
5
|
Home-page: https://github.com/spacemanspiff2007/eascheduler
|
|
6
6
|
Author: spaceman_spiff
|
|
@@ -19,9 +19,9 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
|
19
19
|
Requires-Python: >=3.10
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: whenever==0.
|
|
22
|
+
Requires-Dist: whenever==0.8.5
|
|
23
23
|
Requires-Dist: astral==3.2
|
|
24
|
-
Requires-Dist: holidays==0.
|
|
24
|
+
Requires-Dist: holidays==0.74
|
|
25
25
|
Requires-Dist: typing_extensions
|
|
26
26
|
Dynamic: author
|
|
27
27
|
Dynamic: classifier
|
|
@@ -137,8 +137,16 @@ scheduler.at(
|
|
|
137
137
|
````
|
|
138
138
|
|
|
139
139
|
## Changelog
|
|
140
|
-
#### 0.2.
|
|
141
|
-
-
|
|
140
|
+
#### 0.2.6 (2025-06-12)
|
|
141
|
+
- Small fixes
|
|
142
|
+
- Updated dependencies
|
|
143
|
+
|
|
144
|
+
#### 0.2.5 (2025-05-06)
|
|
145
|
+
- Updated to whenever 0.8 which introduces breaking changes
|
|
146
|
+
- Updated dependencies
|
|
147
|
+
|
|
148
|
+
#### 0.2.4 (2025-05-06)
|
|
149
|
+
- Updated to whenever 0.8 which introduces breaking changes
|
|
142
150
|
- Updated dependencies
|
|
143
151
|
|
|
144
152
|
#### 0.2.3 (2025-03-26)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: EAScheduler
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Easy async scheduling with a nice interface
|
|
5
5
|
Home-page: https://github.com/spacemanspiff2007/eascheduler
|
|
6
6
|
Author: spaceman_spiff
|
|
@@ -19,9 +19,9 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
|
19
19
|
Requires-Python: >=3.10
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: whenever==0.
|
|
22
|
+
Requires-Dist: whenever==0.8.5
|
|
23
23
|
Requires-Dist: astral==3.2
|
|
24
|
-
Requires-Dist: holidays==0.
|
|
24
|
+
Requires-Dist: holidays==0.74
|
|
25
25
|
Requires-Dist: typing_extensions
|
|
26
26
|
Dynamic: author
|
|
27
27
|
Dynamic: classifier
|
|
@@ -137,8 +137,16 @@ scheduler.at(
|
|
|
137
137
|
````
|
|
138
138
|
|
|
139
139
|
## Changelog
|
|
140
|
-
#### 0.2.
|
|
141
|
-
-
|
|
140
|
+
#### 0.2.6 (2025-06-12)
|
|
141
|
+
- Small fixes
|
|
142
|
+
- Updated dependencies
|
|
143
|
+
|
|
144
|
+
#### 0.2.5 (2025-05-06)
|
|
145
|
+
- Updated to whenever 0.8 which introduces breaking changes
|
|
146
|
+
- Updated dependencies
|
|
147
|
+
|
|
148
|
+
#### 0.2.4 (2025-05-06)
|
|
149
|
+
- Updated to whenever 0.8 which introduces breaking changes
|
|
142
150
|
- Updated dependencies
|
|
143
151
|
|
|
144
152
|
#### 0.2.3 (2025-03-26)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.2.6'
|
|
@@ -7,7 +7,7 @@ from datetime import time as dt_time
|
|
|
7
7
|
from datetime import timedelta as dt_timedelta
|
|
8
8
|
from typing import Any, Final, Generic, TypeAlias, TypeVar
|
|
9
9
|
|
|
10
|
-
from whenever import Date, Instant, SystemDateTime, Time, TimeDelta
|
|
10
|
+
from whenever import Date, Instant, PlainDateTime, SystemDateTime, Time, TimeDelta
|
|
11
11
|
|
|
12
12
|
from eascheduler.const import get_day_nr, get_month_nr
|
|
13
13
|
from eascheduler.helpers import HINT_CLOCK_BACKWARD, HINT_CLOCK_FORWARD, TimeReplacer, check_dst_handling
|
|
@@ -92,12 +92,11 @@ def get_instant(value: HINT_INSTANT) -> Instant:
|
|
|
92
92
|
return Instant.now()
|
|
93
93
|
case dt_datetime():
|
|
94
94
|
if value.tzinfo is not None:
|
|
95
|
-
return SystemDateTime.from_py_datetime(value).
|
|
95
|
+
return SystemDateTime.from_py_datetime(value).to_instant()
|
|
96
96
|
# We assume it's the system datetime because that's what datetime is normally used for
|
|
97
|
-
return
|
|
98
|
-
value.second, nanosecond=value.microsecond * 1_000).instant()
|
|
97
|
+
return PlainDateTime.from_py_datetime(value).assume_system_tz().to_instant()
|
|
99
98
|
case SystemDateTime():
|
|
100
|
-
return value.
|
|
99
|
+
return value.to_instant()
|
|
101
100
|
case Instant():
|
|
102
101
|
return value
|
|
103
102
|
|
|
@@ -121,7 +120,7 @@ def get_instant(value: HINT_INSTANT) -> Instant:
|
|
|
121
120
|
new = now.replace_time(time, disambiguate='raise')
|
|
122
121
|
if new < now:
|
|
123
122
|
new = new.add(hours=24)
|
|
124
|
-
return new.
|
|
123
|
+
return new.to_instant()
|
|
125
124
|
|
|
126
125
|
raise ValueError()
|
|
127
126
|
|
|
@@ -4,7 +4,7 @@ from enum import Enum
|
|
|
4
4
|
from typing import TYPE_CHECKING, Final, Literal, TypeAlias
|
|
5
5
|
|
|
6
6
|
from typing_extensions import Self
|
|
7
|
-
from whenever import Date,
|
|
7
|
+
from whenever import Date, PlainDateTime, RepeatedTime, SkippedTime, SystemDateTime, Time
|
|
8
8
|
|
|
9
9
|
from eascheduler.helpers.helpers import to_enum
|
|
10
10
|
|
|
@@ -35,7 +35,7 @@ HINT_REPEATED: TypeAlias = RepeatedTimeBehavior | Literal['skip', 'earlier', 'la
|
|
|
35
35
|
|
|
36
36
|
def find_time_after_dst_switch(dt: SystemDateTime | Date, time: Time) -> SystemDateTime:
|
|
37
37
|
# DST changes typically occur on the full minute
|
|
38
|
-
t =
|
|
38
|
+
t = PlainDateTime(dt.year, dt.month, dt.day, time.hour, time.minute)
|
|
39
39
|
|
|
40
40
|
# dst is typically 1 hour, but who knows
|
|
41
41
|
for _ in range(121):
|
|
@@ -44,7 +44,7 @@ class BaseControl:
|
|
|
44
44
|
|
|
45
45
|
if (nr := self._job.next_run) is None:
|
|
46
46
|
return None
|
|
47
|
-
return nr.to_system_tz().
|
|
47
|
+
return nr.to_system_tz().to_plain().py_datetime()
|
|
48
48
|
|
|
49
49
|
@property
|
|
50
50
|
def last_run_datetime(self) -> dt_datetime | None:
|
|
@@ -52,4 +52,4 @@ class BaseControl:
|
|
|
52
52
|
|
|
53
53
|
if (nr := self._job.last_run) is None:
|
|
54
54
|
return None
|
|
55
|
-
return nr.to_system_tz().
|
|
55
|
+
return nr.to_system_tz().to_plain().py_datetime()
|
|
@@ -4,7 +4,7 @@ from random import uniform
|
|
|
4
4
|
from typing import TYPE_CHECKING, Final
|
|
5
5
|
|
|
6
6
|
from typing_extensions import Self, override
|
|
7
|
-
from whenever import
|
|
7
|
+
from whenever import PlainDateTime, SkippedTime, SystemDateTime, Time, TimeDelta
|
|
8
8
|
|
|
9
9
|
from eascheduler.helpers import TimeReplacer, TimeSkippedError, TimeTwiceError
|
|
10
10
|
from eascheduler.producers.base import DateTimeProducerBase, DateTimeProducerOperationBase
|
|
@@ -16,13 +16,13 @@ if TYPE_CHECKING:
|
|
|
16
16
|
|
|
17
17
|
def find_time_after_dst_switch(dt: SystemDateTime, time: Time) -> Instant:
|
|
18
18
|
# DST changes typically occur on the full minute
|
|
19
|
-
local =
|
|
19
|
+
local = PlainDateTime(dt.year, dt.month, dt.day, time.hour, time.minute)
|
|
20
20
|
|
|
21
21
|
while True:
|
|
22
22
|
local = local.add(minutes=1, ignore_dst=True)
|
|
23
23
|
|
|
24
24
|
try:
|
|
25
|
-
return dt.replace_time(local.time(), disambiguate='raise').
|
|
25
|
+
return dt.replace_time(local.time(), disambiguate='raise').to_instant()
|
|
26
26
|
except SkippedTime:
|
|
27
27
|
continue
|
|
28
28
|
|
|
@@ -59,13 +59,13 @@ class EarliestProducerOperation(DateTimeProducerOperationBase):
|
|
|
59
59
|
@override
|
|
60
60
|
def apply_operation(self, next_dt: Instant, dt: Instant) -> Instant:
|
|
61
61
|
try:
|
|
62
|
-
earliest_dt = self.earliest.replace(next_dt.to_system_tz()).
|
|
62
|
+
earliest_dt = self.earliest.replace(next_dt.to_system_tz()).to_instant()
|
|
63
63
|
except TimeSkippedError:
|
|
64
64
|
return next_dt
|
|
65
65
|
except TimeTwiceError as e:
|
|
66
|
-
earliest_dt = e.earlier.
|
|
66
|
+
earliest_dt = e.earlier.to_instant()
|
|
67
67
|
if earliest_dt <= dt:
|
|
68
|
-
earliest_dt = e.later.
|
|
68
|
+
earliest_dt = e.later.to_instant()
|
|
69
69
|
|
|
70
70
|
if next_dt < earliest_dt:
|
|
71
71
|
return earliest_dt
|
|
@@ -87,13 +87,13 @@ class LatestProducerOperation(DateTimeProducerOperationBase):
|
|
|
87
87
|
@override
|
|
88
88
|
def apply_operation(self, next_dt: Instant, dt: Instant) -> Instant:
|
|
89
89
|
try:
|
|
90
|
-
latest_dt = self.latest.replace(next_dt.to_system_tz()).
|
|
90
|
+
latest_dt = self.latest.replace(next_dt.to_system_tz()).to_instant()
|
|
91
91
|
except TimeSkippedError:
|
|
92
92
|
return next_dt
|
|
93
93
|
except TimeTwiceError as e:
|
|
94
|
-
latest_dt = e.earlier.
|
|
94
|
+
latest_dt = e.earlier.to_instant()
|
|
95
95
|
if latest_dt <= dt:
|
|
96
|
-
latest_dt = e.later.
|
|
96
|
+
latest_dt = e.later.to_instant()
|
|
97
97
|
|
|
98
98
|
if next_dt > latest_dt:
|
|
99
99
|
return latest_dt
|
|
@@ -39,7 +39,7 @@ class TimeProducer(DateTimeProducerBase):
|
|
|
39
39
|
local_dts = (e.earlier, e.later)
|
|
40
40
|
|
|
41
41
|
for local_dt in local_dts:
|
|
42
|
-
next_dt = local_dt.
|
|
42
|
+
next_dt = local_dt.to_instant()
|
|
43
43
|
if next_dt > dt and ((f := self._filter) is None or f.allow(local_dt)):
|
|
44
44
|
return next_dt
|
|
45
45
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.2.4'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|