prefect-client 2.16.8__py3-none-any.whl → 2.17.0__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.
Files changed (89) hide show
  1. prefect/__init__.py +0 -18
  2. prefect/_internal/compatibility/deprecated.py +108 -5
  3. prefect/_internal/compatibility/experimental.py +9 -8
  4. prefect/_internal/concurrency/api.py +23 -42
  5. prefect/_internal/concurrency/waiters.py +25 -22
  6. prefect/_internal/pydantic/__init__.py +16 -3
  7. prefect/_internal/pydantic/_base_model.py +39 -4
  8. prefect/_internal/pydantic/_compat.py +69 -452
  9. prefect/_internal/pydantic/_flags.py +5 -0
  10. prefect/_internal/pydantic/_types.py +8 -0
  11. prefect/_internal/pydantic/utilities/__init__.py +0 -0
  12. prefect/_internal/pydantic/utilities/config_dict.py +72 -0
  13. prefect/_internal/pydantic/utilities/field_validator.py +135 -0
  14. prefect/_internal/pydantic/utilities/model_construct.py +56 -0
  15. prefect/_internal/pydantic/utilities/model_copy.py +55 -0
  16. prefect/_internal/pydantic/utilities/model_dump.py +136 -0
  17. prefect/_internal/pydantic/utilities/model_dump_json.py +112 -0
  18. prefect/_internal/pydantic/utilities/model_fields.py +50 -0
  19. prefect/_internal/pydantic/utilities/model_fields_set.py +29 -0
  20. prefect/_internal/pydantic/utilities/model_json_schema.py +82 -0
  21. prefect/_internal/pydantic/utilities/model_rebuild.py +80 -0
  22. prefect/_internal/pydantic/utilities/model_validate.py +75 -0
  23. prefect/_internal/pydantic/utilities/model_validate_json.py +68 -0
  24. prefect/_internal/pydantic/utilities/model_validator.py +79 -0
  25. prefect/_internal/pydantic/utilities/type_adapter.py +71 -0
  26. prefect/_internal/schemas/bases.py +1 -17
  27. prefect/_internal/schemas/validators.py +425 -4
  28. prefect/agent.py +1 -1
  29. prefect/blocks/kubernetes.py +7 -3
  30. prefect/blocks/notifications.py +18 -18
  31. prefect/blocks/webhook.py +1 -1
  32. prefect/client/base.py +7 -0
  33. prefect/client/cloud.py +1 -1
  34. prefect/client/orchestration.py +51 -11
  35. prefect/client/schemas/actions.py +367 -297
  36. prefect/client/schemas/filters.py +28 -28
  37. prefect/client/schemas/objects.py +78 -147
  38. prefect/client/schemas/responses.py +240 -60
  39. prefect/client/schemas/schedules.py +6 -8
  40. prefect/concurrency/events.py +2 -2
  41. prefect/context.py +4 -2
  42. prefect/deployments/base.py +6 -13
  43. prefect/deployments/deployments.py +34 -9
  44. prefect/deployments/runner.py +9 -27
  45. prefect/deprecated/packaging/base.py +5 -6
  46. prefect/deprecated/packaging/docker.py +19 -25
  47. prefect/deprecated/packaging/file.py +10 -5
  48. prefect/deprecated/packaging/orion.py +9 -4
  49. prefect/deprecated/packaging/serializers.py +8 -58
  50. prefect/engine.py +55 -618
  51. prefect/events/actions.py +16 -1
  52. prefect/events/clients.py +45 -13
  53. prefect/events/filters.py +19 -2
  54. prefect/events/related.py +4 -4
  55. prefect/events/schemas/automations.py +13 -2
  56. prefect/events/schemas/deployment_triggers.py +73 -5
  57. prefect/events/schemas/events.py +1 -1
  58. prefect/events/utilities.py +12 -4
  59. prefect/events/worker.py +26 -8
  60. prefect/exceptions.py +3 -8
  61. prefect/filesystems.py +7 -7
  62. prefect/flows.py +7 -3
  63. prefect/infrastructure/provisioners/ecs.py +1 -0
  64. prefect/logging/configuration.py +2 -2
  65. prefect/manifests.py +1 -8
  66. prefect/profiles.toml +1 -1
  67. prefect/pydantic/__init__.py +74 -2
  68. prefect/pydantic/main.py +26 -2
  69. prefect/serializers.py +6 -31
  70. prefect/settings.py +72 -26
  71. prefect/software/python.py +3 -5
  72. prefect/task_server.py +2 -2
  73. prefect/utilities/callables.py +1 -1
  74. prefect/utilities/collections.py +2 -1
  75. prefect/utilities/dispatch.py +1 -0
  76. prefect/utilities/engine.py +629 -0
  77. prefect/utilities/pydantic.py +1 -1
  78. prefect/utilities/schema_tools/validation.py +2 -2
  79. prefect/utilities/visualization.py +1 -1
  80. prefect/variables.py +88 -12
  81. prefect/workers/base.py +20 -11
  82. prefect/workers/block.py +4 -8
  83. prefect/workers/process.py +2 -5
  84. {prefect_client-2.16.8.dist-info → prefect_client-2.17.0.dist-info}/METADATA +4 -3
  85. {prefect_client-2.16.8.dist-info → prefect_client-2.17.0.dist-info}/RECORD +88 -72
  86. prefect/_internal/schemas/transformations.py +0 -106
  87. {prefect_client-2.16.8.dist-info → prefect_client-2.17.0.dist-info}/LICENSE +0 -0
  88. {prefect_client-2.16.8.dist-info → prefect_client-2.17.0.dist-info}/WHEEL +0 -0
  89. {prefect_client-2.16.8.dist-info → prefect_client-2.17.0.dist-info}/top_level.txt +0 -0
