prefect-client 2.19.4__tar.gz → 3.0.0rc2__tar.gz

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 (326) hide show
  1. prefect-client-3.0.0rc2/PKG-INFO +139 -0
  2. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/README.md +12 -12
  3. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/requirements-client.txt +9 -11
  4. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/requirements-dev.txt +3 -7
  5. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/requirements.txt +2 -2
  6. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/setup.cfg +6 -12
  7. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/setup.py +2 -2
  8. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/__init__.py +8 -56
  9. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/compatibility/deprecated.py +6 -115
  10. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/compatibility/experimental.py +4 -79
  11. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/api.py +0 -34
  12. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/calls.py +0 -6
  13. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/cancellation.py +0 -3
  14. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/event_loop.py +0 -20
  15. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/inspection.py +3 -3
  16. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/threads.py +35 -0
  17. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/waiters.py +0 -28
  18. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/pydantic/v1_schema.py +21 -22
  19. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/pydantic/v2_schema.py +0 -2
  20. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/pydantic/v2_validated_func.py +18 -23
  21. prefect-client-3.0.0rc2/src/prefect/_internal/schemas/bases.py +121 -0
  22. prefect-client-3.0.0rc2/src/prefect/_internal/schemas/fields.py +28 -0
  23. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/schemas/validators.py +60 -158
  24. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/artifacts.py +161 -14
  25. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/automations.py +39 -4
  26. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/blocks/abstract.py +1 -1
  27. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/blocks/core.py +268 -148
  28. prefect-client-3.0.0rc2/src/prefect/blocks/fields.py +3 -0
  29. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/blocks/kubernetes.py +8 -12
  30. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/blocks/notifications.py +40 -20
  31. prefect-client-3.0.0rc2/src/prefect/blocks/redis.py +168 -0
  32. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/blocks/system.py +22 -11
  33. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/blocks/webhook.py +2 -9
  34. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/base.py +4 -4
  35. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/cloud.py +8 -13
  36. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/orchestration.py +362 -340
  37. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/schemas/actions.py +92 -86
  38. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/schemas/filters.py +20 -40
  39. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/schemas/objects.py +158 -152
  40. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/schemas/responses.py +16 -24
  41. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/schemas/schedules.py +47 -35
  42. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/subscriptions.py +2 -2
  43. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/utilities.py +5 -2
  44. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/concurrency/asyncio.py +4 -2
  45. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/concurrency/events.py +1 -1
  46. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/concurrency/services.py +7 -4
  47. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/context.py +195 -27
  48. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/deployments/__init__.py +5 -6
  49. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/deployments/base.py +7 -5
  50. prefect-client-3.0.0rc2/src/prefect/deployments/flow_runs.py +185 -0
  51. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/deployments/runner.py +50 -45
  52. prefect-client-3.0.0rc2/src/prefect/deployments/schedules.py +55 -0
  53. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/deployments/steps/__init__.py +0 -1
  54. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/deployments/steps/core.py +1 -0
  55. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/deployments/steps/pull.py +7 -21
  56. prefect-client-3.0.0rc2/src/prefect/engine.py +72 -0
  57. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/actions.py +17 -23
  58. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/cli/automations.py +19 -6
  59. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/clients.py +14 -37
  60. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/filters.py +14 -18
  61. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/related.py +2 -2
  62. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/schemas/automations.py +55 -46
  63. prefect-client-3.0.0rc2/src/prefect/events/schemas/deployment_triggers.py +105 -0
  64. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/schemas/events.py +36 -65
  65. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/schemas/labelling.py +10 -14
  66. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/utilities.py +2 -3
  67. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/worker.py +2 -3
  68. prefect-client-3.0.0rc2/src/prefect/filesystems.py +508 -0
  69. prefect-client-2.19.4/src/prefect/new_flow_engine.py → prefect-client-3.0.0rc2/src/prefect/flow_engine.py +315 -74
  70. prefect-client-3.0.0rc2/src/prefect/flow_runs.py +462 -0
  71. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/flows.py +248 -165
  72. prefect-client-3.0.0rc2/src/prefect/futures.py +271 -0
  73. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/infrastructure/provisioners/__init__.py +5 -3
  74. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/infrastructure/provisioners/cloud_run.py +11 -6
  75. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/infrastructure/provisioners/container_instance.py +11 -7
  76. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/infrastructure/provisioners/ecs.py +6 -4
  77. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/infrastructure/provisioners/modal.py +8 -5
  78. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/input/actions.py +2 -4
  79. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/input/run_input.py +9 -9
  80. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/logging/formatters.py +0 -2
  81. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/logging/handlers.py +3 -11
  82. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/logging/loggers.py +2 -2
  83. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/manifests.py +2 -1
  84. prefect-client-3.0.0rc2/src/prefect/records/__init__.py +1 -0
  85. prefect-client-3.0.0rc2/src/prefect/records/cache_policies.py +179 -0
  86. prefect-client-3.0.0rc2/src/prefect/records/result_store.py +42 -0
  87. prefect-client-3.0.0rc2/src/prefect/records/store.py +9 -0
  88. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/results.py +43 -39
  89. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runner/runner.py +9 -9
  90. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runner/server.py +6 -10
  91. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runner/storage.py +3 -8
  92. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runner/submit.py +2 -2
  93. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runner/utils.py +2 -2
  94. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/serializers.py +24 -35
  95. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +5 -14
  96. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/settings.py +76 -136
  97. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/states.py +22 -50
  98. prefect-client-3.0.0rc2/src/prefect/task_engine.py +686 -0
  99. prefect-client-3.0.0rc2/src/prefect/task_runners.py +337 -0
  100. prefect-client-3.0.0rc2/src/prefect/task_runs.py +203 -0
  101. prefect-client-2.19.4/src/prefect/task_server.py → prefect-client-3.0.0rc2/src/prefect/task_worker.py +89 -60
  102. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/tasks.py +358 -341
  103. prefect-client-3.0.0rc2/src/prefect/transactions.py +224 -0
  104. prefect-client-3.0.0rc2/src/prefect/types/__init__.py +91 -0
  105. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/asyncutils.py +195 -136
  106. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/callables.py +121 -41
  107. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/collections.py +23 -38
  108. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/dispatch.py +11 -3
  109. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/dockerutils.py +4 -0
  110. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/engine.py +140 -20
  111. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/importtools.py +26 -27
  112. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/pydantic.py +128 -38
  113. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/schema_tools/hydration.py +5 -1
  114. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/templating.py +12 -2
  115. prefect-client-3.0.0rc2/src/prefect/variables.py +136 -0
  116. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/workers/__init__.py +0 -1
  117. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/workers/base.py +26 -18
  118. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/workers/process.py +3 -8
  119. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/workers/server.py +2 -2
  120. prefect-client-3.0.0rc2/src/prefect_client.egg-info/PKG-INFO +139 -0
  121. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect_client.egg-info/SOURCES.txt +10 -123
  122. prefect-client-3.0.0rc2/src/prefect_client.egg-info/dependency_links.txt +1 -0
  123. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect_client.egg-info/requires.txt +7 -10
  124. prefect-client-2.19.4/PKG-INFO +0 -136
  125. prefect-client-2.19.4/src/prefect/_internal/pydantic/__init__.py +0 -46
  126. prefect-client-2.19.4/src/prefect/_internal/pydantic/_base_model.py +0 -51
  127. prefect-client-2.19.4/src/prefect/_internal/pydantic/_compat.py +0 -82
  128. prefect-client-2.19.4/src/prefect/_internal/pydantic/_flags.py +0 -20
  129. prefect-client-2.19.4/src/prefect/_internal/pydantic/_types.py +0 -8
  130. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/config_dict.py +0 -72
  131. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/field_validator.py +0 -150
  132. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_construct.py +0 -56
  133. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_copy.py +0 -55
  134. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_dump.py +0 -136
  135. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_dump_json.py +0 -112
  136. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_fields.py +0 -50
  137. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_fields_set.py +0 -29
  138. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_json_schema.py +0 -82
  139. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_rebuild.py +0 -80
  140. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_validate.py +0 -75
  141. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_validate_json.py +0 -68
  142. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/model_validator.py +0 -87
  143. prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities/type_adapter.py +0 -71
  144. prefect-client-2.19.4/src/prefect/_internal/schemas/bases.py +0 -254
  145. prefect-client-2.19.4/src/prefect/_internal/schemas/fields.py +0 -70
  146. prefect-client-2.19.4/src/prefect/_vendor/fastapi/__init__.py +0 -25
  147. prefect-client-2.19.4/src/prefect/_vendor/fastapi/applications.py +0 -946
  148. prefect-client-2.19.4/src/prefect/_vendor/fastapi/background.py +0 -3
  149. prefect-client-2.19.4/src/prefect/_vendor/fastapi/concurrency.py +0 -44
  150. prefect-client-2.19.4/src/prefect/_vendor/fastapi/datastructures.py +0 -58
  151. prefect-client-2.19.4/src/prefect/_vendor/fastapi/dependencies/models.py +0 -64
  152. prefect-client-2.19.4/src/prefect/_vendor/fastapi/dependencies/utils.py +0 -877
  153. prefect-client-2.19.4/src/prefect/_vendor/fastapi/encoders.py +0 -177
  154. prefect-client-2.19.4/src/prefect/_vendor/fastapi/exception_handlers.py +0 -40
  155. prefect-client-2.19.4/src/prefect/_vendor/fastapi/exceptions.py +0 -46
  156. prefect-client-2.19.4/src/prefect/_vendor/fastapi/logger.py +0 -3
  157. prefect-client-2.19.4/src/prefect/_vendor/fastapi/middleware/__init__.py +0 -1
  158. prefect-client-2.19.4/src/prefect/_vendor/fastapi/middleware/asyncexitstack.py +0 -25
  159. prefect-client-2.19.4/src/prefect/_vendor/fastapi/middleware/cors.py +0 -3
  160. prefect-client-2.19.4/src/prefect/_vendor/fastapi/middleware/gzip.py +0 -3
  161. prefect-client-2.19.4/src/prefect/_vendor/fastapi/middleware/httpsredirect.py +0 -3
  162. prefect-client-2.19.4/src/prefect/_vendor/fastapi/middleware/trustedhost.py +0 -3
  163. prefect-client-2.19.4/src/prefect/_vendor/fastapi/middleware/wsgi.py +0 -3
  164. prefect-client-2.19.4/src/prefect/_vendor/fastapi/openapi/constants.py +0 -2
  165. prefect-client-2.19.4/src/prefect/_vendor/fastapi/openapi/docs.py +0 -203
  166. prefect-client-2.19.4/src/prefect/_vendor/fastapi/openapi/models.py +0 -480
  167. prefect-client-2.19.4/src/prefect/_vendor/fastapi/openapi/utils.py +0 -485
  168. prefect-client-2.19.4/src/prefect/_vendor/fastapi/param_functions.py +0 -340
  169. prefect-client-2.19.4/src/prefect/_vendor/fastapi/params.py +0 -453
  170. prefect-client-2.19.4/src/prefect/_vendor/fastapi/requests.py +0 -4
  171. prefect-client-2.19.4/src/prefect/_vendor/fastapi/responses.py +0 -40
  172. prefect-client-2.19.4/src/prefect/_vendor/fastapi/routing.py +0 -1331
  173. prefect-client-2.19.4/src/prefect/_vendor/fastapi/security/__init__.py +0 -15
  174. prefect-client-2.19.4/src/prefect/_vendor/fastapi/security/api_key.py +0 -98
  175. prefect-client-2.19.4/src/prefect/_vendor/fastapi/security/base.py +0 -6
  176. prefect-client-2.19.4/src/prefect/_vendor/fastapi/security/http.py +0 -172
  177. prefect-client-2.19.4/src/prefect/_vendor/fastapi/security/oauth2.py +0 -227
  178. prefect-client-2.19.4/src/prefect/_vendor/fastapi/security/open_id_connect_url.py +0 -34
  179. prefect-client-2.19.4/src/prefect/_vendor/fastapi/security/utils.py +0 -10
  180. prefect-client-2.19.4/src/prefect/_vendor/fastapi/staticfiles.py +0 -1
  181. prefect-client-2.19.4/src/prefect/_vendor/fastapi/templating.py +0 -3
  182. prefect-client-2.19.4/src/prefect/_vendor/fastapi/testclient.py +0 -1
  183. prefect-client-2.19.4/src/prefect/_vendor/fastapi/types.py +0 -3
  184. prefect-client-2.19.4/src/prefect/_vendor/fastapi/utils.py +0 -235
  185. prefect-client-2.19.4/src/prefect/_vendor/fastapi/websockets.py +0 -7
  186. prefect-client-2.19.4/src/prefect/_vendor/starlette/__init__.py +0 -1
  187. prefect-client-2.19.4/src/prefect/_vendor/starlette/_compat.py +0 -28
  188. prefect-client-2.19.4/src/prefect/_vendor/starlette/_exception_handler.py +0 -80
  189. prefect-client-2.19.4/src/prefect/_vendor/starlette/_utils.py +0 -88
  190. prefect-client-2.19.4/src/prefect/_vendor/starlette/applications.py +0 -261
  191. prefect-client-2.19.4/src/prefect/_vendor/starlette/authentication.py +0 -159
  192. prefect-client-2.19.4/src/prefect/_vendor/starlette/background.py +0 -43
  193. prefect-client-2.19.4/src/prefect/_vendor/starlette/concurrency.py +0 -59
  194. prefect-client-2.19.4/src/prefect/_vendor/starlette/config.py +0 -151
  195. prefect-client-2.19.4/src/prefect/_vendor/starlette/convertors.py +0 -87
  196. prefect-client-2.19.4/src/prefect/_vendor/starlette/datastructures.py +0 -707
  197. prefect-client-2.19.4/src/prefect/_vendor/starlette/endpoints.py +0 -130
  198. prefect-client-2.19.4/src/prefect/_vendor/starlette/exceptions.py +0 -60
  199. prefect-client-2.19.4/src/prefect/_vendor/starlette/formparsers.py +0 -276
  200. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/__init__.py +0 -17
  201. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/authentication.py +0 -52
  202. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/base.py +0 -220
  203. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/cors.py +0 -176
  204. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/errors.py +0 -265
  205. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/exceptions.py +0 -74
  206. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/gzip.py +0 -113
  207. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/httpsredirect.py +0 -19
  208. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/sessions.py +0 -82
  209. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/trustedhost.py +0 -64
  210. prefect-client-2.19.4/src/prefect/_vendor/starlette/middleware/wsgi.py +0 -147
  211. prefect-client-2.19.4/src/prefect/_vendor/starlette/requests.py +0 -328
  212. prefect-client-2.19.4/src/prefect/_vendor/starlette/responses.py +0 -347
  213. prefect-client-2.19.4/src/prefect/_vendor/starlette/routing.py +0 -933
  214. prefect-client-2.19.4/src/prefect/_vendor/starlette/schemas.py +0 -154
  215. prefect-client-2.19.4/src/prefect/_vendor/starlette/staticfiles.py +0 -248
  216. prefect-client-2.19.4/src/prefect/_vendor/starlette/status.py +0 -199
  217. prefect-client-2.19.4/src/prefect/_vendor/starlette/templating.py +0 -231
  218. prefect-client-2.19.4/src/prefect/_vendor/starlette/testclient.py +0 -804
  219. prefect-client-2.19.4/src/prefect/_vendor/starlette/types.py +0 -30
  220. prefect-client-2.19.4/src/prefect/_vendor/starlette/websockets.py +0 -193
  221. prefect-client-2.19.4/src/prefect/agent.py +0 -698
  222. prefect-client-2.19.4/src/prefect/blocks/fields.py +0 -58
  223. prefect-client-2.19.4/src/prefect/deployments/deployments.py +0 -1042
  224. prefect-client-2.19.4/src/prefect/deployments/schedules.py +0 -50
  225. prefect-client-2.19.4/src/prefect/deprecated/__init__.py +0 -0
  226. prefect-client-2.19.4/src/prefect/deprecated/data_documents.py +0 -350
  227. prefect-client-2.19.4/src/prefect/deprecated/packaging/__init__.py +0 -12
  228. prefect-client-2.19.4/src/prefect/deprecated/packaging/base.py +0 -96
  229. prefect-client-2.19.4/src/prefect/deprecated/packaging/docker.py +0 -146
  230. prefect-client-2.19.4/src/prefect/deprecated/packaging/file.py +0 -92
  231. prefect-client-2.19.4/src/prefect/deprecated/packaging/orion.py +0 -80
  232. prefect-client-2.19.4/src/prefect/deprecated/packaging/serializers.py +0 -171
  233. prefect-client-2.19.4/src/prefect/engine.py +0 -2482
  234. prefect-client-2.19.4/src/prefect/events/cli/__init__.py +0 -0
  235. prefect-client-2.19.4/src/prefect/events/instrument.py +0 -135
  236. prefect-client-2.19.4/src/prefect/events/schemas/__init__.py +0 -5
  237. prefect-client-2.19.4/src/prefect/events/schemas/deployment_triggers.py +0 -295
  238. prefect-client-2.19.4/src/prefect/filesystems.py +0 -1019
  239. prefect-client-2.19.4/src/prefect/flow_runs.py +0 -90
  240. prefect-client-2.19.4/src/prefect/futures.py +0 -429
  241. prefect-client-2.19.4/src/prefect/infrastructure/__init__.py +0 -27
  242. prefect-client-2.19.4/src/prefect/infrastructure/base.py +0 -323
  243. prefect-client-2.19.4/src/prefect/infrastructure/container.py +0 -818
  244. prefect-client-2.19.4/src/prefect/infrastructure/kubernetes.py +0 -920
  245. prefect-client-2.19.4/src/prefect/infrastructure/process.py +0 -289
  246. prefect-client-2.19.4/src/prefect/new_task_engine.py +0 -423
  247. prefect-client-2.19.4/src/prefect/pydantic/__init__.py +0 -76
  248. prefect-client-2.19.4/src/prefect/pydantic/main.py +0 -39
  249. prefect-client-2.19.4/src/prefect/software/__init__.py +0 -2
  250. prefect-client-2.19.4/src/prefect/software/base.py +0 -50
  251. prefect-client-2.19.4/src/prefect/software/conda.py +0 -199
  252. prefect-client-2.19.4/src/prefect/software/pip.py +0 -122
  253. prefect-client-2.19.4/src/prefect/software/python.py +0 -52
  254. prefect-client-2.19.4/src/prefect/task_engine.py +0 -76
  255. prefect-client-2.19.4/src/prefect/task_runners.py +0 -365
  256. prefect-client-2.19.4/src/prefect/types/__init__.py +0 -112
  257. prefect-client-2.19.4/src/prefect/utilities/__init__.py +0 -0
  258. prefect-client-2.19.4/src/prefect/variables.py +0 -114
  259. prefect-client-2.19.4/src/prefect/workers/block.py +0 -218
  260. prefect-client-2.19.4/src/prefect_client.egg-info/PKG-INFO +0 -136
  261. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/LICENSE +0 -0
  262. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/MANIFEST.in +0 -0
  263. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/.prefectignore +0 -0
  264. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/__init__.py +0 -0
  265. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/_logging.py +0 -0
  266. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/compatibility/__init__.py +0 -0
  267. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/__init__.py +0 -0
  268. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/primitives.py +0 -0
  269. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/concurrency/services.py +0 -0
  270. /prefect-client-2.19.4/src/prefect_client.egg-info/dependency_links.txt → /prefect-client-3.0.0rc2/src/prefect/_internal/pydantic/__init__.py +0 -0
  271. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
  272. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
  273. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/pydantic/schemas.py +0 -0
  274. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/pytz.py +0 -0
  275. {prefect-client-2.19.4/src/prefect/_internal/pydantic/utilities → prefect-client-3.0.0rc2/src/prefect/_internal/schemas}/__init__.py +0 -0
  276. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_internal/schemas/serializers.py +0 -0
  277. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/_version.py +0 -0
  278. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/blocks/__init__.py +0 -0
  279. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/__init__.py +0 -0
  280. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/collections.py +0 -0
  281. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/constants.py +0 -0
  282. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/schemas/__init__.py +0 -0
  283. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/client/schemas/sorting.py +0 -0
  284. {prefect-client-2.19.4/src/prefect/_internal/schemas → prefect-client-3.0.0rc2/src/prefect/concurrency}/__init__.py +0 -0
  285. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/concurrency/sync.py +0 -0
  286. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/deployments/steps/utility.py +0 -0
  287. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/events/__init__.py +0 -0
  288. {prefect-client-2.19.4/src/prefect/_vendor → prefect-client-3.0.0rc2/src/prefect/events/cli}/__init__.py +0 -0
  289. {prefect-client-2.19.4/src/prefect/_vendor/fastapi/dependencies → prefect-client-3.0.0rc2/src/prefect/events/schemas}/__init__.py +0 -0
  290. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/exceptions.py +0 -0
  291. {prefect-client-2.19.4/src/prefect/_vendor/fastapi/openapi → prefect-client-3.0.0rc2/src/prefect/infrastructure}/__init__.py +0 -0
  292. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/input/__init__.py +0 -0
  293. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/logging/__init__.py +0 -0
  294. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/logging/configuration.py +0 -0
  295. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/logging/filters.py +0 -0
  296. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/logging/highlighters.py +0 -0
  297. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/logging/logging.yml +0 -0
  298. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/plugins.py +0 -0
  299. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/profiles.toml +0 -0
  300. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/py.typed +0 -0
  301. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runner/__init__.py +0 -0
  302. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runtime/__init__.py +0 -0
  303. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runtime/deployment.py +0 -0
  304. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runtime/flow_run.py +0 -0
  305. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/runtime/task_run.py +0 -0
  306. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  307. {prefect-client-2.19.4/src/prefect/concurrency → prefect-client-3.0.0rc2/src/prefect/utilities}/__init__.py +0 -0
  308. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/annotations.py +0 -0
  309. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/compat.py +0 -0
  310. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/context.py +0 -0
  311. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/filesystem.py +0 -0
  312. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/hashing.py +0 -0
  313. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/math.py +0 -0
  314. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/names.py +0 -0
  315. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/processutils.py +0 -0
  316. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/render_swagger.py +0 -0
  317. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  318. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/schema_tools/validation.py +0 -0
  319. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/services.py +0 -0
  320. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/slugify.py +0 -0
  321. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/text.py +0 -0
  322. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/timeout.py +0 -0
  323. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/utilities/visualization.py +0 -0
  324. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect/workers/utilities.py +0 -0
  325. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/src/prefect_client.egg-info/top_level.txt +0 -0
  326. {prefect-client-2.19.4 → prefect-client-3.0.0rc2}/versioneer.py +0 -0
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.1
2
+ Name: prefect-client
3
+ Version: 3.0.0rc2
4
+ Summary: Workflow orchestration and management.
5
+ Home-page: https://www.prefect.io
6
+ Author: Prefect Technologies, Inc.
7
+ Author-email: help@prefect.io
8
+ License: UNKNOWN
9
+ Project-URL: Changelog, https://github.com/PrefectHQ/prefect/blob/main/RELEASE-NOTES.md
10
+ Project-URL: Documentation, https://docs.prefect.io
11
+ Project-URL: Source, https://github.com/PrefectHQ/prefect
12
+ Project-URL: Tracker, https://github.com/PrefectHQ/prefect/issues
13
+ Platform: UNKNOWN
14
+ Classifier: Natural Language :: English
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: System Administrators
17
+ Classifier: License :: OSI Approved :: Apache Software License
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development :: Libraries
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+ Provides-Extra: notifications
27
+ License-File: LICENSE
28
+
29
+ <p align="center"><img src="https://github.com/PrefectHQ/prefect/assets/3407835/c654cbc6-63e8-4ada-a92a-efd2f8f24b85" width=1000></p>
30
+
31
+ <p align="center">
32
+ <a href="https://pypi.python.org/pypi/prefect-client/" alt="PyPI version">
33
+ <img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-client?color=0052FF&labelColor=090422"></a>
34
+ <a href="https://github.com/prefecthq/prefect/" alt="Stars">
35
+ <img src="https://img.shields.io/github/stars/prefecthq/prefect?color=0052FF&labelColor=090422" /></a>
36
+ <a href="https://pepy.tech/badge/prefect-client/" alt="Downloads">
37
+ <img src="https://img.shields.io/pypi/dm/prefect-client?color=0052FF&labelColor=090422" /></a>
38
+ <a href="https://github.com/prefecthq/prefect/pulse" alt="Activity">
39
+ <img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect?color=0052FF&labelColor=090422" /></a>
40
+ <br>
41
+ <a href="https://prefect.io/slack" alt="Slack">
42
+ <img src="https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack" /></a>
43
+ <a href="https://discourse.prefect.io/" alt="Discourse">
44
+ <img src="https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse" /></a>
45
+ <a href="https://www.youtube.com/c/PrefectIO/" alt="YouTube">
46
+ <img src="https://img.shields.io/badge/youtube-watch_videos-red.svg?color=0052FF&labelColor=090422&logo=youtube" /></a>
47
+ </p>
48
+
49
+ # prefect-client
50
+
51
+ The `prefect-client` package is a minimal-installation of `prefect` which is designed for interacting with Prefect Cloud
52
+ or remote any `prefect` server. It sheds some functionality and dependencies in exchange for a smaller installation size,
53
+ making it ideal for use in lightweight or ephemeral environments. These characteristics make it ideal for use in lambdas
54
+ or other resource-constrained environments.
55
+
56
+
57
+ ## Getting started
58
+
59
+ `prefect-client` shares the same installation requirements as prefect. To install, make sure you are on Python 3.9 or
60
+ later and run the following command:
61
+
62
+ ```bash
63
+ pip install prefect-client
64
+ ```
65
+
66
+ Next, ensure that your `prefect-client` has access to a remote `prefect` server by exporting the `PREFECT_API_KEY`
67
+ (if using Prefect Cloud) and `PREFECT_API_URL` environment variables. Once those are set, use the package in your code as
68
+ you would normally use `prefect`!
69
+
70
+
71
+ For example, to remotely trigger a run a deployment:
72
+
73
+ ```python
74
+ from prefect.deployments import run_deployment
75
+
76
+
77
+ def my_lambda(event):
78
+ ...
79
+ run_deployment(
80
+ name="my-flow/my-deployment",
81
+ parameters={"foo": "bar"},
82
+ timeout=0,
83
+ )
84
+
85
+ my_lambda({})
86
+ ```
87
+
88
+ To emit events in an event driven system:
89
+
90
+ ```python
91
+ from prefect.events import emit_event
92
+
93
+
94
+ def something_happened():
95
+ emit_event("my-event", resource={"prefect.resource.id": "foo.bar"})
96
+
97
+ something_happened()
98
+ ```
99
+
100
+
101
+ Or just interact with a `prefect` API:
102
+ ```python
103
+ from prefect.client.orchestration import get_client
104
+
105
+
106
+ async def query_api():
107
+ async with get_client() as client:
108
+ limits = await client.read_concurrency_limits(limit=10, offset=0)
109
+ print(limits)
110
+
111
+
112
+ query_api()
113
+ ```
114
+
115
+
116
+ ## Known limitations
117
+ By design, `prefect-client` omits all CLI and server components. This means that the CLI is not available for use
118
+ and attempts to access server objects will fail. Furthermore, some classes, methods, and objects may be available
119
+ for import in `prefect-client` but may not be "runnable" if they tap into server-oriented functionality. If you
120
+ encounter such a limitation, feel free to [open an issue](https://github.com/PrefectHQ/prefect/issues/new/choose)
121
+ describing the functionality you are interested in using and we will do our best to make it available.
122
+
123
+
124
+ ## Next steps
125
+
126
+ There's lots more you can do to orchestrate and observe your workflows with Prefect!
127
+ Start with our [friendly tutorial](https://docs.prefect.io/tutorials) or explore the [core concepts of Prefect workflows](https://docs.prefect.io/concepts/).
128
+
129
+ ## Join the community
130
+
131
+ Prefect is made possible by the fastest growing community of thousands of friendly data engineers. Join us in building a new kind of workflow system. The [Prefect Slack community](https://prefect.io/slack) is a fantastic place to learn more about Prefect, ask questions, or get help with workflow design. All community forums, including code contributions, issue discussions, and slack messages are subject to our [Code of Conduct](https://discourse.prefect.io/faq).
132
+
133
+ ## Contribute
134
+
135
+ See our [documentation on contributing to Prefect](https://docs.prefect.io/contributing/overview/).
136
+
137
+ Thanks for being part of the mission to build a new kind of workflow system and, of course, **happy engineering!**
138
+
139
+
@@ -20,24 +20,24 @@
20
20
 
21
21
  # prefect-client
22
22
 
23
- The `prefect-client` package is a minimal-installation of `prefect` which is designed for interacting with Prefect Cloud
24
- or remote any `prefect` server. It sheds some functionality and dependencies in exchange for a smaller installation size,
25
- making it ideal for use in lightweight or ephemeral environments. These characteristics make it ideal for use in lambdas
26
- or other resource-constrained environments.
23
+ The `prefect-client` package is a minimal-installation of `prefect` which is designed for interacting with Prefect Cloud
24
+ or remote any `prefect` server. It sheds some functionality and dependencies in exchange for a smaller installation size,
25
+ making it ideal for use in lightweight or ephemeral environments. These characteristics make it ideal for use in lambdas
26
+ or other resource-constrained environments.
27
27
 
28
28
 
29
29
  ## Getting started
30
30
 
31
- `prefect-client` shares the same installation requirements as prefect. To install, make sure you are on Python 3.8 or
31
+ `prefect-client` shares the same installation requirements as prefect. To install, make sure you are on Python 3.9 or
32
32
  later and run the following command:
33
33
 
34
34
  ```bash
35
35
  pip install prefect-client
36
36
  ```
37
37
 
38
- Next, ensure that your `prefect-client` has access to a remote `prefect` server by exporting the `PREFECT_API_KEY`
39
- (if using Prefect Cloud) and `PREFECT_API_URL` environment variables. Once those are set, use the package in your code as
40
- you would normally use `prefect`!
38
+ Next, ensure that your `prefect-client` has access to a remote `prefect` server by exporting the `PREFECT_API_KEY`
39
+ (if using Prefect Cloud) and `PREFECT_API_URL` environment variables. Once those are set, use the package in your code as
40
+ you would normally use `prefect`!
41
41
 
42
42
 
43
43
  For example, to remotely trigger a run a deployment:
@@ -86,10 +86,10 @@ query_api()
86
86
 
87
87
 
88
88
  ## Known limitations
89
- By design, `prefect-client` omits all CLI and server components. This means that the CLI is not available for use
90
- and attempts to access server objects will fail. Furthermore, some classes, methods, and objects may be available
91
- for import in `prefect-client` but may not be "runnable" if they tap into server-oriented functionality. If you
92
- encounter such a limitation, feel free to [open an issue](https://github.com/PrefectHQ/prefect/issues/new/choose)
89
+ By design, `prefect-client` omits all CLI and server components. This means that the CLI is not available for use
90
+ and attempts to access server objects will fail. Furthermore, some classes, methods, and objects may be available
91
+ for import in `prefect-client` but may not be "runnable" if they tap into server-oriented functionality. If you
92
+ encounter such a limitation, feel free to [open an issue](https://github.com/PrefectHQ/prefect/issues/new/choose)
93
93
  describing the functionality you are interested in using and we will do our best to make it available.
94
94
 
95
95
 
@@ -1,9 +1,11 @@
1
- anyio >= 3.7.1, < 4.0.0
1
+ anyio >= 4.0.0, < 5.0.0
2
2
  asgi-lifespan >= 1.0, < 3.0
3
3
  cachetools >= 5.3, < 6.0
4
4
  cloudpickle >= 2.0, < 4.0
5
5
  coolname >= 1.0.4, < 3.0.0
6
6
  croniter >= 1.0.12, < 3.0.0
7
+ exceptiongroup >= 1.0.0
8
+ fastapi >= 0.111.0, < 1.0.0
7
9
  fsspec >= 2022.5.0
8
10
  graphviz >= 0.20.1
9
11
  griffe >= 0.20.0
@@ -16,12 +18,12 @@ jsonschema >= 4.0.0, < 5.0.0
16
18
  orjson >= 3.7, < 4.0
17
19
  packaging >= 21.3, < 24.3
18
20
  pathspec >= 0.8.0
19
- # https://github.com/PrefectHQ/prefect/issues/11619
20
- pendulum < 3.0; python_version < '3.12'
21
- pendulum >= 3.0.0, <4; python_version >= '3.12'
22
- # the version constraints for pydantic are merged with those from fastapi 0.103.2
23
- pydantic[email]>=1.10.0,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0
21
+ pendulum >= 3.0.0, <4
22
+ # 2024/05/28: we had same as fastapi 0.103.2 -> pydantic 2.4 but for `Secret` we need 2.7
23
+ pydantic >= 2.7, < 3.0.0
24
24
  pydantic_core >= 2.12.0, < 3.0.0
25
+ pydantic_extra_types
26
+ pydantic_settings
25
27
  python_dateutil >= 2.8.2, < 3.0.0
26
28
  python-slugify >= 5.0, < 9.0
27
29
  pyyaml >= 5.4.1, < 7.0.0
@@ -33,8 +35,4 @@ toml >= 0.10.0
33
35
  typing_extensions >= 4.5.0, < 5.0.0
34
36
  ujson >= 5.8.0, < 6.0.0
35
37
  uvicorn >= 0.14.0, < 0.29.0
36
- websockets >= 10.4, < 13.0
37
-
38
- # additional dependencies of starlette, which we're currently vendoring
39
- itsdangerous
40
- python-multipart>=0.0.7
38
+ websockets >= 10.4, < 13.0
@@ -2,17 +2,13 @@ ruff
2
2
  cairosvg
3
3
  codespell>=2.2.6
4
4
  ddtrace
5
- # Pin IPython to 8.12 when building on Python 3.8
6
- # https://github.com/ipython/ipython/blob/main/README.rst
7
- ipython == 8.12.*; python_version == '3.8'
8
- ipython; python_version > '3.8'
5
+ ipython
9
6
  jinja2
10
7
  mkdocs
11
8
  mkdocs-gen-files
12
9
  mkdocs-material
13
10
  mkdocstrings-python
14
11
  mike
15
- mock; python_version < '3.8'
16
12
  moto >= 5
17
13
  mypy >= 1.9.0
18
14
  numpy
@@ -29,8 +25,8 @@ pytest-timeout
29
25
  pytest-xdist < 3.4.0 # 3.5.0 introduces some flakiness. Need to investigate and resolve.
30
26
  pytkdocs >= 0.14.2
31
27
  pyyaml
32
- requests<2.32.0 # `requests` renamed `get_connection` to `_get_connection`, which is a method docker-py monkeypatches. See https://github.com/docker/docker-py/issues/3256 Should be able to un-pin when docker-py hotfix is out.
33
- setuptools != 60.9.0; python_version < '3.8'
28
+ redis>=5.0.1
29
+ setuptools
34
30
  vermin
35
31
  virtualenv
36
32
  watchfiles
@@ -7,7 +7,7 @@ asyncpg >= 0.23
7
7
  click >= 8.0, < 8.2
8
8
  cryptography >= 36.0.1
9
9
  dateparser >= 1.1.1, < 2.0.0
10
- docker >= 4.0, < 7.0
10
+ docker >= 4.0
11
11
  graphviz >= 0.20.1
12
12
  griffe >= 0.20.0
13
13
  jinja2 >= 3.0.0, < 4.0.0
@@ -16,5 +16,5 @@ humanize >= 4.9.0
16
16
  kubernetes >= 24.2.0, < 30.0.0
17
17
  pytz >= 2021.1, < 2025
18
18
  readchar >= 4.0.0, < 5.0.0
19
- sqlalchemy[asyncio] >= 1.4.22, != 1.4.33, < 3.0.0
19
+ sqlalchemy[asyncio] >= 2.0, < 3.0.0
20
20
  typer >= 0.12.0, != 0.12.2, < 0.13.0
@@ -1,4 +1,5 @@
1
1
  [tool:pytest]
2
+ testpaths = tests
2
3
  addopts = -rfEs
3
4
  norecursedirs = *.egg-info .git .mypy_cache node_modules .pytest_cache .vscode
4
5
  python_files =
@@ -18,15 +19,9 @@ asyncio_mode = auto
18
19
  timeout = 90
19
20
  filterwarnings =
20
21
  error
22
+
21
23
  ignore::DeprecationWarning:tornado.platform.asyncio.*
22
24
  ignore::DeprecationWarning:tornado.ioloop
23
- ignore:Support for class-based `config` is deprecated
24
- ignore:The `__fields__` attribute is deprecated
25
- ignore:The private method `_iter` will be removed
26
- ignore:The `__fields_set__` attribute is deprecated, use `model_fields_set` instead
27
- ignore:`__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__`
28
- ignore:The `dict` method is deprecated; use `model_dump` instead
29
- ignore:The `schema` method is deprecated; use `model_json_schema` instead
30
25
  ignore:Default value default=
31
26
  ignore:Implicitly cleaning up:ResourceWarning
32
27
  ignore::ResourceWarning:distributed.diskutils
@@ -40,7 +35,6 @@ filterwarnings =
40
35
  ignore:the imp module is deprecated:DeprecationWarning
41
36
  ignore:distutils Version classes are deprecated:DeprecationWarning
42
37
  ignore:The distutils package is deprecated:DeprecationWarning
43
- ignore:Use setlocale:DeprecationWarning
44
38
  ignore:Skipped unsupported reflection of expression-based index:sqlalchemy.exc.SAWarning
45
39
  ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning
46
40
  ignore:Prefect will drop support for Python 3.7:FutureWarning
@@ -63,11 +57,11 @@ follow_imports = skip
63
57
  ignore_missing_imports = True
64
58
 
65
59
  [versioneer]
66
- vcs = git
60
+ VCS = git
67
61
  style = pep440
68
62
  versionfile_source = src/prefect/_version.py
69
63
  versionfile_build = prefect/_version.py
70
- version_regex = ^(\d+\.\d+\.\d+)$
64
+ version_regex = ^(\d+\.\d+\.\d+(?:[a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)*)?)$
71
65
  tag_prefix =
72
66
  parentdir_prefix =
73
67
 
@@ -88,8 +82,8 @@ backports =
88
82
  format = parsable
89
83
  eval_annotations = yes
90
84
  only_show_violations = yes
91
- targets = 3.8-
92
- exclusion_regex = ^src/prefect/_vendor/.*$|^src/prefect/utilities/compat\.py$
85
+ targets = 3.9-
86
+ exclusion_regex = ^src/prefect/_vendor/.*$|^src/prefect/utilities/compat\.py$|^tests/workers/test_process_worker.py$|^tests/test_background_tasks.py$|^src/integrations/.*/tests/.*$
93
87
 
94
88
  [egg_info]
95
89
  tag_build =
@@ -29,7 +29,7 @@ setup(
29
29
  package_dir={"": "src"},
30
30
  include_package_data=True,
31
31
  # Requirements
32
- python_requires=">=3.8",
32
+ python_requires=">=3.9",
33
33
  install_requires=install_requires,
34
34
  extras_require={"notifications": ["apprise>=1.1.0, <2.0.0"]},
35
35
  classifiers=[
@@ -38,10 +38,10 @@ setup(
38
38
  "Intended Audience :: System Administrators",
39
39
  "License :: OSI Approved :: Apache Software License",
40
40
  "Programming Language :: Python :: 3 :: Only",
41
- "Programming Language :: Python :: 3.8",
42
41
  "Programming Language :: Python :: 3.9",
43
42
  "Programming Language :: Python :: 3.10",
44
43
  "Programming Language :: Python :: 3.11",
44
+ "Programming Language :: Python :: 3.12",
45
45
  "Topic :: Software Development :: Libraries",
46
46
  ],
47
47
  )
@@ -5,8 +5,6 @@
5
5
  from . import _version
6
6
  import importlib
7
7
  import pathlib
8
- import warnings
9
- import sys
10
8
 
11
9
  __version_info__ = _version.get_versions()
12
10
  __version__ = __version_info__["version"]
@@ -31,12 +29,13 @@ from prefect.deployments import deploy
31
29
  from prefect.states import State
32
30
  from prefect.logging import get_run_logger
33
31
  from prefect.flows import flow, Flow, serve
32
+ from prefect.transactions import Transaction
34
33
  from prefect.tasks import task, Task
35
34
  from prefect.context import tags
36
35
  from prefect.manifests import Manifest
37
36
  from prefect.utilities.annotations import unmapped, allow_failure
38
37
  from prefect.results import BaseResult
39
- from prefect.engine import pause_flow_run, resume_flow_run, suspend_flow_run
38
+ from prefect.flow_runs import pause_flow_run, resume_flow_run, suspend_flow_run
40
39
  from prefect.client.orchestration import get_client, PrefectClient
41
40
  from prefect.client.cloud import get_cloud_client, CloudClient
42
41
  import prefect.variables
@@ -44,14 +43,9 @@ import prefect.runtime
44
43
 
45
44
  # Import modules that register types
46
45
  import prefect.serializers
47
- import prefect.deprecated.data_documents
48
- import prefect.deprecated.packaging
49
46
  import prefect.blocks.kubernetes
50
47
  import prefect.blocks.notifications
51
48
  import prefect.blocks.system
52
- import prefect.infrastructure.process
53
- import prefect.infrastructure.kubernetes
54
- import prefect.infrastructure.container
55
49
 
56
50
  # Initialize the process-wide profile and registry at import time
57
51
  import prefect.context
@@ -61,14 +55,11 @@ prefect.context.initialize_object_registry()
61
55
  # Perform any forward-ref updates needed for Pydantic models
62
56
  import prefect.client.schemas
63
57
 
64
- prefect.context.FlowRunContext.update_forward_refs(Flow=Flow)
65
- prefect.context.TaskRunContext.update_forward_refs(Task=Task)
66
- prefect.client.schemas.State.update_forward_refs(
67
- BaseResult=BaseResult, DataDocument=prefect.deprecated.data_documents.DataDocument
68
- )
69
- prefect.client.schemas.StateCreate.update_forward_refs(
70
- BaseResult=BaseResult, DataDocument=prefect.deprecated.data_documents.DataDocument
71
- )
58
+ prefect.context.FlowRunContext.model_rebuild()
59
+ prefect.context.TaskRunContext.model_rebuild()
60
+ prefect.client.schemas.State.model_rebuild()
61
+ prefect.client.schemas.StateCreate.model_rebuild()
62
+ Transaction.model_rebuild()
72
63
 
73
64
 
74
65
  prefect.plugins.load_extra_entrypoints()
@@ -82,57 +73,17 @@ prefect.logging.get_logger("profiles").debug(
82
73
  )
83
74
 
84
75
  # Ensure moved names are accessible at old locations
85
- import prefect.client
86
-
87
76
  prefect.client.get_client = get_client
88
77
  prefect.client.PrefectClient = PrefectClient
89
78
 
90
79
 
91
80
  from prefect._internal.compatibility.deprecated import (
92
81
  inject_renamed_module_alias_finder,
93
- register_renamed_module,
94
82
  )
95
83
 
96
- register_renamed_module(
97
- "prefect.packaging", "prefect.deprecated.packaging", start_date="Mar 2024"
98
- )
99
84
  inject_renamed_module_alias_finder()
100
85
 
101
86
 
102
- # Attempt to warn users who are importing Prefect 1.x attributes that they may
103
- # have accidentally installed Prefect 2.x
104
-
105
- PREFECT_1_ATTRIBUTES = [
106
- "prefect.Client",
107
- "prefect.Parameter",
108
- "prefect.api",
109
- "prefect.apply_map",
110
- "prefect.case",
111
- "prefect.config",
112
- "prefect.context",
113
- "prefect.flatten",
114
- "prefect.mapped",
115
- "prefect.models",
116
- "prefect.resource_manager",
117
- ]
118
-
119
-
120
- class Prefect1ImportInterceptor(importlib.abc.Loader):
121
- def find_spec(self, fullname, path, target=None):
122
- if fullname in PREFECT_1_ATTRIBUTES:
123
- warnings.warn(
124
- f"Attempted import of {fullname!r}, which is part of Prefect 1.x, while"
125
- f" Prefect {__version__} is installed. If you're upgrading you'll need"
126
- " to update your code, see the Prefect 2.x migration guide:"
127
- " `https://orion-docs.prefect.io/migration_guide/`. Otherwise ensure"
128
- " that your code is pinned to the expected version."
129
- )
130
-
131
-
132
- if not hasattr(sys, "frozen"):
133
- sys.meta_path.insert(0, Prefect1ImportInterceptor())
134
-
135
-
136
87
  # Declare API for type-checkers
137
88
  __all__ = [
138
89
  "allow_failure",
@@ -145,6 +96,7 @@ __all__ = [
145
96
  "tags",
146
97
  "task",
147
98
  "Task",
99
+ "Transaction",
148
100
  "unmapped",
149
101
  "serve",
150
102
  "deploy",
@@ -9,21 +9,14 @@ Deprecated items require a start or end date. If a start date is given, the end
9
9
  will be calculated 6 months later. Start and end dates are always in the format MMM YYYY
10
10
  e.g. Jan 2023.
11
11
  """
12
+
12
13
  import functools
13
14
  import sys
14
15
  import warnings
15
- from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union
16
+ from typing import Any, Callable, List, Optional, Type, TypeVar
16
17
 
17
18
  import pendulum
18
-
19
- from prefect._internal.pydantic import HAS_PYDANTIC_V2
20
-
21
- if HAS_PYDANTIC_V2:
22
- from pydantic.v1 import BaseModel, Field, root_validator
23
- from pydantic.v1.schema import default_ref_template
24
- else:
25
- from pydantic import BaseModel, Field, root_validator
26
- from pydantic.schema import default_ref_template
19
+ from pydantic import BaseModel
27
20
 
28
21
  from prefect.utilities.callables import get_call_parameters
29
22
  from prefect.utilities.importtools import (
@@ -237,9 +230,10 @@ def deprecated_field(
237
230
 
238
231
  cls_init(__pydantic_self__, **data)
239
232
 
240
- field = __pydantic_self__.__fields__.get(name)
233
+ field = __pydantic_self__.model_fields.get(name)
241
234
  if field is not None:
242
- field.field_info.extra["deprecated"] = True
235
+ field.json_schema_extra = field.json_schema_extra or {}
236
+ field.json_schema_extra["deprecated"] = True
243
237
 
244
238
  # Patch the model's init method
245
239
  model_cls.__init__ = __init__
@@ -278,106 +272,3 @@ def register_renamed_module(old_name: str, new_name: str, start_date: str):
278
272
  DEPRECATED_MODULE_ALIASES.append(
279
273
  AliasedModuleDefinition(old_name, new_name, callback)
280
274
  )
281
-
282
-
283
- class DeprecatedInfraOverridesField(BaseModel):
284
- """
285
- A model mixin that handles the deprecated `infra_overrides` field.
286
-
287
- The `infra_overrides` field has been renamed to `job_variables`. This mixin maintains
288
- backwards compatibility with users of the `infra_overrides` field while presenting
289
- `job_variables` as the user-facing field.
290
-
291
- When we remove support for `infra_overrides`, we can remove this class as a parent of
292
- all schemas that use it, leaving them with only the `job_variables` field.
293
- """
294
-
295
- infra_overrides: Optional[Dict[str, Any]] = Field(
296
- default_factory=dict,
297
- description="Deprecated field. Use `job_variables` instead.",
298
- )
299
-
300
- @root_validator(pre=True)
301
- def _job_variables_from_infra_overrides(
302
- cls, values: Dict[str, Any]
303
- ) -> Dict[str, Any]:
304
- """
305
- Validate that only one of `infra_overrides` or `job_variables` is used
306
- and keep them in sync during init.
307
- """
308
- job_variables = values.get("job_variables")
309
- infra_overrides = values.get("infra_overrides")
310
-
311
- if job_variables is not None and infra_overrides is not None:
312
- if job_variables != infra_overrides:
313
- raise ValueError(
314
- "The `infra_overrides` field has been renamed to `job_variables`."
315
- "Use one of these fields, but not both."
316
- )
317
- return values
318
- elif job_variables is not None and infra_overrides is None:
319
- values["infra_overrides"] = job_variables
320
- elif job_variables is None and infra_overrides is not None:
321
- values["job_variables"] = infra_overrides
322
- return values
323
-
324
- def __setattr__(self, key: str, value: Any) -> None:
325
- """
326
- Override the default __setattr__ to ensure that setting `infra_overrides` or
327
- `job_variables` will update both fields.
328
- """
329
- if key == "infra_overrides" or key == "job_variables":
330
- updates = {"infra_overrides": value, "job_variables": value}
331
- self.__dict__.update(updates)
332
- return
333
- super().__setattr__(key, value)
334
-
335
- def dict(self, **kwargs) -> Dict[str, Any]:
336
- """
337
- Override the default dict method to ensure only `infra_overrides` is serialized.
338
- This preserves backwards compatibility for newer clients talking to older servers.
339
- """
340
- exclude: Union[set, Dict[str, Any]] = kwargs.pop("exclude", set())
341
- exclude_type = type(exclude)
342
-
343
- if exclude_type is set:
344
- exclude.add("job_variables")
345
- elif exclude_type is dict:
346
- exclude["job_variables"] = True
347
- else:
348
- exclude = {"job_variables"}
349
- kwargs["exclude"] = exclude
350
-
351
- return super().dict(**kwargs)
352
-
353
- @classmethod
354
- def schema(
355
- cls, by_alias: bool = True, ref_template: str = default_ref_template
356
- ) -> Dict[str, Any]:
357
- """
358
- Don't use the mixin docstring as the description if this class is missing a
359
- docstring.
360
- """
361
- schema = super().schema(by_alias=by_alias, ref_template=ref_template)
362
-
363
- if not cls.__doc__:
364
- schema.pop("description", None)
365
-
366
- return schema
367
-
368
-
369
- def handle_deprecated_infra_overrides_parameter(
370
- job_variables: Dict[str, Any], infra_overrides: Dict[str, Any]
371
- ) -> Optional[Dict[str, Any]]:
372
- if infra_overrides is not None and job_variables is not None:
373
- raise RuntimeError(
374
- "The `infra_overrides` argument has been renamed to `job_variables`."
375
- "Use one or the other, but not both."
376
- )
377
- elif infra_overrides is not None and job_variables is None:
378
- jv = infra_overrides
379
- elif job_variables is not None and infra_overrides is None:
380
- jv = job_variables
381
- else:
382
- jv = None
383
- return jv