prefect-client 3.1.3__py3-none-any.whl → 3.1.5__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/_version.py +3 -3
- prefect/client/cloud.py +1 -1
- prefect/client/orchestration.py +32 -12
- prefect/client/schemas/actions.py +17 -12
- prefect/client/schemas/filters.py +5 -0
- prefect/client/schemas/objects.py +5 -31
- prefect/client/schemas/responses.py +3 -0
- prefect/concurrency/services.py +3 -0
- prefect/deployments/runner.py +2 -1
- prefect/flow_engine.py +707 -130
- prefect/settings/sources.py +9 -2
- prefect/types/__init__.py +40 -3
- prefect/workers/base.py +3 -2
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.5.dist-info}/METADATA +2 -4
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.5.dist-info}/RECORD +18 -18
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.5.dist-info}/WHEEL +1 -1
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.5.dist-info}/LICENSE +0 -0
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.5.dist-info}/top_level.txt +0 -0
prefect/settings/sources.py
CHANGED
@@ -121,7 +121,7 @@ class ProfileSettingsTomlLoader(PydanticBaseSettingsSource):
|
|
121
121
|
"""Helper method to load the profile settings from the profiles.toml file"""
|
122
122
|
|
123
123
|
if not self.profiles_path.exists():
|
124
|
-
return
|
124
|
+
return self._get_default_profile()
|
125
125
|
|
126
126
|
try:
|
127
127
|
all_profile_data = toml.load(self.profiles_path)
|
@@ -146,9 +146,16 @@ class ProfileSettingsTomlLoader(PydanticBaseSettingsSource):
|
|
146
146
|
profiles_data = all_profile_data.get("profiles", {})
|
147
147
|
|
148
148
|
if not active_profile or active_profile not in profiles_data:
|
149
|
-
return
|
149
|
+
return self._get_default_profile()
|
150
150
|
return profiles_data[active_profile]
|
151
151
|
|
152
|
+
def _get_default_profile(self) -> Dict[str, Any]:
|
153
|
+
"""Helper method to get the default profile"""
|
154
|
+
default_profile_data = toml.load(DEFAULT_PROFILES_PATH)
|
155
|
+
default_profile = default_profile_data.get("active", "ephemeral")
|
156
|
+
assert isinstance(default_profile, str)
|
157
|
+
return default_profile_data.get("profiles", {}).get(default_profile, {})
|
158
|
+
|
152
159
|
def get_field_value(
|
153
160
|
self, field: FieldInfo, field_name: str
|
154
161
|
) -> Tuple[Any, str, bool]:
|
prefect/types/__init__.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
from functools import partial
|
2
|
-
from typing import Annotated, Any, Dict, List, Set, TypeVar, Union
|
3
|
-
from typing_extensions import Literal
|
2
|
+
from typing import Annotated, Any, Dict, List, Optional, Set, TypeVar, Union
|
3
|
+
from typing_extensions import Literal, TypeAlias
|
4
4
|
import orjson
|
5
5
|
import pydantic
|
6
6
|
|
@@ -86,10 +86,26 @@ StrictVariableValue = Annotated[VariableValue, BeforeValidator(check_variable_va
|
|
86
86
|
|
87
87
|
LaxUrl = Annotated[str, BeforeValidator(lambda x: str(x).strip())]
|
88
88
|
|
89
|
-
|
90
89
|
StatusCode = Annotated[int, Field(ge=100, le=599)]
|
91
90
|
|
92
91
|
|
92
|
+
def cast_none_to_empty_dict(value: Any) -> dict[str, Any]:
|
93
|
+
if value is None:
|
94
|
+
return {}
|
95
|
+
return value
|
96
|
+
|
97
|
+
|
98
|
+
KeyValueLabels = Annotated[
|
99
|
+
dict[str, Union[StrictBool, StrictInt, StrictFloat, str]],
|
100
|
+
BeforeValidator(cast_none_to_empty_dict),
|
101
|
+
]
|
102
|
+
|
103
|
+
|
104
|
+
ListOfNonEmptyStrings = Annotated[
|
105
|
+
List[str], BeforeValidator(lambda x: [s for s in x if s.strip()])
|
106
|
+
]
|
107
|
+
|
108
|
+
|
93
109
|
class SecretDict(pydantic.Secret[Dict[str, Any]]):
|
94
110
|
pass
|
95
111
|
|
@@ -132,11 +148,32 @@ LogLevel = Annotated[
|
|
132
148
|
BeforeValidator(lambda x: x.upper()),
|
133
149
|
]
|
134
150
|
|
151
|
+
|
152
|
+
KeyValueLabels: TypeAlias = dict[str, Union[StrictBool, StrictInt, StrictFloat, str]]
|
153
|
+
|
154
|
+
|
155
|
+
def convert_none_to_empty_dict(v: Optional[KeyValueLabels]) -> KeyValueLabels:
|
156
|
+
return v or {}
|
157
|
+
|
158
|
+
|
159
|
+
KeyValueLabelsField = Annotated[
|
160
|
+
KeyValueLabels,
|
161
|
+
Field(
|
162
|
+
default_factory=dict,
|
163
|
+
description="A dictionary of key-value labels. Values can be strings, numbers, or booleans.",
|
164
|
+
examples=[{"key": "value1", "key2": 42}],
|
165
|
+
),
|
166
|
+
BeforeValidator(convert_none_to_empty_dict),
|
167
|
+
]
|
168
|
+
|
169
|
+
|
135
170
|
__all__ = [
|
136
171
|
"ClientRetryExtraCodes",
|
137
172
|
"LogLevel",
|
173
|
+
"KeyValueLabelsField",
|
138
174
|
"NonNegativeInteger",
|
139
175
|
"PositiveInteger",
|
176
|
+
"ListOfNonEmptyStrings",
|
140
177
|
"NonNegativeFloat",
|
141
178
|
"Name",
|
142
179
|
"NameOrEmpty",
|
prefect/workers/base.py
CHANGED
@@ -637,8 +637,9 @@ class BaseWorker(abc.ABC):
|
|
637
637
|
await self._exit_stack.enter_async_context(self._runs_task_group)
|
638
638
|
|
639
639
|
if self._client.server_type == ServerType.CLOUD:
|
640
|
-
self._cloud_client =
|
641
|
-
|
640
|
+
self._cloud_client = await self._exit_stack.enter_async_context(
|
641
|
+
get_cloud_client()
|
642
|
+
)
|
642
643
|
|
643
644
|
self.is_setup = True
|
644
645
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: prefect-client
|
3
|
-
Version: 3.1.
|
3
|
+
Version: 3.1.5
|
4
4
|
Summary: Workflow orchestration and management.
|
5
5
|
Home-page: https://www.prefect.io
|
6
6
|
Author: Prefect Technologies, Inc.
|
@@ -45,7 +45,7 @@ Requires-Dist: packaging<24.3,>=21.3
|
|
45
45
|
Requires-Dist: pathspec>=0.8.0
|
46
46
|
Requires-Dist: pendulum<4,>=3.0.0
|
47
47
|
Requires-Dist: prometheus-client>=0.20.0
|
48
|
-
Requires-Dist: pydantic
|
48
|
+
Requires-Dist: pydantic!=2.10.0,<3.0.0,>=2.7
|
49
49
|
Requires-Dist: pydantic-core<3.0.0,>=2.12.0
|
50
50
|
Requires-Dist: pydantic-extra-types<3.0.0,>=2.8.2
|
51
51
|
Requires-Dist: pydantic-settings>2.2.1
|
@@ -79,8 +79,6 @@ Requires-Dist: apprise<2.0.0,>=1.1.0; extra == "notifications"
|
|
79
79
|
<br>
|
80
80
|
<a href="https://prefect.io/slack" alt="Slack">
|
81
81
|
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack" /></a>
|
82
|
-
<a href="https://discourse.prefect.io/" alt="Discourse">
|
83
|
-
<img src="https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse" /></a>
|
84
82
|
<a href="https://www.youtube.com/c/PrefectIO/" alt="YouTube">
|
85
83
|
<img src="https://img.shields.io/badge/youtube-watch_videos-red.svg?color=0052FF&labelColor=090422&logo=youtube" /></a>
|
86
84
|
</p>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
prefect/.prefectignore,sha256=awSprvKT0vI8a64mEOLrMxhxqcO-b0ERQeYpA2rNKVQ,390
|
2
2
|
prefect/__init__.py,sha256=UZPTpdap8ECK1zLoggfeOtZGkKcf6um1-lMb-nn4o5I,3450
|
3
|
-
prefect/_version.py,sha256=
|
3
|
+
prefect/_version.py,sha256=5mYh3uCFwp5P6jtVSVDvFheca98P3M20-Gp_eWmP3I8,496
|
4
4
|
prefect/agent.py,sha256=BOVVY5z-vUIQ2u8LwMTXDaNys2fjOZSS5YGDwJmTQjI,230
|
5
5
|
prefect/artifacts.py,sha256=dsxFWmdg2r9zbHM3KgKOR5YbJ29_dXUYF9kipJpbxkE,13009
|
6
6
|
prefect/automations.py,sha256=NlQ62GPJzy-gnWQqX7c6CQJKw7p60WLGDAFcy82vtg4,5613
|
@@ -9,7 +9,7 @@ prefect/context.py,sha256=sNZwFecVO4-OmatU_OTNb9HoxG5rtwNIzP_NNGsmbYo,21496
|
|
9
9
|
prefect/engine.py,sha256=BpmDbe6miZcTl1vRkxfCPYcWSXADLigGPCagFwucMz0,1976
|
10
10
|
prefect/exceptions.py,sha256=KR8Vg7GetiBmwU5rvV5imlpg410Mv6RqSyk_gEojWAI,11884
|
11
11
|
prefect/filesystems.py,sha256=CxwMmKY8LBUed_9IqE2jUqxVCWhXa1r2fjKgLbIC2Vg,17893
|
12
|
-
prefect/flow_engine.py,sha256=
|
12
|
+
prefect/flow_engine.py,sha256=t5mz_OXPOhEj31JxK8UIk8UqHFPnFDfyTZUqWzvxDE8,53381
|
13
13
|
prefect/flow_runs.py,sha256=EaXRIQTOnwnA0fO7_EjwafFRmS57K_CRy0Xsz3JDIhc,16070
|
14
14
|
prefect/flows.py,sha256=PUEPpQx5pjXMVfnrPbIeAvWUdEdeaNPO4DXj7tgxGcA,90185
|
15
15
|
prefect/futures.py,sha256=DlZvdccKtwQKuDUFrZ4zcINeO9C1chLiNOwjE5gTgCk,16356
|
@@ -67,17 +67,17 @@ prefect/blocks/system.py,sha256=OacB-LLXaNiLY49bPx7aAjmvdEdBxNoaOdzsCUcDr2c,4563
|
|
67
67
|
prefect/blocks/webhook.py,sha256=F0u1WSO17Gda8qwr9gYaA84Nfc8Qkic6HhhJMYXRzug,2496
|
68
68
|
prefect/client/__init__.py,sha256=fFtCXsGIsBCsAMFKlUPgRVUoIeqq_CsGtFE1knhbHlU,593
|
69
69
|
prefect/client/base.py,sha256=2K8UiWzorZNNM4c8c-OiGeZ5i5ViUfZ_Q31oPobbOO0,24956
|
70
|
-
prefect/client/cloud.py,sha256=
|
70
|
+
prefect/client/cloud.py,sha256=BE3zPZgzoLT6EykvKQIit1OQCOXx75Z3eg2Yg0AFKo0,6840
|
71
71
|
prefect/client/collections.py,sha256=u-96saqu0RALAazRI0YaZCJahnuafMppY21KN6ggx80,1059
|
72
72
|
prefect/client/constants.py,sha256=Z_GG8KF70vbbXxpJuqW5pLnwzujTVeHbcYYRikNmGH0,29
|
73
|
-
prefect/client/orchestration.py,sha256=
|
73
|
+
prefect/client/orchestration.py,sha256=9kQT0RKO8ICZApkbRaQf3cMdza-jgMns3-Zm795jsPM,152495
|
74
74
|
prefect/client/subscriptions.py,sha256=oqF2MJsgN3psJg-MePfvwMtEWjromfP9StWF00xc1eg,3403
|
75
75
|
prefect/client/utilities.py,sha256=89fmza0cRMOayxgXRdO51TKb11TczJ0ByOZmcZVrt44,3286
|
76
76
|
prefect/client/schemas/__init__.py,sha256=KlyqFV-hMulMkNstBn_0ijoHoIwJZaBj6B1r07UmgvE,607
|
77
|
-
prefect/client/schemas/actions.py,sha256=
|
78
|
-
prefect/client/schemas/filters.py,sha256=
|
79
|
-
prefect/client/schemas/objects.py,sha256=
|
80
|
-
prefect/client/schemas/responses.py,sha256=
|
77
|
+
prefect/client/schemas/actions.py,sha256=C-jHaouoYylI89MZuQN10KkoMap0_xfnvqYgodfNNdE,28878
|
78
|
+
prefect/client/schemas/filters.py,sha256=gAJLHGaxlsCT5YWRkEMYWK9G3yP4ffddTB40OK2Ldt8,36471
|
79
|
+
prefect/client/schemas/objects.py,sha256=XiEuYAsn5eXr5UA0kw5JinFPJpOCDBx_7bFvdwaAkos,56168
|
80
|
+
prefect/client/schemas/responses.py,sha256=QY4okFTcdqzivEh4L84_-_OLI0uUNNpN6wZ4p-xRIvg,15577
|
81
81
|
prefect/client/schemas/schedules.py,sha256=8rpqjOYtknu2-1n5_WD4cOplgu93P3mCyX86B22LfL4,13070
|
82
82
|
prefect/client/schemas/sorting.py,sha256=L-2Mx-igZPtsUoRUguTcG3nIEstMEMPD97NwPM2Ox5s,2579
|
83
83
|
prefect/client/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -86,7 +86,7 @@ prefect/concurrency/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
86
86
|
prefect/concurrency/asyncio.py,sha256=34evG-u6sZn9X78jUCSOAOE3TvNHJ2Fum4XLkSHixnU,7738
|
87
87
|
prefect/concurrency/context.py,sha256=hXt_QDXvj6hidP63k7AnoOUNI1-ZKd6EIrTuopQyzHU,942
|
88
88
|
prefect/concurrency/events.py,sha256=EjZwUbbtP-N-u8rk8nbyMIi-BnkshoLkHRYh913jUWU,1810
|
89
|
-
prefect/concurrency/services.py,sha256=
|
89
|
+
prefect/concurrency/services.py,sha256=LHOou_G7X87DE-e0lmPhVAXwrUcV_cM6VZpOWKikOPk,3999
|
90
90
|
prefect/concurrency/sync.py,sha256=nOAFmjptabztKtkJ_uAWgzTrb21vrkTwPulFkiIo8u4,4337
|
91
91
|
prefect/concurrency/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
92
|
prefect/concurrency/v1/asyncio.py,sha256=ROro7lFAbyr2oWUAXYUzN-IpTkKM-DHOWvcfpr7-8AA,4883
|
@@ -98,7 +98,7 @@ prefect/deployments/__init__.py,sha256=_wb7NxDKhq11z9MjYsPckmT3o6MRhGLRgCV9TmvYt
|
|
98
98
|
prefect/deployments/base.py,sha256=bwlkSN6pWC2fLj4-48AtPY1jTmVB0GADdyK9ToFLAiE,16534
|
99
99
|
prefect/deployments/deployments.py,sha256=EvC9qBdvJRc8CHJqRjFTqtzx75SE8bpZOl5C-2eULyA,109
|
100
100
|
prefect/deployments/flow_runs.py,sha256=Pz6KYDKNPkgOnh4M2VhkiPhNtDQfuKBmqSjmYGaucbs,6812
|
101
|
-
prefect/deployments/runner.py,sha256
|
101
|
+
prefect/deployments/runner.py,sha256=-BOrB2yq4bnHkrg3t7AF0LjuVgo9uiXaHD_Yilie_1Q,42185
|
102
102
|
prefect/deployments/schedules.py,sha256=qFzYxPUYz8mYRPxG4dOXZC-6tdVprbK5Zw1fwBf42xI,1910
|
103
103
|
prefect/deployments/steps/__init__.py,sha256=Dlz9VqMRyG1Gal8dj8vfGpPr0LyQhZdvcciozkK8WoY,206
|
104
104
|
prefect/deployments/steps/core.py,sha256=5vFf6BSpu992kkaYsvcPpsz-nZxFmayMIDmY9h0Hb8M,6846
|
@@ -166,7 +166,7 @@ prefect/settings/context.py,sha256=yKxnaDJHX8e2jmAVtw1RF9o7X4V3AOcz61sVeQyPX2c,2
|
|
166
166
|
prefect/settings/legacy.py,sha256=GcaB1mkahc4HbjnUvr4_3qNNxleke08dYnOXCUt8w3k,5617
|
167
167
|
prefect/settings/profiles.py,sha256=VZdzOV-KSuAkCxtdhBmSG9i84-K2QLSx6g2-vIUkfig,12169
|
168
168
|
prefect/settings/profiles.toml,sha256=kTvqDNMzjH3fsm5OEI-NKY4dMmipor5EvQXRB6rPEjY,522
|
169
|
-
prefect/settings/sources.py,sha256=
|
169
|
+
prefect/settings/sources.py,sha256=qoRt-XwfDB6-rC1UeZxF08G5DzpEtIU66mtm5fI7dP8,12676
|
170
170
|
prefect/settings/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
171
171
|
prefect/settings/models/api.py,sha256=DuoBHYeMX9MlgjT6JNLWPHSj_iySo98a0uNuTVSk1r8,1511
|
172
172
|
prefect/settings/models/cli.py,sha256=mHB-BHBVO9qfQcr9uHbBmU6MMDLlLUUDxjyaRz7v1ls,958
|
@@ -199,7 +199,7 @@ prefect/telemetry/bootstrap.py,sha256=oOdEjIHDQHANviyP2ZKpz9B4yBq832f9y1PKwAQ5-r
|
|
199
199
|
prefect/telemetry/instrumentation.py,sha256=S7IRYqKXaixAt-W5oxDO4CqkyXc3dy4ATgBmuindJIM,4241
|
200
200
|
prefect/telemetry/logging.py,sha256=yn5D4D2GGRrAv0y8wlHPN7PZDmQucGjQT_YauK9M9Yo,727
|
201
201
|
prefect/telemetry/processors.py,sha256=IEWBD8c_O3lx54TbIsBOF8kneIMcT27bcwh3O0VY7HI,2029
|
202
|
-
prefect/types/__init__.py,sha256=
|
202
|
+
prefect/types/__init__.py,sha256=al44Rq02jYPWVQ6eGwQpLWjEqnEd-FvfJYUCQ7PuIhM,4579
|
203
203
|
prefect/types/entrypoint.py,sha256=2FF03-wLPgtnqR_bKJDB2BsXXINPdu8ptY9ZYEZnXg8,328
|
204
204
|
prefect/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
205
205
|
prefect/utilities/annotations.py,sha256=Ocj2s5zhnGr8uXUBnOli-OrybXVJdu4-uZvCRpKpV_Q,2820
|
@@ -230,14 +230,14 @@ prefect/utilities/schema_tools/__init__.py,sha256=KsFsTEHQqgp89TkDpjggkgBBywoHQP
|
|
230
230
|
prefect/utilities/schema_tools/hydration.py,sha256=k12qVCdLLrK-mNo1hPCdhxM5f_N14Nj0vJdtiWYWffk,8858
|
231
231
|
prefect/utilities/schema_tools/validation.py,sha256=2GCjxwApTFwzey40ul9OkcAXrU3r-kWK__9ucMo0qbk,9744
|
232
232
|
prefect/workers/__init__.py,sha256=8dP8SLZbWYyC_l9DRTQSE3dEbDgns5DZDhxkp_NfsbQ,35
|
233
|
-
prefect/workers/base.py,sha256=
|
233
|
+
prefect/workers/base.py,sha256=1yRldH6bGV01grfMez9zLxKC8f1Uq1rWyb_Cfb-3USg,49208
|
234
234
|
prefect/workers/block.py,sha256=BOVVY5z-vUIQ2u8LwMTXDaNys2fjOZSS5YGDwJmTQjI,230
|
235
235
|
prefect/workers/cloud.py,sha256=BOVVY5z-vUIQ2u8LwMTXDaNys2fjOZSS5YGDwJmTQjI,230
|
236
236
|
prefect/workers/process.py,sha256=tcJ3fbiraLCfpVGpv8dOHwMSfVzeD_kyguUOvPuIz6I,19796
|
237
237
|
prefect/workers/server.py,sha256=lgh2FfSuaNU7b6HPxSFm8JtKvAvHsZGkiOo4y4tW1Cw,2022
|
238
238
|
prefect/workers/utilities.py,sha256=VfPfAlGtTuDj0-Kb8WlMgAuOfgXCdrGAnKMapPSBrwc,2483
|
239
|
-
prefect_client-3.1.
|
240
|
-
prefect_client-3.1.
|
241
|
-
prefect_client-3.1.
|
242
|
-
prefect_client-3.1.
|
243
|
-
prefect_client-3.1.
|
239
|
+
prefect_client-3.1.5.dist-info/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
|
240
|
+
prefect_client-3.1.5.dist-info/METADATA,sha256=SIwJYSFuW8cP5ifc4rIynU7bhpqw9KztLw80Fs0Qe6g,7202
|
241
|
+
prefect_client-3.1.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
242
|
+
prefect_client-3.1.5.dist-info/top_level.txt,sha256=MJZYJgFdbRc2woQCeB4vM6T33tr01TmkEhRcns6H_H4,8
|
243
|
+
prefect_client-3.1.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|