prefect-client 3.0.4__tar.gz → 3.0.6__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 (217) hide show
  1. {prefect-client-3.0.4/src/prefect_client.egg-info → prefect-client-3.0.6}/PKG-INFO +1 -1
  2. {prefect-client-3.0.4 → prefect-client-3.0.6}/setup.cfg +2 -1
  3. {prefect-client-3.0.4 → prefect-client-3.0.6}/setup.py +2 -5
  4. prefect-client-3.0.6/src/prefect/_version.py +21 -0
  5. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/cache_policies.py +1 -1
  6. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/orchestration.py +30 -2
  7. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/schemas/objects.py +5 -1
  8. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/context.py +11 -19
  9. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/flow_runs.py +8 -0
  10. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/exceptions.py +22 -3
  11. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/flow_engine.py +10 -7
  12. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/flows.py +1 -1
  13. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/futures.py +13 -13
  14. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/logging/configuration.py +4 -8
  15. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/logging/handlers.py +3 -4
  16. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/results.py +1 -1
  17. prefect-client-3.0.6/src/prefect/settings.py +2106 -0
  18. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/task_engine.py +2 -2
  19. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/task_runners.py +2 -2
  20. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/transactions.py +7 -4
  21. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/types/__init__.py +51 -1
  22. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/dockerutils.py +3 -2
  23. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/pydantic.py +2 -1
  24. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/text.py +13 -1
  25. {prefect-client-3.0.4 → prefect-client-3.0.6/src/prefect_client.egg-info}/PKG-INFO +1 -1
  26. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect_client.egg-info/SOURCES.txt +0 -1
  27. prefect-client-3.0.4/src/prefect/_internal/compatibility/experimental.py +0 -195
  28. prefect-client-3.0.4/src/prefect/_version.py +0 -716
  29. prefect-client-3.0.4/src/prefect/settings.py +0 -2330
  30. {prefect-client-3.0.4 → prefect-client-3.0.6}/LICENSE +0 -0
  31. {prefect-client-3.0.4 → prefect-client-3.0.6}/MANIFEST.in +0 -0
  32. {prefect-client-3.0.4 → prefect-client-3.0.6}/README.md +0 -0
  33. {prefect-client-3.0.4 → prefect-client-3.0.6}/requirements-client.txt +0 -0
  34. {prefect-client-3.0.4 → prefect-client-3.0.6}/requirements-dev.txt +0 -0
  35. {prefect-client-3.0.4 → prefect-client-3.0.6}/requirements.txt +0 -0
  36. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/.prefectignore +0 -0
  37. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/__init__.py +0 -0
  38. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/__init__.py +0 -0
  39. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/_logging.py +0 -0
  40. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/compatibility/__init__.py +0 -0
  41. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/compatibility/deprecated.py +0 -0
  42. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/compatibility/migration.py +0 -0
  43. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/__init__.py +0 -0
  44. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/api.py +0 -0
  45. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/calls.py +0 -0
  46. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  47. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  48. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/inspection.py +0 -0
  49. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/primitives.py +0 -0
  50. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/services.py +0 -0
  51. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/threads.py +0 -0
  52. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/concurrency/waiters.py +0 -0
  53. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/integrations.py +0 -0
  54. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/pydantic/__init__.py +0 -0
  55. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
  56. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
  57. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/pydantic/schemas.py +0 -0
  58. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
  59. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  60. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  61. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/pytz.py +0 -0
  62. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/retries.py +0 -0
  63. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/schemas/__init__.py +0 -0
  64. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/schemas/bases.py +0 -0
  65. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/schemas/fields.py +0 -0
  66. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/schemas/serializers.py +0 -0
  67. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/_internal/schemas/validators.py +0 -0
  68. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/agent.py +0 -0
  69. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/artifacts.py +0 -0
  70. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/automations.py +0 -0
  71. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/blocks/__init__.py +0 -0
  72. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/blocks/abstract.py +0 -0
  73. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/blocks/core.py +0 -0
  74. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/blocks/fields.py +0 -0
  75. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/blocks/notifications.py +0 -0
  76. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/blocks/redis.py +0 -0
  77. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/blocks/system.py +0 -0
  78. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/blocks/webhook.py +0 -0
  79. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/__init__.py +0 -0
  80. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/base.py +0 -0
  81. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/cloud.py +0 -0
  82. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/collections.py +0 -0
  83. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/constants.py +0 -0
  84. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/schemas/__init__.py +0 -0
  85. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/schemas/actions.py +0 -0
  86. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/schemas/filters.py +0 -0
  87. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/schemas/responses.py +0 -0
  88. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/schemas/schedules.py +0 -0
  89. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/schemas/sorting.py +0 -0
  90. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/subscriptions.py +0 -0
  91. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/types/__init__.py +0 -0
  92. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/types/flexible_schedule_list.py +0 -0
  93. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/client/utilities.py +0 -0
  94. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/__init__.py +0 -0
  95. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/asyncio.py +0 -0
  96. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/context.py +0 -0
  97. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/events.py +0 -0
  98. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/services.py +0 -0
  99. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/sync.py +0 -0
  100. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/v1/__init__.py +0 -0
  101. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/v1/asyncio.py +0 -0
  102. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/v1/context.py +0 -0
  103. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/v1/events.py +0 -0
  104. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/v1/services.py +0 -0
  105. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/concurrency/v1/sync.py +0 -0
  106. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/__init__.py +0 -0
  107. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/base.py +0 -0
  108. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/deployments.py +0 -0
  109. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/runner.py +0 -0
  110. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/schedules.py +0 -0
  111. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/steps/__init__.py +0 -0
  112. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/steps/core.py +0 -0
  113. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/steps/pull.py +0 -0
  114. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/deployments/steps/utility.py +0 -0
  115. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/docker/__init__.py +0 -0
  116. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/docker/docker_image.py +0 -0
  117. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/engine.py +0 -0
  118. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/__init__.py +0 -0
  119. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/actions.py +0 -0
  120. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/cli/__init__.py +0 -0
  121. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/cli/automations.py +0 -0
  122. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/clients.py +0 -0
  123. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/filters.py +0 -0
  124. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/related.py +0 -0
  125. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/schemas/__init__.py +0 -0
  126. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/schemas/automations.py +0 -0
  127. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/schemas/deployment_triggers.py +0 -0
  128. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/schemas/events.py +0 -0
  129. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/schemas/labelling.py +0 -0
  130. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/utilities.py +0 -0
  131. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/events/worker.py +0 -0
  132. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/filesystems.py +0 -0
  133. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/flow_runs.py +0 -0
  134. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/infrastructure/__init__.py +0 -0
  135. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/infrastructure/base.py +0 -0
  136. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
  137. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
  138. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
  139. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
  140. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/infrastructure/provisioners/modal.py +0 -0
  141. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/input/__init__.py +0 -0
  142. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/input/actions.py +0 -0
  143. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/input/run_input.py +0 -0
  144. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/locking/__init__.py +0 -0
  145. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/locking/filesystem.py +0 -0
  146. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/locking/memory.py +0 -0
  147. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/locking/protocol.py +0 -0
  148. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/logging/__init__.py +0 -0
  149. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/logging/filters.py +0 -0
  150. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/logging/formatters.py +0 -0
  151. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/logging/highlighters.py +0 -0
  152. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/logging/loggers.py +0 -0
  153. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/logging/logging.yml +0 -0
  154. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/main.py +0 -0
  155. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/plugins.py +0 -0
  156. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/profiles.toml +0 -0
  157. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/py.typed +0 -0
  158. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/records/__init__.py +0 -0
  159. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/records/base.py +0 -0
  160. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/records/filesystem.py +0 -0
  161. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/records/memory.py +0 -0
  162. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/records/result_store.py +0 -0
  163. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runner/__init__.py +0 -0
  164. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runner/runner.py +0 -0
  165. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runner/server.py +0 -0
  166. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runner/storage.py +0 -0
  167. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runner/submit.py +0 -0
  168. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runner/utils.py +0 -0
  169. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runtime/__init__.py +0 -0
  170. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runtime/deployment.py +0 -0
  171. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runtime/flow_run.py +0 -0
  172. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/runtime/task_run.py +0 -0
  173. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/serializers.py +0 -0
  174. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
  175. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  176. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/states.py +0 -0
  177. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/task_runs.py +0 -0
  178. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/task_worker.py +0 -0
  179. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/tasks.py +0 -0
  180. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/types/entrypoint.py +0 -0
  181. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/__init__.py +0 -0
  182. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/annotations.py +0 -0
  183. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/asyncutils.py +0 -0
  184. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/callables.py +0 -0
  185. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/collections.py +0 -0
  186. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/compat.py +0 -0
  187. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/context.py +0 -0
  188. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/dispatch.py +0 -0
  189. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/engine.py +0 -0
  190. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/filesystem.py +0 -0
  191. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/hashing.py +0 -0
  192. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/importtools.py +0 -0
  193. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/math.py +0 -0
  194. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/names.py +0 -0
  195. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/processutils.py +0 -0
  196. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/render_swagger.py +0 -0
  197. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  198. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/schema_tools/hydration.py +0 -0
  199. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/schema_tools/validation.py +0 -0
  200. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/services.py +0 -0
  201. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/slugify.py +0 -0
  202. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/templating.py +0 -0
  203. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/timeout.py +0 -0
  204. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/urls.py +0 -0
  205. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/utilities/visualization.py +0 -0
  206. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/variables.py +0 -0
  207. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/workers/__init__.py +0 -0
  208. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/workers/base.py +0 -0
  209. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/workers/block.py +0 -0
  210. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/workers/cloud.py +0 -0
  211. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/workers/process.py +0 -0
  212. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/workers/server.py +0 -0
  213. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect/workers/utilities.py +0 -0
  214. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect_client.egg-info/dependency_links.txt +0 -0
  215. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect_client.egg-info/requires.txt +0 -0
  216. {prefect-client-3.0.4 → prefect-client-3.0.6}/src/prefect_client.egg-info/top_level.txt +0 -0
  217. {prefect-client-3.0.4 → prefect-client-3.0.6}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 3.0.4
