hatchet-sdk 0.43.0__py3-none-any.whl → 0.43.2__py3-none-any.whl

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.

Potentially problematic release.


This version of hatchet-sdk might be problematic. Click here for more details.

hatchet_sdk/hatchet.py CHANGED
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
  import logging
3
- from typing import Any, Callable, Optional, Type, TypeVar, Union
3
+ from typing import Any, Callable, Optional, ParamSpec, Type, TypeVar, Union
4
4
 
5
5
  from pydantic import BaseModel
6
6
  from typing_extensions import deprecated
@@ -35,6 +35,9 @@ from .workflow import (
35
35
  )
36
36
 
37
37
  T = TypeVar("T", bound=BaseModel)
38
+ R = TypeVar("R")
39
+ P = ParamSpec("P")
40
+
38
41
  TWorkflow = TypeVar("TWorkflow", bound=object)
39
42
 
40
43
 
@@ -87,10 +90,10 @@ def step(
87
90
  desired_worker_labels: dict[str, DesiredWorkerLabel] = {},
88
91
  backoff_factor: float | None = None,
89
92
  backoff_max_seconds: int | None = None,
90
- ) -> Callable[..., Any]:
93
+ ) -> Callable[[Callable[P, R]], Callable[P, R]]:
91
94
  parents = parents or []
92
95
 
93
- def inner(func: Callable[[Context], Any]) -> Callable[[Context], Any]:
96
+ def inner(func: Callable[P, R]) -> Callable[P, R]:
94
97
  limits = None
95
98
  if rate_limits:
96
99
  limits = [rate_limit._req for rate_limit in rate_limits or []]
@@ -99,7 +102,6 @@ def step(
99
102
  setattr(func, "_step_parents", parents)
100
103
  setattr(func, "_step_timeout", timeout)
101
104
  setattr(func, "_step_retries", retries)
102
- setattr(func, "_step_rate_limits", retries)
103
105
  setattr(func, "_step_rate_limits", limits)
104
106
  setattr(func, "_step_backoff_factor", backoff_factor)
105
107
  setattr(func, "_step_backoff_max_seconds", backoff_max_seconds)
hatchet_sdk/py.typed ADDED
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hatchet-sdk
3
- Version: 0.43.0
3
+ Version: 0.43.2
4
4
  Summary:
5
5
  Author: Alexander Belanger
6
6
  Author-email: alexander@hatchet.run
@@ -13,16 +13,18 @@ Requires-Dist: aiohttp (>=3.10.5,<4.0.0)
13
13
  Requires-Dist: aiohttp-retry (>=2.8.3,<3.0.0)
14
14
  Requires-Dist: aiostream (>=0.5.2,<0.6.0)
15
15
  Requires-Dist: cel-python (>=0.1.5,<0.2.0)
16
- Requires-Dist: grpcio (>=1.68.1,<2.0.0)
17
- Requires-Dist: grpcio-tools (>=1.68.1,<2.0.0)
16
+ Requires-Dist: grpcio (>=1.64.1,!=1.68.*) ; python_version < "3.13"
17
+ Requires-Dist: grpcio (>=1.69.0) ; python_version >= "3.13"
18
+ Requires-Dist: grpcio-tools (>=1.64.1,!=1.68.*) ; python_version < "3.13"
19
+ Requires-Dist: grpcio-tools (>=1.69.0) ; python_version >= "3.13"
18
20
  Requires-Dist: loguru (>=0.7.2,<0.8.0)
19
21
  Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
20
- Requires-Dist: opentelemetry-api (>=1.27.0,<2.0.0)
21
- Requires-Dist: opentelemetry-distro (>=0.48b0,<0.49)
22
- Requires-Dist: opentelemetry-exporter-otlp (>=1.27.0,<2.0.0)
23
- Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.27.0,<2.0.0)
24
- Requires-Dist: opentelemetry-instrumentation (>=0.48b0,<0.49)
25
- Requires-Dist: opentelemetry-sdk (>=1.27.0,<2.0.0)
22
+ Requires-Dist: opentelemetry-api (>=1.28.0,<2.0.0)
23
+ Requires-Dist: opentelemetry-distro (>=0.49b0)
24
+ Requires-Dist: opentelemetry-exporter-otlp (>=1.28.0,<2.0.0)
25
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.28.0,<2.0.0)
26
+ Requires-Dist: opentelemetry-instrumentation (>=0.49b0)
27
+ Requires-Dist: opentelemetry-sdk (>=1.28.0,<2.0.0)
26
28
  Requires-Dist: prometheus-client (>=0.21.1,<0.22.0)
