prefect-client 3.4.4.dev2__py3-none-any.whl → 3.4.5.dev2__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.
prefect/_build_info.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # Generated by versioningit
2
- __version__ = "3.4.4.dev2"
3
- __build_date__ = "2025-05-29 08:09:07.211879+00:00"
4
- __git_commit__ = "18563e53e1a449088b95da7ee4878e8ff123cccb"
2
+ __version__ = "3.4.5.dev2"
3
+ __build_date__ = "2025-06-03 08:09:38.302110+00:00"
4
+ __git_commit__ = "b7df9a27ddd37edda11b2406cf4506890f0de598"
5
5
  __dirty__ = False
@@ -402,6 +402,18 @@ def validate_compressionlib(value: str) -> str:
402
402
 
403
403
 
404
404
  # TODO: if we use this elsewhere we can change the error message to be more generic
405
+ @overload
406
+ def list_length_50_or_less(v: int) -> int: ...
407
+
408
+
409
+ @overload
410
+ def list_length_50_or_less(v: float) -> float: ...
411
+
412
+
413
+ @overload
414
+ def list_length_50_or_less(v: list[int]) -> list[int]: ...
415
+
416
+
405
417
  @overload
406
418
  def list_length_50_or_less(v: list[float]) -> list[float]: ...
407
419
 
@@ -410,7 +422,9 @@ def list_length_50_or_less(v: list[float]) -> list[float]: ...
410
422
  def list_length_50_or_less(v: None) -> None: ...
411
423
 
412
424
 
413
- def list_length_50_or_less(v: Optional[list[float]]) -> Optional[list[float]]:
425
+ def list_length_50_or_less(
426
+ v: Optional[int | float | list[int] | list[float]],
427
+ ) -> Optional[int | float | list[int] | list[float]]:
414
428
  if isinstance(v, list) and (len(v) > 50):
415
429
  raise ValueError("Can not configure more than 50 retry delays per task.")
416
430
  return v
@@ -698,7 +698,7 @@ class TaskRunPolicy(PrefectBaseModel):
698
698
  deprecated=True,
699
699
  )
700
700
  retries: Optional[int] = Field(default=None, description="The number of retries.")
701
- retry_delay: Union[None, int, list[int]] = Field(
701
+ retry_delay: Union[None, int, float, list[int], list[float]] = Field(
702
702
  default=None,
703
703
  description="A delay time or list of delay times between retries, in seconds.",
704
704
  )
@@ -728,8 +728,8 @@ class TaskRunPolicy(PrefectBaseModel):
728
728
  @field_validator("retry_delay")
729
729
  @classmethod
730
730
  def validate_configured_retry_delays(
731
- cls, v: Optional[list[float]]
732
- ) -> Optional[list[float]]:
731
+ cls, v: Optional[int | float | list[int] | list[float]]
732
+ ) -> Optional[int | float | list[int] | list[float]]:
733
733
  return list_length_50_or_less(v)
734
734
 
735
735
  @field_validator("retry_jitter_factor")
@@ -63,6 +63,11 @@ class TasksSettings(PrefectBaseSettings):
63
63
  description="If `True`, sets the default cache policy on all tasks to `NO_CACHE`.",
64
64
  )
65
65
 
66
+ disable_caching: bool = Field(
67
+ default=False,
68
+ description="If `True`, disables caching on all tasks regardless of cache policy.",
69
+ )
70
+
66
71
  default_retries: int = Field(
67
72
  default=0,
68
73
  ge=0,
prefect/tasks.py CHANGED
@@ -466,6 +466,10 @@ class Task(Generic[P, R]):
466
466
  ):
467
467
  persist_result = True
468
468
 
469
+ # Check for global cache disable setting
470
+ if settings.tasks.disable_caching:
471
+ cache_policy = NO_CACHE
472
+
469
473
  if persist_result is False:
470
474
  self.cache_policy = None if cache_policy is None else NO_CACHE
471
475
  if cache_policy and cache_policy is not NotSet and cache_policy != NO_CACHE:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prefect-client
3
- Version: 3.4.4.dev2
3
+ Version: 3.4.5.dev2
4
4
  Summary: Workflow orchestration and management.
5
5
  Project-URL: Changelog, https://github.com/PrefectHQ/prefect/releases
6
6
  Project-URL: Documentation, https://docs.prefect.io