3
+ Version: 3.0.6
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -14,6 +14,7 @@ markers =
14
14
  clear_db: marker to clear the database after test completion
15
15
  env =
16
16
  PREFECT_TEST_MODE = 1
17
+ PREFECT_UNIT_TEST_MODE = 1
17
18
  PREFECT_LOGGING_SERVER_LEVEL = DEBUG
18
19
  asyncio_mode = auto
19
20
  asyncio_default_fixture_loop_scope = session
@@ -56,7 +57,7 @@ ignore_missing_imports = True
56
57
 
57
58
  [versioneer]
58
59
  VCS = git
59
- style = pep440
60
+ style = pep440-pre
60
61
  versionfile_source = src/prefect/_version.py
61
62
  versionfile_build = prefect/_version.py
62
63
  version_regex = ^(\d+\.\d+\.\d+(?:[a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)*)?)$
@@ -3,10 +3,6 @@ from setuptools import find_packages, setup
3
3
 
4
4
  install_requires = open("requirements-client.txt").read().strip().split("\n")
5
5
 
6
- # grab and use the first three version digits (the generated tag)
7
- _version = versioneer.get_version().split(".")
8
- client_version = ".".join(_version[:3]).split("+")[0]
9
-
10
6
  setup(
11
7
  # Package metadata
12
8
  name="prefect-client",
@@ -23,7 +19,8 @@ setup(
23
19
  long_description=open("README.md").read(),
24
20
  long_description_content_type="text/markdown",
25
21
  # Versioning
26
- version=client_version,
22
+ version=versioneer.get_version(),
23
+ cmdclass=versioneer.get_cmdclass(),
27
24
  # Package setup
28
25
  packages=find_packages(where="src"),
29
26
  package_dir={"": "src"},
@@ -0,0 +1,21 @@
1
+
2
+ # This file was generated by 'versioneer.py' (0.29) from
3
+ # revision-control system data, or from the parent directory name of an
4
+ # unpacked source archive. Distribution tarballs contain a pre-generated copy
5
+ # of this file.
6
+
7
+ import json
8
+
9
+ version_json = '''
10
+ {
11
+ "date": "2024-10-09T14:11:05-0400",
12
+ "dirty": true,
13
+ "error": null,
14
+ "full-revisionid": "aa5171d6067327a5390b820f414341b0a25df7e8",
15
+ "version": "3.0.6"
16
+ }
17
+ ''' # END VERSION_JSON
18
+
19
+
20
+ def get_versions():
21
+ return json.loads(version_json)
@@ -219,7 +219,7 @@ class TaskSource(CachePolicy):
219
219
  except TypeError:
220
220
  lines = inspect.getsource(task_ctx.task.fn.__class__)
221
221
  except OSError as exc:
222
- if "could not get source code" in str(exc):
222
+ if "source code" in str(exc):
223
223
  lines = task_ctx.task.fn.__code__.co_code
224
224
  else:
225
225
  raise
@@ -1813,7 +1813,35 @@ class PrefectClient:
1813
1813
  response = await self._client.get(f"/deployments/name/{name}")
1814
1814
  except httpx.HTTPStatusError as e:
1815
1815
  if e.response.status_code == status.HTTP_404_NOT_FOUND:
1816
- raise prefect.exceptions.ObjectNotFound(http_exc=e) from e
1816
+ from prefect.utilities.text import fuzzy_match_string
1817
+
1818
+ deployments = await self.read_deployments()
1819
+ flow_name_map = {
1820
+ flow.id: flow.name
1821
+ for flow in await asyncio.gather(
1822
+ *[
1823
+ self.read_flow(flow_id)
1824
+ for flow_id in {d.flow_id for d in deployments}
1825
+ ]
1826
+ )
1827
+ }
1828
+
1829
+ raise prefect.exceptions.ObjectNotFound(
1830
+ http_exc=e,
1831
+ help_message=(
1832
+ f"Deployment {name!r} not found; did you mean {fuzzy_match!r}?"
1833
+ if (
1834
+ fuzzy_match := fuzzy_match_string(
1835
+ name,
1836
+ [
1837
+ f"{flow_name_map[d.flow_id]}/{d.name}"
1838
+ for d in deployments
1839
+ ],
1840
+ )
1841
+ )
1842
+ else f"Deployment {name!r} not found. Try `prefect deployment ls` to find available deployments."
1843
+ ),
1844
+ ) from e
1817
1845
  else:
1818
1846
  raise
1819
1847
 
@@ -2543,7 +2571,7 @@ class PrefectClient:
2543
2571
 
2544
2572
  async def read_logs(
2545
2573
  self,
2546
- log_filter: LogFilter = None,
2574
+ log_filter: Optional[LogFilter] = None,
2547
2575
  limit: Optional[int] = None,
2548
2576
  offset: Optional[int] = None,
2549
2577
  sort: LogSort = LogSort.TIMESTAMP_ASC,
@@ -327,7 +327,11 @@ class State(ObjectBaseModel, Generic[R]):
327
327
  results should be sent to the API. Other data is only available locally.
328
328
  """
329
329
  from prefect.client.schemas.actions import StateCreate
330
- from prefect.results import BaseResult, ResultRecord, should_persist_result
330
+ from prefect.results import (
331
+ BaseResult,
332
+ ResultRecord,
333
+ should_persist_result,
334
+ )
331
335
 
332
336
  if isinstance(self.data, BaseResult):
333
337
  data = self.data
@@ -11,7 +11,6 @@ import sys
11
11
  import warnings
12
12
  from contextlib import ExitStack, asynccontextmanager, contextmanager
13
13
  from contextvars import ContextVar, Token
14
- from pathlib import Path
15
14
  from typing import (
16
15
  TYPE_CHECKING,
17
16
  Any,
@@ -40,7 +39,7 @@ from prefect.client.schemas import FlowRun, TaskRun
40
39
  from prefect.events.worker import EventsWorker
41
40
  from prefect.exceptions import MissingContextError
42
41
  from prefect.results import ResultStore, get_default_persist_setting
43
- from prefect.settings import PREFECT_HOME, Profile, Settings
42
+ from prefect.settings import Profile, Settings
44
43
  from prefect.states import State
45
44
  from prefect.task_runners import TaskRunner
46
45
  from prefect.utilities.services import start_client_metrics_server
@@ -166,11 +165,13 @@ class ContextModel(BaseModel):
166
165
  new._token = None
167
166
  return new
168
167
 
169
- def serialize(self) -> Dict[str, Any]:
168
+ def serialize(self, include_secrets: bool = True) -> Dict[str, Any]:
170
169
  """
171
170
  Serialize the context model to a dictionary that can be pickled with cloudpickle.
172
171
  """
173
- return self.model_dump(exclude_unset=True)
172
+ return self.model_dump(
173
+ exclude_unset=True, context={"include_secrets": include_secrets}
174
+ )
174
175
 
175
176
 
176
177
  class SyncClientContext(ContextModel):
@@ -430,7 +431,7 @@ class TagsContext(ContextModel):
430
431
  # Return an empty `TagsContext` instead of `None` if no context exists
431
432
  return cls.__var__.get(TagsContext())
432
433
 
433
- __var__ = ContextVar("tags")
434
+ __var__: ContextVar = ContextVar("tags")
434
435
 
435
436
 
436
437
  class SettingsContext(ContextModel):
@@ -447,7 +448,7 @@ class SettingsContext(ContextModel):
447
448
  profile: Profile
448
449
  settings: Settings
449
450
 
450
- __var__ = ContextVar("settings")
451
+ __var__: ContextVar = ContextVar("settings")
451
452
 
452
453
  def __hash__(self) -> int:
453
454
  return hash(self.settings)
@@ -459,14 +460,11 @@ class SettingsContext(ContextModel):
459
460
  return_value = super().__enter__()
460
461
 
461
462
  try:
462
- prefect_home = Path(self.settings.value_of(PREFECT_HOME))
463
+ prefect_home = self.settings.home
463
464
  prefect_home.mkdir(mode=0o0700, exist_ok=True)
464
465
  except OSError:
465
466
  warnings.warn(
466
- (
467
- "Failed to create the Prefect home directory at "
468
- f"{self.settings.value_of(PREFECT_HOME)}"
469
- ),
467
+ (f"Failed to create the Prefect home directory at {prefect_home}"),
470
468
  stacklevel=2,
471
469
  )
472
470
 
@@ -609,12 +607,11 @@ def use_profile(
609
607
 
610
608
  # Create a copy of the profiles settings as we will mutate it
611
609
  profile_settings = profile.settings.copy()
612
-
613
610
  existing_context = SettingsContext.get()
614
611
  if existing_context and include_current_context:
615
612
  settings = existing_context.settings
616
613
  else:
617
- settings = prefect.settings.get_settings_from_env()
614
+ settings = Settings()
618
615
 
619
616
  if not override_environment_variables:
620
617
  for key in os.environ:
@@ -662,12 +659,7 @@ def root_settings_context():
662
659
  )
663
660
  active_name = "ephemeral"
664
661
 
665
- with use_profile(
666
- profiles[active_name],
667
- # Override environment variables if the profile was set by the CLI
668
- override_environment_variables=profile_source == "by command line argument",
669
- ) as settings_context:
670
- return settings_context
662
+ return SettingsContext(profile=profiles[active_name], settings=Settings())
671
663
 
672
664
  # Note the above context is exited and the global settings context is used by
673
665
  # an override in the `SettingsContext.get` method.
@@ -5,10 +5,12 @@ from uuid import UUID
5
5
  import anyio
6
6
  import pendulum
7
7
 
8
+ import prefect
8
9
  from prefect.client.schemas import FlowRun
9
10
  from prefect.client.utilities import inject_client
10
11
  from prefect.context import FlowRunContext, TaskRunContext
11
12
  from prefect.logging import get_logger
13
+ from prefect.results import BaseResult, ResultRecordMetadata
12
14
  from prefect.states import Pending, Scheduled
13
15
  from prefect.tasks import Task
14
16
  from prefect.utilities.asyncutils import sync_compatible
@@ -18,6 +20,12 @@ if TYPE_CHECKING:
18
20
  from prefect.client.orchestration import PrefectClient
19
21
  from prefect.client.schemas.objects import FlowRun
20
22
 
23
+ prefect.client.schemas.StateCreate.model_rebuild(
24
+ _types_namespace={
25
+ "BaseResult": BaseResult,
26
+ "ResultRecordMetadata": ResultRecordMetadata,
27
+ }
28
+ )
21
29
 
22
30
  logger = get_logger(__name__)
23
31
 
@@ -5,7 +5,7 @@ Prefect-specific exceptions.
5
5
  import inspect
6
6
  import traceback
7
7
  from types import ModuleType, TracebackType
8
- from typing import Callable, Dict, Iterable, List, Optional, Type
8
+ from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type
9
9
 
10
10
  from httpx._exceptions import HTTPStatusError
11
11
  from pydantic import ValidationError
@@ -227,9 +227,19 @@ class ObjectNotFound(PrefectException):
227
227
  Raised when the client receives a 404 (not found) from the API.
228
228
  """
229
229
 
230
- def __init__(self, http_exc: Exception, *args, **kwargs):
230
+ def __init__(
231
+ self,
232
+ http_exc: Exception,
233
+ help_message: Optional[str] = None,
234
+ *args,
235
+ **kwargs,
236
+ ):
231
237
  self.http_exc = http_exc
232
- super().__init__(*args, **kwargs)
238
+ self.help_message = help_message
239
+ super().__init__(help_message, *args, **kwargs)
240
+
241
+ def __str__(self):
242
+ return self.help_message or super().__str__()
233
243
 
234
244
 
235
245
  class ObjectAlreadyExists(PrefectException):
@@ -424,3 +434,12 @@ class ConfigurationError(PrefectException):
424
434
  """
425
435
  Raised when a configuration is invalid.
426
436
  """
437
+
438
+
439
+ class ProfileSettingsValidationError(PrefectException):
440
+ """
441
+ Raised when a profile settings are invalid.
442
+ """
443
+
444
+ def __init__(self, errors: List[Tuple[Any, ValidationError]]) -> None:
445
+ self.errors = errors
@@ -290,13 +290,16 @@ class FlowRunEngine(Generic[P, R]):
290
290
  result_store: Optional[ResultStore] = None,
291
291
  ) -> State:
292
292
  context = FlowRunContext.get()
293
- terminal_state = run_coro_as_sync(
294
- exception_to_failed_state(
295
- exc,
296
- message=msg or "Flow run encountered an exception:",
297
- result_store=result_store or getattr(context, "result_store", None),
298
- write_result=True,
299
- )
293
+ terminal_state = cast(
294
+ State,
295
+ run_coro_as_sync(
296
+ exception_to_failed_state(
297
+ exc,
298
+ message=msg or "Flow run encountered an exception:",
299
+ result_store=result_store or getattr(context, "result_store", None),
300
+ write_result=True,
301
+ )
302
+ ),
300
303
  )
301
304
  state = self.set_state(terminal_state)
302
305
  if self.state.is_scheduled():
@@ -593,7 +593,7 @@ class Flow(Generic[P, R]):
593
593
  # Get the updated parameter dict with cast values from the model
594
594
  cast_parameters = {
595
595
  k: v
596
- for k, v in dict(model).items()
596
+ for k, v in model.__dict__.items()
597
597
  if k in model.model_fields_set or model.model_fields[k].default_factory
598
598
  }
599
599
  return cast_parameters
@@ -116,7 +116,7 @@ class PrefectWrappedFuture(PrefectFuture, abc.ABC, Generic[R, F]):
116
116
  """The underlying future object wrapped by this Prefect future"""
117
117
  return self._wrapped_future
118
118
 
119
- def add_done_callback(self, fn: Callable[[PrefectFuture], None]):
119
+ def add_done_callback(self, fn: Callable[[PrefectFuture[R]], None]):
120
120
  if not self._final_state:
121
121
 
122
122
  def call_with_self(future):
@@ -193,7 +193,7 @@ class PrefectDistributedFuture(PrefectFuture[R]):
193
193
  any task run scheduled in Prefect's API.
194
194
  """
195
195
 
196
- done_callbacks: List[Callable[[PrefectFuture], None]] = []
196
+ done_callbacks: List[Callable[[PrefectFuture[R]], None]] = []
197
197
  waiter = None
198
198
 
199
199
  def wait(self, timeout: Optional[float] = None) -> None:
@@ -257,7 +257,7 @@ class PrefectDistributedFuture(PrefectFuture[R]):
257
257
  raise_on_failure=raise_on_failure, fetch=True
258
258
  )
259
259
 
260
- def add_done_callback(self, fn: Callable[[PrefectFuture], None]):
260
+ def add_done_callback(self, fn: Callable[[PrefectFuture[R]], None]):
261
261
  if self._final_state:
262
262
  fn(self)
263
263
  return
@@ -331,9 +331,9 @@ class PrefectFutureList(list, Iterator, Generic[F]):
331
331
 
332
332
 
333
333
  def as_completed(
334
- futures: List[PrefectFuture], timeout: Optional[float] = None
335
- ) -> Generator[PrefectFuture, None]:
336
- unique_futures: Set[PrefectFuture] = set(futures)
334
+ futures: List[PrefectFuture[R]], timeout: Optional[float] = None
335
+ ) -> Generator[PrefectFuture[R], None]:
336
+ unique_futures: Set[PrefectFuture[R]] = set(futures)
337
337
  total_futures = len(unique_futures)
338
338
  try:
339
339
  with timeout_context(timeout):
@@ -373,7 +373,7 @@ def as_completed(
373
373
  DoneAndNotDoneFutures = collections.namedtuple("DoneAndNotDoneFutures", "done not_done")
374
374
 
375
375
 
376
- def wait(futures: List[PrefectFuture], timeout=None) -> DoneAndNotDoneFutures:
376
+ def wait(futures: List[PrefectFuture[R]], timeout=None) -> DoneAndNotDoneFutures:
377
377
  """
378
378
  Wait for the futures in the given sequence to complete.
379
379
 
@@ -404,10 +404,10 @@ def wait(futures: List[PrefectFuture], timeout=None) -> DoneAndNotDoneFutures:
404
404
  print(f"Not Done: {len(not_done)}")
405
405
  ```
406
406
  """
407
- futures = set(futures)
408
- done = {f for f in futures if f._final_state}
409
- not_done = futures - done
410
- if len(done) == len(futures):
407
+ _futures = set(futures)
408
+ done = {f for f in _futures if f._final_state}
409
+ not_done = _futures - done
410
+ if len(done) == len(_futures):
411
411
  return DoneAndNotDoneFutures(done, not_done)
412
412
  try:
413
413
  with timeout_context(timeout):
@@ -422,7 +422,7 @@ def wait(futures: List[PrefectFuture], timeout=None) -> DoneAndNotDoneFutures:
422
422
 
423
423
 
424
424
  def resolve_futures_to_states(
425
- expr: Union[PrefectFuture, Any],
425
+ expr: Union[PrefectFuture[R], Any],
426
426
  ) -> Union[State, Any]:
427
427
  """
428
428
  Given a Python built-in collection, recursively find `PrefectFutures` and build a
@@ -431,7 +431,7 @@ def resolve_futures_to_states(
431
431
 
432
432
  Unsupported object types will be returned without modification.
433
433
  """
434
- futures: Set[PrefectFuture] = set()
434
+ futures: Set[PrefectFuture[R]] = set()
435
435
 
436
436
  def _collect_futures(futures, expr, context):
437
437
  # Expressions inside quotes should not be traversed
@@ -13,7 +13,7 @@ import yaml
13
13
  from prefect.settings import (
14
14
  PREFECT_LOGGING_EXTRA_LOGGERS,
15
15
  PREFECT_LOGGING_SETTINGS_PATH,
16
- SETTING_VARIABLES,
16
+ get_current_settings,
17
17
  )
18
18
  from prefect.utilities.collections import dict_to_flatdict, flatdict_to_dict
19
19
 
@@ -31,18 +31,14 @@ def load_logging_config(path: Path) -> dict:
31
31
  """
32
32
  Loads logging configuration from a path allowing override from the environment
33
33
  """
34
+ current_settings = get_current_settings()
34
35
  template = string.Template(path.read_text())
36
+
35
37
  with warnings.catch_warnings():
36
38
  warnings.filterwarnings("ignore", category=DeprecationWarning)
37
39
  config = yaml.safe_load(
38
40
  # Substitute settings into the template in format $SETTING / ${SETTING}
39
- template.substitute(
40
- {
41
- setting.name: str(setting.value())
42
- for setting in SETTING_VARIABLES.values()
43
- if setting.value() is not None
44
- }
45
- )
41
+ template.substitute(current_settings.to_environment_variables())
46
42
  )
47
43
 
48
44
  # Load overrides from the environment
@@ -6,7 +6,7 @@ import traceback
6
6
  import uuid
7
7
  import warnings
8
8
  from contextlib import asynccontextmanager
9
- from typing import Any, Dict, List, Type, Union
9
+ from typing import Any, Dict, List, Optional, Type, Union
10
10
 
11
11
  import pendulum
12
12
  from rich.console import Console
@@ -30,7 +30,6 @@ from prefect.settings import (
30
30
  PREFECT_LOGGING_MARKUP,
31
31
  PREFECT_LOGGING_TO_API_BATCH_INTERVAL,
32
32
  PREFECT_LOGGING_TO_API_BATCH_SIZE,
33
- PREFECT_LOGGING_TO_API_ENABLED,
34
33
  PREFECT_LOGGING_TO_API_MAX_LOG_SIZE,
35
34
  PREFECT_LOGGING_TO_API_WHEN_MISSING_FLOW,
36
35
  )
@@ -134,7 +133,7 @@ class APILogHandler(logging.Handler):
134
133
  try:
135
134
  profile = prefect.context.get_settings_context()
136
135
 
137
- if not PREFECT_LOGGING_TO_API_ENABLED.value_from(profile.settings):
136
+ if not profile.settings.logging_to_api_enabled:
138
137
  return # Respect the global settings toggle
139
138
  if not getattr(record, "send_to_api", True):
140
139
  return # Do not send records that have opted out
@@ -242,7 +241,7 @@ class PrefectConsoleHandler(logging.StreamHandler):
242
241
  self,
243
242
  stream=None,
244
243
  highlighter: Highlighter = PrefectConsoleHighlighter,
245
- styles: Dict[str, str] = None,
244
+ styles: Optional[Dict[str, str]] = None,
246
245
  level: Union[int, str] = logging.NOTSET,
247
246
  ):
248
247
  """
@@ -1155,7 +1155,7 @@ class BaseResult(BaseModel, abc.ABC, Generic[R]):
1155
1155
  try:
1156
1156
  subcls = lookup_type(cls, dispatch_key=kwargs["type"])
1157
1157
  except KeyError as exc:
1158
- raise ValidationError(errors=[exc], model=cls)
1158
+ raise ValueError(f"Invalid type: {kwargs['type']}") from exc
1159
1159
  return super().__new__(subcls)
1160
1160
  else:
1161
1161
  return super().__new__(cls)