27
29
  Requires-Dist: protobuf (>=5.29.1,<6.0.0)
28
30
  Requires-Dist: pydantic (>=2.6.3,<3.0.0)
@@ -203,11 +203,12 @@ hatchet_sdk/contracts/workflows_pb2.pyi,sha256=2r5d4DWaR0kwY8jKSzcffTAMMlWrusRXC
203
203
  hatchet_sdk/contracts/workflows_pb2_grpc.py,sha256=AFu0wRpfyCyNVIYZLKian6s5qPnVDCwtuE91JMaMmUI,10522
204
204
  hatchet_sdk/features/cron.py,sha256=4lKMH0MqiN8cHJk2jhF0Ueqs6z5ozwJzlOeSeaWqvO0,10217
205
205
  hatchet_sdk/features/scheduled.py,sha256=YhEbNWl8dWOH61rXVjAyu8iG1BZqpSkD4kgaxkKIHgY,9504
206
- hatchet_sdk/hatchet.py,sha256=UpCDv3q-Mrbwi7tFHS2FonBwwXlbs5kRFfCfx4DJVeI,10027
206
+ hatchet_sdk/hatchet.py,sha256=L6O9cTeZtGqFUxO5H8knXKdiej0iAequ1Wl7vSNO9FY,10027
207
207
  hatchet_sdk/labels.py,sha256=Axfp1yUNowzE9mL8AQA1ADqwOaNmq3QP_45wb1Ed1aI,272
208
208
  hatchet_sdk/loader.py,sha256=ddwQ7BAWYsJ9LEsNxajCkv78hRLUMftVG0vdg5V09iQ,8746
209
209
  hatchet_sdk/logger.py,sha256=5uOr52T4mImSQm1QvWT8HvZFK5WfPNh3Y1cBQZRFgUQ,333
210
210
  hatchet_sdk/metadata.py,sha256=M_Cb-CXRKitzVMQHeaHUtbY28ET__fAbyGX1YKaeN4I,80
211
+ hatchet_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
211
212
  hatchet_sdk/rate_limit.py,sha256=IIzpe65i-518t9kQcZVEykDQ2VY8sOw2F7qlQ4wlAjw,4421
212
213
  hatchet_sdk/semver.py,sha256=PrgBL0TnyXl3p_OK1iSMk9Gpujfh5asQpJ4DHJLCW2k,998
213
214
  hatchet_sdk/token.py,sha256=Ap3jnbaPAL10F2G_D71wj7OpBcvrI3RuE0keqXx1lAE,698
@@ -229,7 +230,7 @@ hatchet_sdk/worker/runner/utils/error_with_traceback.py,sha256=Iih_s8JNqrinXETFJ
229
230
  hatchet_sdk/worker/worker.py,sha256=7UPm3qTzNYSSm9QTNX6zBBMJqVA6nKFeCbAdqLLjUBs,13007
230
231
  hatchet_sdk/workflow.py,sha256=XRj5jcCQSvPQMXxBipf-ZlARua2E8Z9igRzGcQ5alkI,9375
231
232
  hatchet_sdk/workflow_run.py,sha256=BwK5cefvXXvyQ1Ednj_7LeejMwQJqWnvUC_FTBmJNxk,1805
232
- hatchet_sdk-0.43.0.dist-info/METADATA,sha256=KaGqauwS0IcnkdmMDQLHvw8AMIdoXQ1iP_1w4mNnEAI,1566
233
- hatchet_sdk-0.43.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
234
- hatchet_sdk-0.43.0.dist-info/entry_points.txt,sha256=LTtQRABmSGYOxRI68cUVEz5dp9Qb57eqXGic9lU8RMo,1023
235
- hatchet_sdk-0.43.0.dist-info/RECORD,,
233
+ hatchet_sdk-0.43.2.dist-info/METADATA,sha256=4X-r_xOmoJR1IfkCwPuRybgiMjt2Z1l0bkI-6EpMBBk,1736
234
+ hatchet_sdk-0.43.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
235
+ hatchet_sdk-0.43.2.dist-info/entry_points.txt,sha256=LTtQRABmSGYOxRI68cUVEz5dp9Qb57eqXGic9lU8RMo,1023
236
+ hatchet_sdk-0.43.2.dist-info/RECORD,,