@@ -1,7 +1,7 @@
1
1
  prefect/.prefectignore,sha256=awSprvKT0vI8a64mEOLrMxhxqcO-b0ERQeYpA2rNKVQ,390
2
2
  prefect/__init__.py,sha256=iCdcC5ZmeewikCdnPEP6YBAjPNV5dvfxpYCTpw30Hkw,3685
3
3
  prefect/__main__.py,sha256=WFjw3kaYJY6pOTA7WDOgqjsz8zUEUZHCcj3P5wyVa-g,66
4
- prefect/_build_info.py,sha256=qgR5KnmN2FhNcIKIM-Fx1Wlh02IKIvWZNqiFwP1eVsg,185
4
+ prefect/_build_info.py,sha256=9xE-pLfsiawfK73a0FMF5AUPjrZWfEwTt5OfnGrZbYY,185
5
5
  prefect/_result_records.py,sha256=S6QmsODkehGVSzbMm6ig022PYbI6gNKz671p_8kBYx4,7789
6
6
  prefect/_versioning.py,sha256=YqR5cxXrY4P6LM1Pmhd8iMo7v_G2KJpGNdsf4EvDFQ0,14132
7
7
  prefect/_waiters.py,sha256=Ia2ITaXdHzevtyWIgJoOg95lrEXQqNEOquHvw3T33UQ,9026
@@ -28,7 +28,7 @@ prefect/task_engine.py,sha256=MIHEpg10imcltIRoUKjBnPKf9XuW_lh1gf5FGos_g3E,62819
28
28
  prefect/task_runners.py,sha256=ptgE5wuXg_IVHM0j7d6l7ELAVg3SXSy4vggnoHRF8dA,17040
29
29
  prefect/task_runs.py,sha256=7LIzfo3fondCyEUpU05sYFN5IfpZigBDXrhG5yc-8t0,9039
30
30
  prefect/task_worker.py,sha256=RifZ3bOl6ppoYPiOAd4TQp2_GEw9eDQoW483rq1q52Q,20805
31
- prefect/tasks.py,sha256=s8z5k_3KUC0FXzE10-VWH17Uc36a1GKbMOn3jYGbbjk,74954
31
+ prefect/tasks.py,sha256=f63tjtkXiZEiV7LUVMs5LByXDb1gLeT3UYPO6VgDzZA,75083
32
32
  prefect/transactions.py,sha256=uIoPNudzJzH6NrMJhrgr5lyh6JxOJQqT1GvrXt69yNw,26068
33
33
  prefect/variables.py,sha256=dCK3vX7TbkqXZhnNT_v7rcGh3ISRqoR6pJVLpoll3Js,8342
34
34
  prefect/_experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -68,7 +68,7 @@ prefect/_internal/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
68
68
  prefect/_internal/schemas/bases.py,sha256=wYBIa5f5BwiKid7Rwp90gqxs7mt4qGBURdtv5dgWJxk,4583
69
69
  prefect/_internal/schemas/fields.py,sha256=m4LrFNz8rA9uBhMk9VyQT6FIXmV_EVAW92hdXeSvHbY,837
70
70
  prefect/_internal/schemas/serializers.py,sha256=G_RGHfObjisUiRvd29p-zc6W4bwt5rE1OdR6TXNrRhQ,825
71
- prefect/_internal/schemas/validators.py,sha256=bOtuOYHWfRo-i6zqkE-wvCMXQ3Yww-itj86QLp3yu3Y,16681
71
+ prefect/_internal/schemas/validators.py,sha256=h5LL6WuXf4rMmLHsYFflmJBlwqi5c7y0tYibMJzJANM,16933
72
72
  prefect/_vendor/croniter/__init__.py,sha256=NUFzdbyPcTQhIOFtzmFM0nbClAvBbKh2mlnTBa6NfHU,523
73
73
  prefect/_vendor/croniter/croniter.py,sha256=eJ2HzStNAYV-vNiLOgDXl4sYWWHOsSA0dgwbkQoguhY,53009
74
74
  prefect/blocks/__init__.py,sha256=D0hB72qMfgqnBB2EMZRxUxlX9yLfkab5zDChOwJZmkY,220
@@ -116,7 +116,7 @@ prefect/client/orchestration/_work_pools/client.py,sha256=s1DfUQQBgB2sLiVVPhLNTl
116
116
  prefect/client/schemas/__init__.py,sha256=InZcDzdeWA2oaV0TlyvoMcyLcbi_aaqU1U9D6Gx-eoU,2747