@@ -48,7 +48,7 @@ class FlowFilterName(PrefectBaseModel):
48
48
  any_: Optional[List[str]] = Field(
49
49
  default=None,
50
50
  description="A list of flow names to include",
51
- example=["my-flow-1", "my-flow-2"],
51
+ examples=[["my-flow-1", "my-flow-2"]],
52
52
  )
53
53
 
54
54
  like_: Optional[str] = Field(
@@ -58,7 +58,7 @@ class FlowFilterName(PrefectBaseModel):
58
58
  " passing 'marvin' will match "
59
59
  "'marvin', 'sad-Marvin', and 'marvin-robot'."
60
60
  ),
61
- example="marvin",
61
+ examples=["marvin"],
62
62
  )
63
63
 
64
64
 
@@ -67,7 +67,7 @@ class FlowFilterTags(PrefectBaseModel, OperatorMixin):
67
67
 
68
68
  all_: Optional[List[str]] = Field(
69
69
  default=None,
70
- example=["tag-1", "tag-2"],
70
+ examples=[["tag-1", "tag-2"]],
71
71
  description=(
72
72
  "A list of tags. Flows will be returned only if their tags are a superset"
73
73
  " of the list"
@@ -109,7 +109,7 @@ class FlowRunFilterName(PrefectBaseModel):
109
109
  any_: Optional[List[str]] = Field(
110
110
  default=None,
111
111
  description="A list of flow run names to include",
112
- example=["my-flow-run-1", "my-flow-run-2"],
112
+ examples=[["my-flow-run-1", "my-flow-run-2"]],
113
113
  )
114
114
 
115
115
  like_: Optional[str] = Field(
@@ -119,7 +119,7 @@ class FlowRunFilterName(PrefectBaseModel):
119
119
  " passing 'marvin' will match "
120
120
  "'marvin', 'sad-Marvin', and 'marvin-robot'."
121
121
  ),
122
- example="marvin",
122
+ examples=["marvin"],
123
123
  )
124
124
 
125
125
 
@@ -128,7 +128,7 @@ class FlowRunFilterTags(PrefectBaseModel, OperatorMixin):
128
128
 
129
129
  all_: Optional[List[str]] = Field(
130
130
  default=None,
131
- example=["tag-1", "tag-2"],
131
+ examples=[["tag-1", "tag-2"]],
132
132
  description=(
133
133
  "A list of tags. Flow runs will be returned only if their tags are a"
134
134
  " superset of the list"
@@ -157,7 +157,7 @@ class FlowRunFilterWorkQueueName(PrefectBaseModel, OperatorMixin):
157
157
  any_: Optional[List[str]] = Field(
158
158
  default=None,
159
159
  description="A list of work queue names to include",
160
- example=["work_queue_1", "work_queue_2"],
160
+ examples=[["work_queue_1", "work_queue_2"]],
161
161
  )
162
162
  is_null_: Optional[bool] = Field(
163
163
  default=None,
@@ -343,7 +343,7 @@ class TaskRunFilterName(PrefectBaseModel):
343
343
  any_: Optional[List[str]] = Field(
344
344
  default=None,
345
345
  description="A list of task run names to include",
346
- example=["my-task-run-1", "my-task-run-2"],
346
+ examples=[["my-task-run-1", "my-task-run-2"]],
347
347
  )
348
348
 
349
349
  like_: Optional[str] = Field(
@@ -353,7 +353,7 @@ class TaskRunFilterName(PrefectBaseModel):
353
353
  " passing 'marvin' will match "
354
354
  "'marvin', 'sad-Marvin', and 'marvin-robot'."
355
355
  ),
356
- example="marvin",
356
+ examples=["marvin"],
357
357
  )
358
358
 
359
359
 
@@ -362,7 +362,7 @@ class TaskRunFilterTags(PrefectBaseModel, OperatorMixin):
362
362
 
363
363
  all_: Optional[List[str]] = Field(
364
364
  default=None,
365
- example=["tag-1", "tag-2"],
365
+ examples=[["tag-1", "tag-2"]],
366
366
  description=(
367
367
  "A list of tags. Task runs will be returned only if their tags are a"
368
368
  " superset of the list"
@@ -460,7 +460,7 @@ class DeploymentFilterName(PrefectBaseModel):
460
460
  any_: Optional[List[str]] = Field(
461
461
  default=None,
462
462
  description="A list of deployment names to include",
463
- example=["my-deployment-1", "my-deployment-2"],
463
+ examples=[["my-deployment-1", "my-deployment-2"]],
464
464
  )
465
465
 
466
466
  like_: Optional[str] = Field(
@@ -470,7 +470,7 @@ class DeploymentFilterName(PrefectBaseModel):
470
470
  " passing 'marvin' will match "
471
471
  "'marvin', 'sad-Marvin', and 'marvin-robot'."
472
472
  ),
473
- example="marvin",
473
+ examples=["marvin"],
474
474
  )
475
475
 
476
476
 
@@ -480,7 +480,7 @@ class DeploymentFilterWorkQueueName(PrefectBaseModel):
480
480
  any_: Optional[List[str]] = Field(
481
481
  default=None,
482
482
  description="A list of work queue names to include",
483
- example=["work_queue_1", "work_queue_2"],
483
+ examples=[["work_queue_1", "work_queue_2"]],
484
484
  )
485
485
 
486
486
 
@@ -498,7 +498,7 @@ class DeploymentFilterTags(PrefectBaseModel, OperatorMixin):
498
498
 
499
499
  all_: Optional[List[str]] = Field(
500
500
  default=None,
501
- example=["tag-1", "tag-2"],
501
+ examples=[["tag-1", "tag-2"]],
502
502
  description=(
503
503
  "A list of tags. Deployments will be returned only if their tags are a"
504
504
  " superset of the list"
@@ -535,7 +535,7 @@ class LogFilterName(PrefectBaseModel):
535
535
  any_: Optional[List[str]] = Field(
536
536
  default=None,
537
537
  description="A list of log names to include",
538
- example=["prefect.logger.flow_runs", "prefect.logger.task_runs"],
538
+ examples=[["prefect.logger.flow_runs", "prefect.logger.task_runs"]],
539
539
  )
540
540
 
541
541
 
@@ -545,13 +545,13 @@ class LogFilterLevel(PrefectBaseModel):
545
545
  ge_: Optional[int] = Field(
546
546
  default=None,
547
547
  description="Include logs with a level greater than or equal to this level",
548
- example=20,
548
+ examples=[20],
549
549
  )
550
550
 
551
551
  le_: Optional[int] = Field(
552
552
  default=None,
553
553
  description="Include logs with a level less than or equal to this level",
554
- example=50,
554
+ examples=[50],
555
555
  )
556
556
 
557
557
 
@@ -629,7 +629,7 @@ class BlockTypeFilterName(PrefectBaseModel):
629
629
  " passing 'marvin' will match "
630
630
  "'marvin', 'sad-Marvin', and 'marvin-robot'."
631
631
  ),
632
- example="marvin",
632
+ examples=["marvin"],
633
633
  )
634
634
 
635
635
 
@@ -674,7 +674,7 @@ class BlockSchemaFilterCapabilities(PrefectBaseModel):
674
674
 
675
675
  all_: Optional[List[str]] = Field(
676
676
  default=None,
677
- example=["write-storage", "read-storage"],
677
+ examples=[["write-storage", "read-storage"]],
678
678
  description=(
679
679
  "A list of block capabilities. Block entities will be returned only if an"
680
680
  " associated block schema has a superset of the defined capabilities."
@@ -687,7 +687,7 @@ class BlockSchemaFilterVersion(PrefectBaseModel):
687
687
 
688
688
  any_: Optional[List[str]] = Field(
689
689
  default=None,
690
- example=["2.0.0", "2.1.0"],
690
+ examples=[["2.0.0", "2.1.0"]],
691
691
  description="A list of block schema versions.",
692
692
  )
693
693
 
@@ -748,7 +748,7 @@ class BlockDocumentFilterName(PrefectBaseModel):
748
748
  "A string to match block names against. This can include "
749
749
  "SQL wildcard characters like `%` and `_`."
750
750
  ),
751
- example="my-block%",
751
+ examples=["my-block%"],
752
752
  )
753
753
 
754
754
 
@@ -809,7 +809,7 @@ class WorkQueueFilterName(PrefectBaseModel):
809
809
  any_: Optional[List[str]] = Field(
810
810
  default=None,
811
811
  description="A list of work queue names to include",
812
- example=["wq-1", "wq-2"],
812
+ examples=[["wq-1", "wq-2"]],
813
813
  )
814
814
 
815
815
  startswith_: Optional[List[str]] = Field(
@@ -819,7 +819,7 @@ class WorkQueueFilterName(PrefectBaseModel):
819
819
  " passing 'marvin' will match "
820
820
  "'marvin', and 'Marvin-robot', but not 'sad-marvin'."
821
821
  ),
822
- example=["marvin", "Marvin-robot"],
822
+ examples=[["marvin", "Marvin-robot"]],
823
823
  )
824
824
 
825
825
 
@@ -929,7 +929,7 @@ class ArtifactFilterKey(PrefectBaseModel):
929
929
  "A string to match artifact keys against. This can include "
930
930
  "SQL wildcard characters like `%` and `_`."
931
931
  ),
932
- example="my-artifact-%",
932
+ examples=["my-artifact-%"],
933
933
  )
934
934
 
935
935
  exists_: Optional[bool] = Field(
@@ -1009,7 +1009,7 @@ class ArtifactCollectionFilterKey(PrefectBaseModel):
1009
1009
  "A string to match artifact keys against. This can include "
1010
1010
  "SQL wildcard characters like `%` and `_`."
1011
1011
  ),
1012
- example="my-artifact-%",
1012
+ examples=["my-artifact-%"],
1013
1013
  )
