prefect-client 3.3.4.dev2__tar.gz → 3.3.5__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 (324) hide show
  1. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/PKG-INFO +1 -1
  2. prefect_client-3.3.5/src/prefect/_build_info.py +5 -0
  3. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_experimental/bundles.py +14 -2
  4. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/cache_policies.py +4 -4
  5. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/base.py +5 -0
  6. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/clients.py +10 -4
  7. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/flows.py +142 -3
  8. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/locking/memory.py +11 -9
  9. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/results.py +9 -0
  10. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runner/runner.py +8 -3
  11. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runner/server.py +12 -0
  12. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runner/submit.py +13 -1
  13. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/deployments.py +1 -0
  14. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/services.py +7 -0
  15. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/states.py +2 -2
  16. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/task_engine.py +12 -6
  17. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/tasks.py +0 -5
  18. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/telemetry/instrumentation.py +2 -2
  19. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/transactions.py +345 -71
  20. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/workers/base.py +166 -7
  21. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/workers/process.py +60 -3
  22. prefect_client-3.3.4.dev2/src/prefect/_build_info.py +0 -5
  23. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/.gitignore +0 -0
  24. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/LICENSE +0 -0
  25. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/README.md +0 -0
  26. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/pyproject.toml +0 -0
  27. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/.prefectignore +0 -0
  28. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/__init__.py +0 -0
  29. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/__main__.py +0 -0
  30. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_experimental/__init__.py +0 -0
  31. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_experimental/lineage.py +0 -0
  32. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_experimental/sla/__init__.py +0 -0
  33. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_experimental/sla/client.py +0 -0
  34. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_experimental/sla/objects.py +0 -0
  35. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/__init__.py +0 -0
  36. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/_logging.py +0 -0
  37. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/compatibility/__init__.py +0 -0
  38. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/compatibility/async_dispatch.py +0 -0
  39. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/compatibility/deprecated.py +0 -0
  40. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/compatibility/migration.py +0 -0
  41. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/__init__.py +0 -0
  42. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/api.py +0 -0
  43. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/calls.py +0 -0
  44. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  45. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  46. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/inspection.py +0 -0
  47. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/primitives.py +0 -0
  48. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/services.py +0 -0
  49. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/threads.py +0 -0
  50. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/concurrency/waiters.py +0 -0
  51. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/integrations.py +0 -0
  52. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/pydantic/__init__.py +0 -0
  53. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/pydantic/schemas.py +0 -0
  54. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
  55. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  56. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  57. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/pytz.py +0 -0
  58. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/retries.py +0 -0
  59. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/schemas/__init__.py +0 -0
  60. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/schemas/bases.py +0 -0
  61. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/schemas/fields.py +0 -0
  62. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/schemas/serializers.py +0 -0
  63. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_internal/schemas/validators.py +0 -0
  64. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_result_records.py +0 -0
  65. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_vendor/croniter/__init__.py +0 -0
  66. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_vendor/croniter/croniter.py +0 -0
  67. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/_waiters.py +0 -0
  68. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/agent.py +0 -0
  69. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/artifacts.py +0 -0
  70. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/automations.py +0 -0
  71. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/blocks/__init__.py +0 -0
  72. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/blocks/abstract.py +0 -0
  73. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/blocks/core.py +0 -0
  74. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/blocks/fields.py +0 -0
  75. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/blocks/notifications.py +0 -0
  76. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/blocks/redis.py +0 -0
  77. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/blocks/system.py +0 -0
  78. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/blocks/webhook.py +0 -0
  79. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/__init__.py +0 -0
  80. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/base.py +0 -0
  81. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/cloud.py +0 -0
  82. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/collections.py +0 -0
  83. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/constants.py +0 -0
  84. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/__init__.py +0 -0
  85. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_artifacts/__init__.py +0 -0
  86. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_artifacts/client.py +0 -0
  87. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_automations/__init__.py +0 -0
  88. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_automations/client.py +0 -0
  89. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_blocks_documents/__init__.py +0 -0
  90. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_blocks_documents/client.py +0 -0
  91. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_blocks_schemas/__init__.py +0 -0
  92. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_blocks_schemas/client.py +0 -0
  93. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_blocks_types/__init__.py +0 -0
  94. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_blocks_types/client.py +0 -0
  95. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_concurrency_limits/__init__.py +0 -0
  96. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_concurrency_limits/client.py +0 -0
  97. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_deployments/__init__.py +0 -0
  98. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_deployments/client.py +0 -0
  99. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_flow_runs/__init__.py +0 -0
  100. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_flow_runs/client.py +0 -0
  101. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_flows/__init__.py +0 -0
  102. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_flows/client.py +0 -0
  103. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_logs/__init__.py +0 -0
  104. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_logs/client.py +0 -0
  105. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_variables/__init__.py +0 -0
  106. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_variables/client.py +0 -0
  107. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_work_pools/__init__.py +0 -0
  108. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/_work_pools/client.py +0 -0
  109. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/base.py +0 -0
  110. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/orchestration/routes.py +0 -0
  111. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/schemas/__init__.py +0 -0
  112. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/schemas/actions.py +0 -0
  113. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/schemas/filters.py +0 -0
  114. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/schemas/objects.py +0 -0
  115. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/schemas/responses.py +0 -0
  116. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/schemas/schedules.py +0 -0
  117. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/schemas/sorting.py +0 -0
  118. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/subscriptions.py +0 -0
  119. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/types/__init__.py +0 -0
  120. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/types/flexible_schedule_list.py +0 -0
  121. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/client/utilities.py +0 -0
  122. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/__init__.py +0 -0
  123. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/_asyncio.py +0 -0
  124. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/_events.py +0 -0
  125. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/asyncio.py +0 -0
  126. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/context.py +0 -0
  127. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/services.py +0 -0
  128. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/sync.py +0 -0
  129. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/v1/__init__.py +0 -0
  130. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/v1/_asyncio.py +0 -0
  131. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/v1/_events.py +0 -0
  132. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/v1/asyncio.py +0 -0
  133. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/v1/context.py +0 -0
  134. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/v1/services.py +0 -0
  135. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/concurrency/v1/sync.py +0 -0
  136. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/context.py +0 -0
  137. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/__init__.py +0 -0
  138. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/deployments.py +0 -0
  139. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/flow_runs.py +0 -0
  140. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/runner.py +0 -0
  141. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/schedules.py +0 -0
  142. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/steps/__init__.py +0 -0
  143. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/steps/core.py +0 -0
  144. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/steps/pull.py +0 -0
  145. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/deployments/steps/utility.py +0 -0
  146. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/docker/__init__.py +0 -0
  147. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/docker/docker_image.py +0 -0
  148. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/engine.py +0 -0
  149. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/__init__.py +0 -0
  150. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/actions.py +0 -0
  151. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/cli/__init__.py +0 -0
  152. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/cli/automations.py +0 -0
  153. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/filters.py +0 -0
  154. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/related.py +0 -0
  155. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/schemas/__init__.py +0 -0
  156. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/schemas/automations.py +0 -0
  157. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/schemas/deployment_triggers.py +0 -0
  158. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/schemas/events.py +0 -0
  159. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/schemas/labelling.py +0 -0
  160. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/utilities.py +0 -0
  161. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/events/worker.py +0 -0
  162. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/exceptions.py +0 -0
  163. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/filesystems.py +0 -0
  164. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/flow_engine.py +0 -0
  165. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/flow_runs.py +0 -0
  166. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/futures.py +0 -0
  167. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/infrastructure/__init__.py +0 -0
  168. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/infrastructure/base.py +0 -0
  169. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
  170. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
  171. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/infrastructure/provisioners/coiled.py +0 -0
  172. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
  173. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
  174. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/infrastructure/provisioners/modal.py +0 -0
  175. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/input/__init__.py +0 -0
  176. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/input/actions.py +0 -0
  177. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/input/run_input.py +0 -0
  178. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/locking/__init__.py +0 -0
  179. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/locking/filesystem.py +0 -0
  180. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/locking/protocol.py +0 -0
  181. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/logging/__init__.py +0 -0
  182. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/logging/configuration.py +0 -0
  183. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/logging/filters.py +0 -0
  184. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/logging/formatters.py +0 -0
  185. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/logging/handlers.py +0 -0
  186. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/logging/highlighters.py +0 -0
  187. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/logging/loggers.py +0 -0
  188. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/logging/logging.yml +0 -0
  189. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/main.py +0 -0
  190. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/plugins.py +0 -0
  191. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/py.typed +0 -0
  192. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runner/__init__.py +0 -0
  193. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runner/storage.py +0 -0
  194. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runner/utils.py +0 -0
  195. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runtime/__init__.py +0 -0
  196. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runtime/deployment.py +0 -0
  197. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runtime/flow_run.py +0 -0
  198. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/runtime/task_run.py +0 -0
  199. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/schedules.py +0 -0
  200. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/serializers.py +0 -0
  201. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/__init__.py +0 -0
  202. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/admin.py +0 -0
  203. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/artifacts.py +0 -0
  204. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/automations.py +0 -0
  205. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/block_capabilities.py +0 -0
  206. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/block_documents.py +0 -0
  207. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/block_schemas.py +0 -0
  208. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/block_types.py +0 -0
  209. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/clients.py +0 -0
  210. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/collections.py +0 -0
  211. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
  212. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/concurrency_limits.py +0 -0
  213. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/concurrency_limits_v2.py +0 -0
  214. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/csrf_token.py +0 -0
  215. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/dependencies.py +0 -0
  216. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/events.py +0 -0
  217. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/flow_run_notification_policies.py +0 -0
  218. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/flow_run_states.py +0 -0
  219. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/flow_runs.py +0 -0
  220. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/flows.py +0 -0
  221. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/logs.py +0 -0
  222. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/middleware.py +0 -0
  223. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/root.py +0 -0
  224. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/run_history.py +0 -0
  225. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/saved_searches.py +0 -0
  226. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/server.py +0 -0
  227. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  228. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/task_run_states.py +0 -0
  229. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/task_runs.py +0 -0
  230. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/task_workers.py +0 -0
  231. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/templates.py +0 -0
  232. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/ui/__init__.py +0 -0
  233. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/ui/flow_runs.py +0 -0
  234. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/ui/flows.py +0 -0
  235. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/ui/schemas.py +0 -0
  236. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/ui/task_runs.py +0 -0
  237. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/validation.py +0 -0
  238. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/variables.py +0 -0
  239. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/work_queues.py +0 -0
  240. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/server/api/workers.py +0 -0
  241. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/__init__.py +0 -0
  242. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/base.py +0 -0
  243. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/constants.py +0 -0
  244. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/context.py +0 -0
  245. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/legacy.py +0 -0
  246. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/__init__.py +0 -0
  247. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/api.py +0 -0
  248. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/cli.py +0 -0
  249. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/client.py +0 -0
  250. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/cloud.py +0 -0
  251. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/deployments.py +0 -0
  252. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/experiments.py +0 -0
  253. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/flows.py +0 -0
  254. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/internal.py +0 -0
  255. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/logging.py +0 -0
  256. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/results.py +0 -0
  257. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/root.py +0 -0
  258. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/runner.py +0 -0
  259. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/__init__.py +0 -0
  260. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/api.py +0 -0
  261. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/database.py +0 -0
  262. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/deployments.py +0 -0
  263. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/ephemeral.py +0 -0
  264. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/events.py +0 -0
  265. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/flow_run_graph.py +0 -0
  266. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/root.py +0 -0
  267. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/tasks.py +0 -0
  268. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/server/ui.py +0 -0
  269. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/tasks.py +0 -0
  270. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/testing.py +0 -0
  271. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/models/worker.py +0 -0
  272. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/profiles.py +0 -0
  273. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/profiles.toml +0 -0
  274. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/settings/sources.py +0 -0
  275. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/task_runners.py +0 -0
  276. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/task_runs.py +0 -0
  277. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/task_worker.py +0 -0
  278. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/telemetry/__init__.py +0 -0
  279. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/telemetry/bootstrap.py +0 -0
  280. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/telemetry/logging.py +0 -0
  281. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/telemetry/processors.py +0 -0
  282. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/telemetry/run_telemetry.py +0 -0
  283. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/telemetry/services.py +0 -0
  284. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/types/__init__.py +0 -0
  285. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/types/_datetime.py +0 -0
  286. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/types/entrypoint.py +0 -0
  287. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/__init__.py +0 -0
  288. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/_deprecated.py +0 -0
  289. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/_engine.py +0 -0
  290. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/_git.py +0 -0
  291. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/annotations.py +0 -0
  292. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/asyncutils.py +0 -0
  293. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/callables.py +0 -0
  294. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/collections.py +0 -0
  295. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/compat.py +0 -0
  296. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/context.py +0 -0
  297. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/dispatch.py +0 -0
  298. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/dockerutils.py +0 -0
  299. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/engine.py +0 -0
  300. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/filesystem.py +0 -0
  301. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/generics.py +0 -0
  302. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/hashing.py +0 -0
  303. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/importtools.py +0 -0
  304. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/math.py +0 -0
  305. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/names.py +0 -0
  306. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/processutils.py +0 -0
  307. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/pydantic.py +0 -0
  308. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/render_swagger.py +0 -0
  309. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  310. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/schema_tools/hydration.py +0 -0
  311. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/schema_tools/validation.py +0 -0
  312. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/services.py +0 -0
  313. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/slugify.py +0 -0
  314. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/templating.py +0 -0
  315. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/text.py +0 -0
  316. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/timeout.py +0 -0
  317. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/urls.py +0 -0
  318. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/utilities/visualization.py +0 -0
  319. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/variables.py +0 -0
  320. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/workers/__init__.py +0 -0
  321. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/workers/block.py +0 -0
  322. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/workers/cloud.py +0 -0
  323. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/workers/server.py +0 -0
  324. {prefect_client-3.3.4.dev2 → prefect_client-3.3.5}/src/prefect/workers/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prefect-client