117
117
  prefect/client/schemas/actions.py,sha256=E46Mdq7vAq8hhYmMj6zqUF20uAPXZricViZcIYmgEf0,32443
118
118
  prefect/client/schemas/filters.py,sha256=qa--NNZduuSOcL1xw-YMd4FVIKMrDnBwPPY4m5Di0GA,35963
119
- prefect/client/schemas/objects.py,sha256=e5CMS6FhuYqTmxXK1U80eH5zEC0YkZ_vS_aJdr0VA5o,57912
119
+ prefect/client/schemas/objects.py,sha256=6rR9ccLJ4f1Hw0J8ywzgX2L3FRw8--XCQX9blBrE7R8,57984
120
120
  prefect/client/schemas/responses.py,sha256=Zdcx7jlIaluEa2uYIOE5mK1HsJvWPErRAcaWM20oY_I,17336
121
121
  prefect/client/schemas/schedules.py,sha256=sxLFk0SmFY7X1Y9R9HyGDqOS3U5NINBWTciUU7vTTic,14836
122
122
  prefect/client/schemas/sorting.py,sha256=L-2Mx-igZPtsUoRUguTcG3nIEstMEMPD97NwPM2Ox5s,2579
@@ -257,7 +257,7 @@ prefect/settings/models/logging.py,sha256=Sj9GDNr5QMFaP6CN0WJyfpwhpOk4p1yhv45dyQ
257
257
  prefect/settings/models/results.py,sha256=VWFplQSSJyc0LXnziw1H5b3N_PDS32QBe_q2MWwYni0,1484
258
258
  prefect/settings/models/root.py,sha256=HpXt_I6T_kJw6QAxez4pCZl8p058etihzJbBNRylN3c,16767
259
259
  prefect/settings/models/runner.py,sha256=rD8OmNLwILmqnGe9YkM1dWKsulx3clYm4LI5N9vD5yM,1991
260
- prefect/settings/models/tasks.py,sha256=Rj3Tl8S04swCZIWgBCdn8sHct0B2IVgfPmM370Muj3E,3672
260
+ prefect/settings/models/tasks.py,sha256=Ky7SpSmm7Vamlf6qPFz2lIk72-5mSwzm9Dz1aVfYhV0,3829
261
261
  prefect/settings/models/testing.py,sha256=j9YH_WkB14iEzOjUtTmvY978qRSbgCypFSEi_cOs8no,1820
262
262
  prefect/settings/models/worker.py,sha256=zeDU71aR4CEvEOKyH-1jgEyol8XYe29PExjIC6a8Wv0,1378
263
263
  prefect/settings/models/server/__init__.py,sha256=KJmffmlHb8GYnClaeYcerae-IaeNsNMucKKRRS_zG9Q,33
@@ -322,7 +322,7 @@ prefect/workers/cloud.py,sha256=dPvG1jDGD5HSH7aM2utwtk6RaJ9qg13XjkA0lAIgQmY,287
322
322
  prefect/workers/process.py,sha256=Yi5D0U5AQ51wHT86GdwtImXSefe0gJf3LGq4r4z9zwM,11090
323
323
  prefect/workers/server.py,sha256=2pmVeJZiVbEK02SO6BEZaBIvHMsn6G8LzjW8BXyiTtk,1952
324
324
  prefect/workers/utilities.py,sha256=VfPfAlGtTuDj0-Kb8WlMgAuOfgXCdrGAnKMapPSBrwc,2483
325
- prefect_client-3.4.4.dev2.dist-info/METADATA,sha256=WjCyX6tobLY3SgXYMh7L_bTI3Xpifpc_3uoCT1s-nvQ,7472
326
- prefect_client-3.4.4.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
327
- prefect_client-3.4.4.dev2.dist-info/licenses/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
328
- prefect_client-3.4.4.dev2.dist-info/RECORD,,
325
+ prefect_client-3.4.5.dev2.dist-info/METADATA,sha256=8WuQo6XipDjXTtieMPY-hjxp4Bq63yKWLwuChMT-qlQ,7472
326
+ prefect_client-3.4.5.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
327
+ prefect_client-3.4.5.dev2.dist-info/licenses/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
328
+ prefect_client-3.4.5.dev2.dist-info/RECORD,,