1014
1014
 
1015
1015
  exists_: Optional[bool] = Field(
@@ -1089,7 +1089,7 @@ class VariableFilterName(PrefectBaseModel):
1089
1089
  "A string to match variable names against. This can include "
1090
1090
  "SQL wildcard characters like `%` and `_`."
1091
1091
  ),
1092
- example="my_variable_%",
1092
+ examples=["my_variable_%"],
1093
1093
  )
1094
1094
 
1095
1095
 
@@ -1105,7 +1105,7 @@ class VariableFilterValue(PrefectBaseModel):
1105
1105
  "A string to match variable value against. This can include "
1106
1106
  "SQL wildcard characters like `%` and `_`."
1107
1107
  ),
1108
- example="my-value-%",
1108
+ examples=["my-value-%"],
1109
1109
  )
1110
1110
 
1111
1111
 
@@ -1114,7 +1114,7 @@ class VariableFilterTags(PrefectBaseModel, OperatorMixin):
1114
1114
 
1115
1115
  all_: Optional[List[str]] = Field(
1116
1116
  default=None,
1117
- example=["tag-1", "tag-2"],
1117
+ examples=[["tag-1", "tag-2"]],
1118
1118
  description=(
1119
1119
  "A list of tags. Variables will be returned only if their tags are a"
1120
1120
  " superset of the list"