3
- Version: 3.3.4.dev2
3
+ Version: 3.3.5
4
4
  Summary: Workflow orchestration and management.
5
5
  Project-URL: Changelog, https://github.com/PrefectHQ/prefect/releases
6
6
  Project-URL: Documentation, https://docs.prefect.io
@@ -0,0 +1,5 @@
1
+ # Generated by versioningit
2
+ __version__ = "3.3.5"
3
+ __build_date__ = "2025-04-17 21:24:54.247813+00:00"
4
+ __git_commit__ = "db4b7a338ee0030ad0905d803a5ea5167d2a0711"
5
+ __dirty__ = False
@@ -8,6 +8,7 @@ import multiprocessing.context
8
8
  import os
9
9
  import subprocess
10
10
  import sys
11
+ from pathlib import Path
11
12
  from typing import Any, TypedDict
12
13
 
13
14
  import cloudpickle
@@ -99,7 +100,9 @@ def extract_flow_from_bundle(bundle: SerializedBundle) -> Flow[Any, Any]:
99
100
 
100
101
 
101
102
  def _extract_and_run_flow(
102
- bundle: SerializedBundle, env: dict[str, Any] | None = None
103
+ bundle: SerializedBundle,
104
+ cwd: Path | str | None = None,
105
+ env: dict[str, Any] | None = None,
103
106
  ) -> None:
104
107
  """
105
108
  Extracts a flow from a bundle and runs it.
@@ -108,6 +111,7 @@ def _extract_and_run_flow(
108
111
 
109
112
  Args:
110
113
  bundle: The bundle to extract and run.
114
+ cwd: The working directory to use when running the flow.
111
115
  env: The environment to use when running the flow.
112
116
  """
113
117
 
@@ -120,6 +124,9 @@ def _extract_and_run_flow(
120
124
  context = _deserialize_bundle_object(bundle["context"])
121
125
  flow_run = FlowRun.model_validate(bundle["flow_run"])
122
126
 
127
+ if cwd:
128
+ os.chdir(cwd)
129
+
123
130
  with SettingsContext(
124
131
  profile=settings_context.profile,
125
132
  settings=Settings(),
@@ -138,6 +145,8 @@ def _extract_and_run_flow(
138
145
 
139
146
  def execute_bundle_in_subprocess(
140
147
  bundle: SerializedBundle,
148
+ env: dict[str, Any] | None = None,
149
+ cwd: Path | str | None = None,
141
150
  ) -> multiprocessing.context.SpawnProcess:
142
151
  """
143
152
  Executes a bundle in a subprocess.
@@ -150,6 +159,7 @@ def execute_bundle_in_subprocess(
150
159
  """
151
160
 
152
161
  ctx = multiprocessing.get_context("spawn")
162
+ env = env or {}
153
163
 
154
164
  # Install dependencies if necessary
155
165
  if dependencies := bundle.get("dependencies"):
@@ -164,7 +174,9 @@ def execute_bundle_in_subprocess(
164
174
  kwargs={
165
175
  "bundle": bundle,
166
176
  "env": get_current_settings().to_environment_variables(exclude_unset=True)
167
- | os.environ,
177
+ | os.environ
178
+ | env,
179
+ "cwd": cwd,
168
180
  },
169
181
  )
170
182
 
@@ -33,9 +33,9 @@ def _register_stable_transforms() -> None:
33
33
  so that cache keys that utilize them are deterministic across invocations.
34
34
  """
35
35
  try:
36
- import pandas as pd
36
+ import pandas as pd # pyright: ignore
37
37
 
38
- STABLE_TRANSFORMS[pd.DataFrame] = lambda df: [
38
+ STABLE_TRANSFORMS[pd.DataFrame] = lambda df: [ # pyright: ignore
39
39
  df[col] for col in sorted(df.columns)
40
40
  ]
41
41
  except (ImportError, ModuleNotFoundError):
@@ -183,7 +183,7 @@ class CompoundCachePolicy(CachePolicy):
183
183
  Any keys that return `None` will be ignored.
184
184
  """
185
185
 
186
- policies: list[CachePolicy] = field(default_factory=list)
186
+ policies: list[CachePolicy] = field(default_factory=lambda: [])
187
187
 
188
188
  def __post_init__(self) -> None:
189
189
  # flatten any CompoundCachePolicies
@@ -349,7 +349,7 @@ class Inputs(CachePolicy):
349
349
  Policy that computes a cache key based on a hash of the runtime inputs provided to the task..
350
350
  """
351
351
 
352
- exclude: list[str] = field(default_factory=list)
352
+ exclude: list[str] = field(default_factory=lambda: [])
353
353
 
354
354
  def compute_key(
355
355
  self,
@@ -110,6 +110,7 @@ def create_default_prefect_yaml(
110
110
  f,
111
111
  sort_keys=False,
112
112
  )
113
+
113
114
  return True
114
115
 
115
116
 
@@ -293,6 +294,10 @@ def _save_deployment_to_prefect_file(
293
294
 
294
295
  current_directory_name = os.path.basename(os.getcwd())
295
296
  if not prefect_file.exists():
297
+ if triggers:
298
+ deployment["triggers"] = triggers
299
+ if sla:
300
+ deployment["sla"] = sla
296
301
  create_default_prefect_yaml(
297
302
  ".",
298
303
  current_directory_name,
@@ -39,6 +39,7 @@ import prefect.types._datetime
39
39
  from prefect.events import Event
40
40
  from prefect.logging import get_logger
41
41
  from prefect.settings import (
42
+ PREFECT_API_AUTH_STRING,
42
43
  PREFECT_API_KEY,
43
44
  PREFECT_API_SSL_CERT_FILE,
44
45
  PREFECT_API_TLS_INSECURE_SKIP_VERIFY,
@@ -367,7 +368,7 @@ class PrefectEventsClient(EventsClient):
367
368
  await self._connect.__aexit__(exc_type, exc_val, exc_tb)
368
369
  return await super().__aexit__(exc_type, exc_val, exc_tb)
369
370
 
370
- def _log_debug(self, message: str, *args, **kwargs) -> None:
371
+ def _log_debug(self, message: str, *args: Any, **kwargs: Any) -> None:
371
372
  message = f"EventsClient(id={id(self)}): " + message
372
373
  logger.debug(message, *args, **kwargs)
373
374
 
@@ -578,6 +579,7 @@ class PrefectEventSubscriber:
578
579
  _seen_events: MutableMapping[UUID, bool]
579
580
 
580
581
  _api_key: Optional[str]
582
+ _auth_token: Optional[str]
581
583
 
582
584
  def __init__(
583
585
  self,
@@ -593,6 +595,8 @@ class PrefectEventSubscriber:
593
595
  the client should attempt to reconnect
594
596
  """
595
597
  self._api_key = None
598
+ self._auth_token = PREFECT_API_AUTH_STRING.value()
599
+
596
600
  if not api_url:
597
601
  api_url = cast(str, PREFECT_API_URL.value())
598
602
 
@@ -641,8 +645,10 @@ class PrefectEventSubscriber:
641
645
  await pong
642
646
 
643
647
  logger.debug(" authenticating...")
648
+ # Use the API key (for Cloud) OR the auth token (for self-hosted with auth string)
649
+ token = self._api_key or self._auth_token
644
650
  await self._websocket.send(
645
- orjson.dumps({"type": "auth", "token": self._api_key}).decode()
651
+ orjson.dumps({"type": "auth", "token": token}).decode()
646
652
  )
647
653
 
648
654
  try:
@@ -652,13 +658,13 @@ class PrefectEventSubscriber:
652
658
  except AssertionError as e:
653
659
  raise Exception(
654
660
  "Unable to authenticate to the event stream. Please ensure the "
655
- "provided api_key you are using is valid for this environment. "
661
+ "provided api_key or auth_token you are using is valid for this environment. "
656
662
  f"Reason: {e.args[0]}"
657
663
  )
658
664
  except ConnectionClosedError as e:
659
665
  reason = getattr(e.rcvd, "reason", None)
660
666
  msg = "Unable to authenticate to the event stream. Please ensure the "
661
- msg += "provided api_key you are using is valid for this environment. "
667
+ msg += "provided api_key or auth_token you are using is valid for this environment. "
662
668
  msg += f"Reason: {reason}" if reason else ""
663
669
  raise Exception(msg) from e
664
670
 
@@ -40,6 +40,7 @@ from typing import (
40
40
  from uuid import UUID
41
41
 
42
42
  import pydantic
43
+ from exceptiongroup import BaseExceptionGroup, ExceptionGroup
43
44
  from pydantic.v1 import BaseModel as V1BaseModel
44
45
  from pydantic.v1.decorator import ValidatedFunction as V1ValidatedFunction
45
46
  from pydantic.v1.errors import ConfigError # TODO
@@ -105,6 +106,9 @@ from ._internal.pydantic.v2_validated_func import (
105
106
  V2ValidatedFunction as ValidatedFunction,
106
107
  )
107
108
 
109
+ if TYPE_CHECKING:
110
+ from prefect.workers.base import BaseWorker
111
+
108
112
  T = TypeVar("T") # Generic type var for capturing the inner return type of async funcs
109
113
  R = TypeVar("R") # The return type of the user's function
110
114
  P = ParamSpec("P") # The parameters of the flow
@@ -1130,7 +1134,7 @@ class Flow(Generic[P, R]):
1130
1134
  @classmethod
1131
1135
  async def afrom_source(
1132
1136
  cls,
1133
- source: Union[str, "RunnerStorage", ReadableDeploymentStorage],
1137
+ source: Union[str, Path, "RunnerStorage", ReadableDeploymentStorage],
1134
1138
  entrypoint: str,
1135
1139
  ) -> "Flow[..., Any]":
1136
1140
  """
@@ -1244,7 +1248,7 @@ class Flow(Generic[P, R]):
1244
1248
  @async_dispatch(afrom_source)
1245
1249
  def from_source(
1246
1250
  cls,
1247
- source: Union[str, "RunnerStorage", ReadableDeploymentStorage],
1251
+ source: Union[str, Path, "RunnerStorage", ReadableDeploymentStorage],
1248
1252
  entrypoint: str,
1249
1253
  ) -> "Flow[..., Any]":
1250
1254
  """
@@ -1976,7 +1980,7 @@ class FlowDecorator:
1976
1980
  # manually here.
1977
1981
  @staticmethod
1978
1982
  def from_source(
1979
- source: Union[str, "RunnerStorage", ReadableDeploymentStorage],
1983
+ source: Union[str, Path, "RunnerStorage", ReadableDeploymentStorage],
1980
1984
  entrypoint: str,
1981
1985
  ) -> Union["Flow[..., Any]", Coroutine[Any, Any, "Flow[..., Any]"]]: ...
1982
1986
 
@@ -1984,6 +1988,141 @@ class FlowDecorator:
1984
1988
  flow: FlowDecorator = FlowDecorator()
1985
1989
 
1986
1990
 
1991
+ class InfrastructureBoundFlow(Flow[P, R]):
1992
+ """
1993
+ EXPERIMENTAL: This class is experimental and may be removed or changed in future
1994
+ releases.
1995
+
1996
+ A flow that is bound to running on a specific infrastructure.
1997
+
1998
+ Attributes:
1999
+ work_pool: The name of the work pool to run the flow on. The base job
2000
+ configuration of the work pool will determine the configuration of the
2001
+ infrastructure the flow will run on.
2002
+ job_variables: Infrastructure configuration that will override the base job
2003
+ configuration of the work pool.
2004
+ worker_cls: The class of the worker to use to spin up infrastructure and submit
2005
+ the flow to it.
2006
+ """
2007
+
2008
+ def __init__(
2009
+ self,
2010
+ *args: Any,
2011
+ work_pool: str,
2012
+ job_variables: dict[str, Any],
2013
+ worker_cls: type["BaseWorker[Any, Any, Any]"],
2014
+ **kwargs: Any,
2015
+ ):
2016
+ super().__init__(*args, **kwargs)
2017
+ self.work_pool = work_pool
2018
+ self.job_variables = job_variables
2019
+ self.worker_cls = worker_cls
2020
+
2021
+ @overload
2022
+ def __call__(self: "Flow[P, NoReturn]", *args: P.args, **kwargs: P.kwargs) -> None:
2023
+ # `NoReturn` matches if a type can't be inferred for the function which stops a
2024
+ # sync function from matching the `Coroutine` overload
2025
+ ...
2026
+
2027
+ @overload
2028
+ def __call__(
2029
+ self: "Flow[P, Coroutine[Any, Any, T]]",
2030
+ *args: P.args,
2031
+ **kwargs: P.kwargs,
2032
+ ) -> Coroutine[Any, Any, T]: ...
2033
+
2034
+ @overload
2035
+ def __call__(
2036
+ self: "Flow[P, T]",
2037
+ *args: P.args,
2038
+ **kwargs: P.kwargs,
2039
+ ) -> T: ...
2040
+
2041
+ @overload
2042
+ def __call__(
2043
+ self: "Flow[P, Coroutine[Any, Any, T]]",
2044
+ *args: P.args,
2045
+ return_state: Literal[True],
2046
+ **kwargs: P.kwargs,
2047
+ ) -> Awaitable[State[T]]: ...
2048
+
2049
+ @overload
2050
+ def __call__(
2051
+ self: "Flow[P, T]",
2052
+ *args: P.args,
2053
+ return_state: Literal[True],
2054
+ **kwargs: P.kwargs,
2055
+ ) -> State[T]: ...
2056
+
2057
+ def __call__(
2058
+ self,
2059
+ *args: "P.args",
2060
+ return_state: bool = False,
2061
+ wait_for: Optional[Iterable[PrefectFuture[Any]]] = None,
2062
+ **kwargs: "P.kwargs",
2063
+ ):
2064
+ async def modified_call(
2065
+ *args: P.args,
2066
+ return_state: bool = False,
2067
+ # TODO: Handle wait_for once we have an asynchronous way to wait for futures
2068
+ # We should wait locally for futures to resolve before spinning up
2069
+ # infrastructure.
2070
+ wait_for: Optional[Iterable[PrefectFuture[Any]]] = None,
2071
+ **kwargs: P.kwargs,
2072
+ ) -> R | State[R]:
2073
+ try:
2074
+ async with self.worker_cls(work_pool_name=self.work_pool) as worker:
2075
+ parameters = get_call_parameters(self, args, kwargs)
2076
+ future = await worker.submit(
2077
+ flow=self,
2078
+ parameters=parameters,
2079
+ job_variables=self.job_variables,
2080
+ )
2081
+ if return_state:
2082
+ await future.wait_async()
2083
+ return future.state
2084
+ return await future.aresult()
2085
+ except (ExceptionGroup, BaseExceptionGroup) as exc:
2086
+ # For less verbose tracebacks
2087
+ exceptions = exc.exceptions
2088
+ if len(exceptions) == 1:
2089
+ raise exceptions[0] from None
2090
+ else:
2091
+ raise
2092
+
2093
+ if inspect.iscoroutinefunction(self.fn):
2094
+ return modified_call(
2095
+ *args, return_state=return_state, wait_for=wait_for, **kwargs
2096
+ )
2097
+ else:
2098
+ return run_coro_as_sync(
2099
+ modified_call(
2100
+ *args,
2101
+ return_state=return_state,
2102
+ wait_for=wait_for,
2103
+ **kwargs,
2104
+ )
2105
+ )
2106
+
2107
+
2108
+ def bind_flow_to_infrastructure(
2109
+ flow: Flow[P, R],
2110
+ work_pool: str,
2111
+ worker_cls: type["BaseWorker[Any, Any, Any]"],
2112
+ job_variables: dict[str, Any] | None = None,
2113
+ ) -> InfrastructureBoundFlow[P, R]:
2114
+ new = InfrastructureBoundFlow[P, R](
2115
+ flow.fn,
2116
+ work_pool=work_pool,
2117
+ job_variables=job_variables or {},
2118
+ worker_cls=worker_cls,
2119
+ )
2120
+ # Copy all attributes from the original flow
2121
+ for attr, value in flow.__dict__.items():
2122
+ setattr(new, attr, value)
2123
+ return new
2124
+
2125
+
1987
2126
  def _raise_on_name_with_banned_characters(name: Optional[str]) -> Optional[str]:
1988
2127
  """
1989
2128
  Raise an InvalidNameError if the given name contains any invalid
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
2
+
1
3
  import asyncio
2
4
  import threading
3
- from typing import Any, Optional, TypedDict
5
+ from typing import Any, TypedDict
4
6
 
5
7
  from typing_extensions import Self
6
8
 
@@ -19,7 +21,7 @@ class _LockInfo(TypedDict):
19
21
 
20
22
  holder: str
21
23
  lock: threading.Lock
22
- expiration_timer: Optional[threading.Timer]
24
+ expiration_timer: threading.Timer | None
23
25
 
24
26
 
25
27
  class MemoryLockManager(LockManager):
@@ -63,8 +65,8 @@ class MemoryLockManager(LockManager):
63
65
  self,
64
66
  key: str,
65
67
  holder: str,
66
- acquire_timeout: Optional[float] = None,
67
- hold_timeout: Optional[float] = None,
68
+ acquire_timeout: float | None = None,
69
+ hold_timeout: float | None = None,
68
70
  ) -> bool:
69
71
  with self._locks_dict_lock:
70
72
  if key not in self._locks:
@@ -116,13 +118,13 @@ class MemoryLockManager(LockManager):
116
118
  self,
117
119
  key: str,
118
120
  holder: str,
119
- acquire_timeout: Optional[float] = None,
120
- hold_timeout: Optional[float] = None,
121
+ acquire_timeout: float | None = None,
122
+ hold_timeout: float | None = None,
121
123
  ) -> bool:
122
124
  with self._locks_dict_lock:
123
125
  if key not in self._locks:
124
126
  lock = threading.Lock()
125
- await asyncio.to_thread(lock.acquire)
127
+ lock.acquire()
126
128
  expiration_timer = None
127
129
  if hold_timeout is not None:
128
130
  expiration_timer = threading.Timer(
@@ -192,7 +194,7 @@ class MemoryLockManager(LockManager):
192
194
  and lock_info["holder"] == holder
193
195
  )
194
196
 
195
- def wait_for_lock(self, key: str, timeout: Optional[float] = None) -> bool:
197
+ def wait_for_lock(self, key: str, timeout: float | None = None) -> bool:
196
198
  lock_info: _LockInfo | None = self._locks.get(key)
197
199
  if lock_info is None:
198
200
  return True
@@ -206,7 +208,7 @@ class MemoryLockManager(LockManager):
206
208
  return lock_acquired
207
209
  return True
208
210
 
209
- async def await_for_lock(self, key: str, timeout: Optional[float] = None) -> bool:
211
+ async def await_for_lock(self, key: str, timeout: float | None = None) -> bool:
210
212
  lock_info: _LockInfo | None = self._locks.get(key, None)
211
213
  if lock_info is None:
212
214
  return True
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import asyncio
3
4
  import inspect
4
5
  import os
5
6
  import socket
@@ -33,6 +34,7 @@ from typing_extensions import ParamSpec, Self
33
34
  import prefect
34
35
  import prefect.types._datetime
35
36
  from prefect._internal.compatibility.async_dispatch import async_dispatch
37
+ from prefect._internal.concurrency.event_loop import get_running_loop
36
38
  from prefect._result_records import R, ResultRecord, ResultRecordMetadata
37
39
  from prefect.blocks.core import Block
38
40
  from prefect.exceptions import (
@@ -475,10 +477,17 @@ class ResultStore(BaseModel):
475
477
  Returns:
476
478
  str: A unique identifier string.
477
479
  """
480
+ current_loop = get_running_loop()
478
481
  hostname = socket.gethostname()
479
482
  pid = os.getpid()
480
483
  thread_name = threading.current_thread().name
481
484
  thread_id = threading.get_ident()
485
+ if current_loop:
486
+ current_task = asyncio.current_task()
487
+ if current_task:
488
+ # include the task id to ensure uniqueness because there might be
489
+ # multiple tasks running in the same thread
490
+ return f"{hostname}:{pid}:{thread_id}:{thread_name}:{id(current_task)}"
482
491
  return f"{hostname}:{pid}:{thread_id}:{thread_name}"
483
492
 
484
493
  @sync_compatible
@@ -636,7 +636,12 @@ class Runner:
636
636
 
637
637
  return process
638
638
 
639
- async def execute_bundle(self, bundle: SerializedBundle) -> None:
639
+ async def execute_bundle(
640
+ self,
641
+ bundle: SerializedBundle,
642
+ cwd: Path | str | None = None,
643
+ env: dict[str, str | None] | None = None,
644
+ ) -> None:
640
645
  """
641
646
  Executes a bundle in a subprocess.
642
647
  """
@@ -651,7 +656,7 @@ class Runner:
651
656
  if not self._acquire_limit_slot(flow_run.id):
652
657
  return
653
658
 
654
- process = execute_bundle_in_subprocess(bundle)
659
+ process = execute_bundle_in_subprocess(bundle, cwd=cwd, env=env)
655
660
 
656
661
  if process.pid is None:
657
662
  # This shouldn't happen because `execute_bundle_in_subprocess` starts the process
@@ -776,7 +781,7 @@ class Runner:
776
781
  if command is None:
777
782
  runner_command = [get_sys_executable(), "-m", "prefect.engine"]
778
783
  else:
779
- runner_command = shlex.split(command)
784
+ runner_command = shlex.split(command, posix=(os.name != "nt"))
780
785
 
781
786
  flow_run_logger = self._get_flow_run_logger(flow_run)
782
787
 
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import uuid
4
+ from datetime import datetime
4
5
  from typing import TYPE_CHECKING, Any, Callable, Coroutine, Hashable, Optional
5
6
 
6
7
  import uvicorn
@@ -8,6 +9,7 @@ from fastapi import APIRouter, FastAPI, HTTPException, status
8
9
  from fastapi.responses import JSONResponse
9
10
  from typing_extensions import Literal
10
11
 
12
+ from prefect._internal.compatibility.deprecated import deprecated_callable
11
13
  from prefect._internal.schemas.validators import validate_values_conform_to_schema
12
14
  from prefect.client.orchestration import get_client
13
15
  from prefect.exceptions import MissingFlowError, ScriptError
@@ -252,6 +254,11 @@ def _build_generic_endpoint_for_flows(
252
254
  return _create_flow_run_for_flow_from_fqn
253
255
 
254
256
 
257
+ @deprecated_callable(
258
+ start_date=datetime(2025, 4, 1),
259
+ end_date=datetime(2025, 10, 1),
260
+ help="Use background tasks (https://docs.prefect.io/v3/develop/deferred-tasks) or `run_deployment` and `.serve` instead of submitting runs to the Runner webserver.",
261
+ )
255
262
  async def build_server(runner: "Runner") -> FastAPI:
256
263
  """
257
264
  Build a FastAPI server for a runner.
@@ -296,6 +303,11 @@ async def build_server(runner: "Runner") -> FastAPI:
296
303
  return webserver
297
304
 
298
305
 
306
+ @deprecated_callable(
307
+ start_date=datetime(2025, 4, 1),
308
+ end_date=datetime(2025, 10, 1),
309
+ help="Use background tasks (https://docs.prefect.io/v3/develop/deferred-tasks) or `run_deployment` and `.serve` instead of submitting runs to the Runner webserver.",
310
+ )
299
311
  def start_webserver(runner: "Runner", log_level: str | None = None) -> None:
300
312
  """
301
313
  Run a FastAPI server for a runner.
@@ -3,12 +3,14 @@ from __future__ import annotations
3
3
  import asyncio
4
4
  import inspect
5
5
  import uuid
6
+ from datetime import datetime
6
7
  from typing import TYPE_CHECKING, Any, Union, overload
7
8
 
8
9
  import anyio
9
10
  import httpx
10
11
  from typing_extensions import Literal, TypeAlias
11
12
 
13
+ from prefect._internal.compatibility.deprecated import deprecated_callable
12
14
  from prefect.client.orchestration import get_client
13
15
  from prefect.client.schemas.filters import (
14
16
  FlowRunFilter,
@@ -119,6 +121,11 @@ def submit_to_runner(
119
121
  ) -> list[FlowRun]: ...
120
122
 
121
123
 
124
+ @deprecated_callable(
125
+ start_date=datetime(2025, 4, 1),
126
+ end_date=datetime(2025, 10, 1),
127
+ help="Use background tasks (https://docs.prefect.io/v3/develop/deferred-tasks) or `run_deployment` and `.serve` instead of submitting runs to the Runner webserver.",
128
+ )
122
129
  @sync_compatible
123
130
  async def submit_to_runner(
124
131
  prefect_callable: Flow[Any, Any],
@@ -186,13 +193,18 @@ async def submit_to_runner(
186
193
  return submitted_runs
187
194
 
188
195
 
196
+ @deprecated_callable(
197
+ start_date=datetime(2025, 4, 1),
198
+ end_date=datetime(2025, 10, 1),
199
+ help="Use background tasks (https://docs.prefect.io/v3/develop/deferred-tasks) or `run_deployment` and `.serve` instead of submitting runs to the Runner webserver.",
200
+ )
189
201
  @sync_compatible
190
202
  async def wait_for_submitted_runs(
191
203
  flow_run_filter: FlowRunFilter | None = None,
192
204
  task_run_filter: TaskRunFilter | None = None,
193
205
  timeout: float | None = None,
194
206
  poll_interval: float = 3.0,
195
- ):
207
+ ) -> uuid.UUID | None:
196
208
  """
197
209
  Wait for completion of any provided flow runs (eventually task runs), as well as subflow runs
198
210
  of the current flow run (if called from within a flow run and subflow runs exist).
@@ -911,6 +911,7 @@ async def update_deployment_schedule(
911
911
  session=session,
912
912
  deployment_id=deployment_id,
913
913
  auto_scheduled_only=True,
914
+ future_only=True,
914
915
  )
915
916
 
916
917
 
@@ -385,6 +385,13 @@ class ServerServicesSchedulerSettings(ServicesBaseSetting):
385
385
  ),
386
386
  )
387
387
 
388
+ recent_deployments_loop_seconds: float = Field(
389
+ default=5,
390
+ description="""
391
+ The number of seconds the recent deployments scheduler will wait between checking for recently updated deployments. Defaults to `5`.
392
+ """,
393
+ )
394
+
388
395
 
389
396
  class ServerServicesPauseExpirationsSettings(ServicesBaseSetting):
390
397
  """
@@ -776,7 +776,7 @@ def AwaitingRetry(
776
776
  """Convenience function for creating `AwaitingRetry` states.
777
777
 
778
778
  Returns:
779
- State: a AwaitingRetry state
779
+ State: an AwaitingRetry state
780
780
  """
781
781
  return Scheduled(
782
782
  cls=cls, scheduled_time=scheduled_time, name="AwaitingRetry", **kwargs
@@ -791,7 +791,7 @@ def AwaitingConcurrencySlot(
791
791
  """Convenience function for creating `AwaitingConcurrencySlot` states.
792
792
 
793
793
  Returns:
794
- State: a AwaitingConcurrencySlot state
794
+ State: an AwaitingConcurrencySlot state
795
795
  """
796
796
  return Scheduled(
797
797
  cls=cls, scheduled_time=scheduled_time, name="AwaitingConcurrencySlot", **kwargs