prefect-client 3.1.3__py3-none-any.whl → 3.1.4__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/_internal/schemas/bases.py +4 -1
- prefect/_version.py +3 -3
- prefect/client/cloud.py +1 -1
- prefect/client/orchestration.py +7 -7
- prefect/client/schemas/objects.py +1 -26
- prefect/deployments/runner.py +2 -1
- prefect/types/__init__.py +18 -1
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.4.dist-info}/METADATA +1 -1
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.4.dist-info}/RECORD +12 -12
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.4.dist-info}/LICENSE +0 -0
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.4.dist-info}/WHEEL +0 -0
- {prefect_client-3.1.3.dist-info → prefect_client-3.1.4.dist-info}/top_level.txt +0 -0
@@ -84,9 +84,12 @@ class PrefectBaseModel(BaseModel):
|
|
84
84
|
Returns:
|
85
85
|
PrefectBaseModel: A new instance of the model with the reset fields.
|
86
86
|
"""
|
87
|
+
data = self.model_dump()
|
87
88
|
return self.model_copy(
|
88
89
|
update={
|
89
|
-
field: self.model_fields[field].get_default(
|
90
|
+
field: self.model_fields[field].get_default(
|
91
|
+
call_default_factory=True, validated_data=data
|
92
|
+
)
|
90
93
|
for field in self._reset_fields
|
91
94
|
}
|
92
95
|
)
|
prefect/_version.py
CHANGED
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "2024-11-
|
11
|
+
"date": "2024-11-20T19:37:35-0600",
|
12
12
|
"dirty": true,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "3.1.
|
14
|
+
"full-revisionid": "78ee41cb26058cc2dfba8aece6a2471ec5ea3675",
|
15
|
+
"version": "3.1.4"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
prefect/client/cloud.py
CHANGED
@@ -13,7 +13,6 @@ from prefect.client.base import PrefectHttpxAsyncClient
|
|
13
13
|
from prefect.client.schemas.objects import (
|
14
14
|
IPAllowlist,
|
15
15
|
IPAllowlistMyAccessResponse,
|
16
|
-
KeyValueLabels,
|
17
16
|
Workspace,
|
18
17
|
)
|
19
18
|
from prefect.exceptions import ObjectNotFound, PrefectException
|
@@ -23,6 +22,7 @@ from prefect.settings import (
|
|
23
22
|
PREFECT_CLOUD_API_URL,
|
24
23
|
PREFECT_TESTING_UNIT_TEST_MODE,
|
25
24
|
)
|
25
|
+
from prefect.types import KeyValueLabels
|
26
26
|
|
27
27
|
PARSE_API_URL_REGEX = re.compile(r"accounts/(.{36})/workspaces/(.{36})")
|
28
28
|
|
prefect/client/orchestration.py
CHANGED
@@ -3925,13 +3925,13 @@ class SyncPrefectClient:
|
|
3925
3925
|
def read_flow_runs(
|
3926
3926
|
self,
|
3927
3927
|
*,
|
3928
|
-
flow_filter: FlowFilter = None,
|
3929
|
-
flow_run_filter: FlowRunFilter = None,
|
3930
|
-
task_run_filter: TaskRunFilter = None,
|
3931
|
-
deployment_filter: DeploymentFilter = None,
|
3932
|
-
work_pool_filter: WorkPoolFilter = None,
|
3933
|
-
work_queue_filter: WorkQueueFilter = None,
|
3934
|
-
sort: FlowRunSort = None,
|
3928
|
+
flow_filter: Optional[FlowFilter] = None,
|
3929
|
+
flow_run_filter: Optional[FlowRunFilter] = None,
|
3930
|
+
task_run_filter: Optional[TaskRunFilter] = None,
|
3931
|
+
deployment_filter: Optional[DeploymentFilter] = None,
|
3932
|
+
work_pool_filter: Optional[WorkPoolFilter] = None,
|
3933
|
+
work_queue_filter: Optional[WorkQueueFilter] = None,
|
3934
|
+
sort: Optional[FlowRunSort] = None,
|
3935
3935
|
limit: Optional[int] = None,
|
3936
3936
|
offset: int = 0,
|
3937
3937
|
) -> List[FlowRun]:
|
@@ -23,9 +23,6 @@ from pydantic import (
|
|
23
23
|
HttpUrl,
|
24
24
|
IPvAnyNetwork,
|
25
25
|
SerializationInfo,
|
26
|
-
StrictBool,
|
27
|
-
StrictFloat,
|
28
|
-
StrictInt,
|
29
26
|
Tag,
|
30
27
|
field_validator,
|
31
28
|
model_serializer,
|
@@ -56,6 +53,7 @@ from prefect.client.schemas.schedules import SCHEDULE_TYPES
|
|
56
53
|
from prefect.settings import PREFECT_CLOUD_API_URL, PREFECT_CLOUD_UI_URL
|
57
54
|
from prefect.types import (
|
58
55
|
MAX_VARIABLE_NAME_LENGTH,
|
56
|
+
KeyValueLabels,
|
59
57
|
Name,
|
60
58
|
NonNegativeInteger,
|
61
59
|
PositiveInteger,
|
@@ -71,8 +69,6 @@ if TYPE_CHECKING:
|
|
71
69
|
|
72
70
|
R = TypeVar("R", default=Any)
|
73
71
|
|
74
|
-
KeyValueLabels = dict[str, Union[StrictBool, StrictInt, StrictFloat, str]]
|
75
|
-
|
76
72
|
|
77
73
|
DEFAULT_BLOCK_SCHEMA_VERSION = "non-versioned"
|
78
74
|
DEFAULT_AGENT_WORK_POOL_NAME = "default-agent-pool"
|
@@ -1188,27 +1184,6 @@ class ConcurrencyLimit(ObjectBaseModel):
|
|
1188
1184
|
)
|
1189
1185
|
|
1190
1186
|
|
1191
|
-
class BlockSchema(ObjectBaseModel):
|
1192
|
-
"""An ORM representation of a block schema."""
|
1193
|
-
|
1194
|
-
checksum: str = Field(default=..., description="The block schema's unique checksum")
|
1195
|
-
fields: Dict[str, Any] = Field(
|
1196
|
-
default_factory=dict, description="The block schema's field schema"
|
1197
|
-
)
|
1198
|
-
block_type_id: Optional[UUID] = Field(default=..., description="A block type ID")
|
1199
|
-
block_type: Optional[BlockType] = Field(
|
1200
|
-
default=None, description="The associated block type"
|
1201
|
-
)
|
1202
|
-
capabilities: List[str] = Field(
|
1203
|
-
default_factory=list,
|
1204
|
-
description="A list of Block capabilities",
|
1205
|
-
)
|
1206
|
-
version: str = Field(
|
1207
|
-
default=DEFAULT_BLOCK_SCHEMA_VERSION,
|
1208
|
-
description="Human readable identifier for the block schema",
|
1209
|
-
)
|
1210
|
-
|
1211
|
-
|
1212
1187
|
class BlockSchemaReference(ObjectBaseModel):
|
1213
1188
|
"""An ORM representation of a block schema reference."""
|
1214
1189
|
|
prefect/deployments/runner.py
CHANGED
@@ -77,6 +77,7 @@ from prefect.settings import (
|
|
77
77
|
PREFECT_DEFAULT_WORK_POOL_NAME,
|
78
78
|
PREFECT_UI_URL,
|
79
79
|
)
|
80
|
+
from prefect.types import ListOfNonEmptyStrings
|
80
81
|
from prefect.types.entrypoint import EntrypointType
|
81
82
|
from prefect.utilities.asyncutils import sync_compatible
|
82
83
|
from prefect.utilities.callables import ParameterSchema, parameter_schema
|
@@ -140,7 +141,7 @@ class RunnerDeployment(BaseModel):
|
|
140
141
|
version: Optional[str] = Field(
|
141
142
|
default=None, description="An optional version for the deployment."
|
142
143
|
)
|
143
|
-
tags:
|
144
|
+
tags: ListOfNonEmptyStrings = Field(
|
144
145
|
default_factory=list,
|
145
146
|
description="One of more tags to apply to this deployment.",
|
146
147
|
)
|
prefect/types/__init__.py
CHANGED
@@ -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
|
|
@@ -137,6 +153,7 @@ __all__ = [
|
|
137
153
|
"LogLevel",
|
138
154
|
"NonNegativeInteger",
|
139
155
|
"PositiveInteger",
|
156
|
+
"ListOfNonEmptyStrings",
|
140
157
|
"NonNegativeFloat",
|
141
158
|
"Name",
|
142
159
|
"NameOrEmpty",
|
@@ -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=mXepR53bQnibhcR0qc6BYMFaGJSyMxmSDzNiJ4a-FWs,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
|
@@ -53,7 +53,7 @@ prefect/_internal/pydantic/v2_validated_func.py,sha256=WfEKOMb-tPYdc8o2QX5hDLJhU
|
|
53
53
|
prefect/_internal/pydantic/annotations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
54
|
prefect/_internal/pydantic/annotations/pendulum.py,sha256=F0SMi6ZjxSfp_7rStK79t4gttjy2QNNQRIZxIBfRgSE,2623
|
55
55
|
prefect/_internal/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
56
|
-
prefect/_internal/schemas/bases.py,sha256=
|
56
|
+
prefect/_internal/schemas/bases.py,sha256=kAn6u6n-edS5EjLrse-GCX8ljJDx9fQDSr4JUWjXOwA,4305
|
57
57
|
prefect/_internal/schemas/fields.py,sha256=m4LrFNz8rA9uBhMk9VyQT6FIXmV_EVAW92hdXeSvHbY,837
|
58
58
|
prefect/_internal/schemas/serializers.py,sha256=G_RGHfObjisUiRvd29p-zc6W4bwt5rE1OdR6TXNrRhQ,825
|
59
59
|
prefect/_internal/schemas/validators.py,sha256=6-1iHBTgcRLyeyR7KNpFnTE1O5VvBEAczpmL9a2oRt8,26656
|
@@ -67,16 +67,16 @@ 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=Vb9fscnrlWUX7T9MGNM33Y5MbaT17siuMkXwYG98y0Q,151559
|
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
77
|
prefect/client/schemas/actions.py,sha256=m2HJr9oAoK9vqigCHSwMGwvKPTjGNEtP0xdXgforIT0,28629
|
78
78
|
prefect/client/schemas/filters.py,sha256=ynzD3mdvHHkI51pJ_NWgeDv8Awr7-2QtpUq7fTInEYM,36316
|
79
|
-
prefect/client/schemas/objects.py,sha256=
|
79
|
+
prefect/client/schemas/objects.py,sha256=JUhIBvtHhUwiTMvrwAF_eurfH3_zs2Vl8S327bsHEKw,56274
|
80
80
|
prefect/client/schemas/responses.py,sha256=tV06W8npA8oCjV9d0ZNvjro4QcbHxayb8PC4LmanXjo,15467
|
81
81
|
prefect/client/schemas/schedules.py,sha256=8rpqjOYtknu2-1n5_WD4cOplgu93P3mCyX86B22LfL4,13070
|
82
82
|
prefect/client/schemas/sorting.py,sha256=L-2Mx-igZPtsUoRUguTcG3nIEstMEMPD97NwPM2Ox5s,2579
|
@@ -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
|
@@ -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=6ZU-riBXkR-emhOAwirPR2GxqzbQ5bIkWYrjVpN0pD0,4036
|
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
|
@@ -236,8 +236,8 @@ 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.4.dist-info/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
|
240
|
+
prefect_client-3.1.4.dist-info/METADATA,sha256=ZB3BOZWtnkmrXdym1Xw_1qT1Fv4f7wqYblnWOcXG1u0,7386
|
241
|
+
prefect_client-3.1.4.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
|
242
|
+
prefect_client-3.1.4.dist-info/top_level.txt,sha256=MJZYJgFdbRc2woQCeB4vM6T33tr01TmkEhRcns6H_H4,8
|
243
|
+
prefect_client-3.1.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|