prefect-client 3.0.0rc8__tar.gz → 3.0.0rc10__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 (204) hide show
  1. {prefect-client-3.0.0rc8/src/prefect_client.egg-info → prefect-client-3.0.0rc10}/PKG-INFO +1 -1
  2. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/requirements-client.txt +2 -1
  3. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/requirements-dev.txt +2 -6
  4. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/compatibility/deprecated.py +53 -0
  5. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/compatibility/migration.py +53 -11
  6. prefect-client-3.0.0rc10/src/prefect/_internal/integrations.py +7 -0
  7. prefect-client-3.0.0rc10/src/prefect/agent.py +6 -0
  8. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/blocks/core.py +1 -1
  9. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/__init__.py +4 -0
  10. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/schemas/objects.py +6 -3
  11. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/utilities.py +4 -4
  12. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/context.py +6 -0
  13. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/schedules.py +5 -2
  14. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/steps/core.py +6 -0
  15. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/engine.py +4 -4
  16. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/schemas/automations.py +3 -3
  17. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/exceptions.py +4 -1
  18. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/filesystems.py +4 -3
  19. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/flow_engine.py +102 -15
  20. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/flow_runs.py +1 -1
  21. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/flows.py +65 -15
  22. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/futures.py +5 -0
  23. prefect-client-3.0.0rc10/src/prefect/infrastructure/__init__.py +6 -0
  24. prefect-client-3.0.0rc10/src/prefect/infrastructure/base.py +6 -0
  25. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/logging/loggers.py +1 -1
  26. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/results.py +85 -68
  27. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/serializers.py +3 -3
  28. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/settings.py +7 -33
  29. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/task_engine.py +78 -21
  30. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/task_runners.py +28 -16
  31. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/task_worker.py +19 -6
  32. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/tasks.py +39 -7
  33. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/transactions.py +41 -3
  34. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/asyncutils.py +37 -8
  35. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/collections.py +1 -1
  36. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/importtools.py +1 -1
  37. prefect-client-3.0.0rc10/src/prefect/utilities/timeout.py +49 -0
  38. prefect-client-3.0.0rc10/src/prefect/workers/block.py +6 -0
  39. prefect-client-3.0.0rc10/src/prefect/workers/cloud.py +6 -0
  40. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10/src/prefect_client.egg-info}/PKG-INFO +1 -1
  41. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect_client.egg-info/SOURCES.txt +5 -0
  42. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect_client.egg-info/requires.txt +2 -1
  43. prefect-client-3.0.0rc8/src/prefect/utilities/__init__.py +0 -0
  44. prefect-client-3.0.0rc8/src/prefect/utilities/timeout.py +0 -34
  45. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/LICENSE +0 -0
  46. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/MANIFEST.in +0 -0
  47. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/README.md +0 -0
  48. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/requirements.txt +0 -0
  49. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/setup.cfg +0 -0
  50. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/setup.py +0 -0
  51. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/.prefectignore +0 -0
  52. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/__init__.py +0 -0
  53. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/__init__.py +0 -0
  54. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/_logging.py +0 -0
  55. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/compatibility/__init__.py +0 -0
  56. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/compatibility/experimental.py +0 -0
  57. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/__init__.py +0 -0
  58. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/api.py +0 -0
  59. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/calls.py +0 -0
  60. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  61. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  62. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/inspection.py +0 -0
  63. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/primitives.py +0 -0
  64. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/services.py +0 -0
  65. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/threads.py +0 -0
  66. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/concurrency/waiters.py +0 -0
  67. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/pydantic/__init__.py +0 -0
  68. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
  69. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
  70. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/pydantic/schemas.py +0 -0
  71. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
  72. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  73. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  74. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/pytz.py +0 -0
  75. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/schemas/__init__.py +0 -0
  76. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/schemas/bases.py +0 -0
  77. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/schemas/fields.py +0 -0
  78. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/schemas/serializers.py +0 -0
  79. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_internal/schemas/validators.py +0 -0
  80. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/_version.py +0 -0
  81. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/artifacts.py +0 -0
  82. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/automations.py +0 -0
  83. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/blocks/__init__.py +0 -0
  84. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/blocks/abstract.py +0 -0
  85. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/blocks/fields.py +0 -0
  86. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/blocks/notifications.py +0 -0
  87. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/blocks/redis.py +0 -0
  88. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/blocks/system.py +0 -0
  89. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/blocks/webhook.py +0 -0
  90. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/cache_policies.py +0 -0
  91. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/base.py +0 -0
  92. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/cloud.py +0 -0
  93. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/collections.py +0 -0
  94. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/constants.py +0 -0
  95. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/orchestration.py +0 -0
  96. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/schemas/__init__.py +0 -0
  97. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/schemas/actions.py +0 -0
  98. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/schemas/filters.py +0 -0
  99. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/schemas/responses.py +0 -0
  100. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/schemas/schedules.py +0 -0
  101. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/schemas/sorting.py +0 -0
  102. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/subscriptions.py +0 -0
  103. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/types/__init__.py +0 -0
  104. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/client/types/flexible_schedule_list.py +0 -0
  105. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/concurrency/__init__.py +0 -0
  106. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/concurrency/asyncio.py +0 -0
  107. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/concurrency/events.py +0 -0
  108. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/concurrency/services.py +0 -0
  109. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/concurrency/sync.py +0 -0
  110. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/__init__.py +0 -0
  111. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/base.py +0 -0
  112. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/deployments.py +0 -0
  113. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/flow_runs.py +0 -0
  114. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/runner.py +0 -0
  115. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/steps/__init__.py +0 -0
  116. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/steps/pull.py +0 -0
  117. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/deployments/steps/utility.py +0 -0
  118. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/docker/__init__.py +0 -0
  119. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/docker/docker_image.py +0 -0
  120. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/__init__.py +0 -0
  121. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/actions.py +0 -0
  122. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/cli/__init__.py +0 -0
  123. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/cli/automations.py +0 -0
  124. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/clients.py +0 -0
  125. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/filters.py +0 -0
  126. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/related.py +0 -0
  127. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/schemas/__init__.py +0 -0
  128. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/schemas/deployment_triggers.py +0 -0
  129. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/schemas/events.py +0 -0
  130. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/schemas/labelling.py +0 -0
  131. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/utilities.py +0 -0
  132. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/events/worker.py +0 -0
  133. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
  134. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
  135. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
  136. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
  137. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/infrastructure/provisioners/modal.py +0 -0
  138. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/input/__init__.py +0 -0
  139. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/input/actions.py +0 -0
  140. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/input/run_input.py +0 -0
  141. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/logging/__init__.py +0 -0
  142. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/logging/configuration.py +0 -0
  143. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/logging/filters.py +0 -0
  144. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/logging/formatters.py +0 -0
  145. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/logging/handlers.py +0 -0
  146. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/logging/highlighters.py +0 -0
  147. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/logging/logging.yml +0 -0
  148. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/main.py +0 -0
  149. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/manifests.py +0 -0
  150. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/plugins.py +0 -0
  151. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/profiles.toml +0 -0
  152. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/py.typed +0 -0
  153. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/records/__init__.py +0 -0
  154. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/records/result_store.py +0 -0
  155. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/records/store.py +0 -0
  156. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runner/__init__.py +0 -0
  157. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runner/runner.py +0 -0
  158. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runner/server.py +0 -0
  159. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runner/storage.py +0 -0
  160. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runner/submit.py +0 -0
  161. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runner/utils.py +0 -0
  162. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runtime/__init__.py +0 -0
  163. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runtime/deployment.py +0 -0
  164. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runtime/flow_run.py +0 -0
  165. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/runtime/task_run.py +0 -0
  166. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
  167. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  168. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/states.py +0 -0
  169. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/task_runs.py +0 -0
  170. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/types/__init__.py +0 -0
  171. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/types/entrypoint.py +0 -0
  172. {prefect-client-3.0.0rc8/src/prefect/infrastructure → prefect-client-3.0.0rc10/src/prefect/utilities}/__init__.py +0 -0
  173. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/annotations.py +0 -0
  174. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/callables.py +0 -0
  175. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/compat.py +0 -0
  176. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/context.py +0 -0
  177. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/dispatch.py +0 -0
  178. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/dockerutils.py +0 -0
  179. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/engine.py +0 -0
  180. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/filesystem.py +0 -0
  181. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/hashing.py +0 -0
  182. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/math.py +0 -0
  183. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/names.py +0 -0
  184. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/processutils.py +0 -0
  185. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/pydantic.py +0 -0
  186. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/render_swagger.py +0 -0
  187. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  188. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/schema_tools/hydration.py +0 -0
  189. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/schema_tools/validation.py +0 -0
  190. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/services.py +0 -0
  191. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/slugify.py +0 -0
  192. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/templating.py +0 -0
  193. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/text.py +0 -0
  194. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/urls.py +0 -0
  195. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/utilities/visualization.py +0 -0
  196. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/variables.py +0 -0
  197. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/workers/__init__.py +0 -0
  198. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/workers/base.py +0 -0
  199. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/workers/process.py +0 -0
  200. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/workers/server.py +0 -0
  201. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect/workers/utilities.py +0 -0
  202. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect_client.egg-info/dependency_links.txt +0 -0
  203. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/src/prefect_client.egg-info/top_level.txt +0 -0
  204. {prefect-client-3.0.0rc8 → prefect-client-3.0.0rc10}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 3.0.0rc8
3
+ Version: 3.0.0rc10
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -33,5 +33,6 @@ sniffio >=1.3.0, < 2.0.0
33
33
  toml >= 0.10.0
34
34
  typing_extensions >= 4.5.0, < 5.0.0
35
35
  ujson >= 5.8.0, < 6.0.0
36
- uvicorn >= 0.14.0, < 0.29.0
36
+ uvicorn >=0.14.0, !=0.29.0
37
37
  websockets >= 10.4, < 13.0
38
+ wrapt >= 1.16.0
@@ -4,11 +4,6 @@ codespell>=2.2.6
4
4
  ddtrace
5
5
  ipython
6
6
  jinja2
7
- mkdocs
8
- mkdocs-gen-files
9
- mkdocs-material
10
- mkdocstrings-python
11
- mike
12
7
  moto >= 5
13
8
  mypy >= 1.9.0
14
9
  numpy
@@ -23,10 +18,10 @@ pytest-env
23
18
  pytest-flakefinder
24
19
  pytest-timeout
25
20
  pytest-xdist >= 3.6.1
26
- pytkdocs >= 0.14.2
27
21
  pyyaml
28
22
  redis>=5.0.1
29
23
  setuptools
24
+ vale
30
25
  vermin
31
26
  virtualenv
32
27
  watchfiles
@@ -40,3 +35,4 @@ types-PyYAML
40
35
  mkdocs
41
36
  mkdocs-material
42
37
  mkdocstrings[python]
38
+ mkdocs-gen-files
@@ -16,6 +16,7 @@ import warnings
16
16
  from typing import Any, Callable, List, Optional, Type, TypeVar
17
17
 
18
18
  import pendulum
19
+ import wrapt
19
20
  from pydantic import BaseModel
20
21
 
21
22
  from prefect.utilities.callables import get_call_parameters
@@ -272,3 +273,55 @@ def register_renamed_module(old_name: str, new_name: str, start_date: str):
272
273
  DEPRECATED_MODULE_ALIASES.append(
273
274
  AliasedModuleDefinition(old_name, new_name, callback)
274
275
  )
276
+
277
+
278
+ class AsyncCompatProxy(wrapt.ObjectProxy):
279
+ """
280
+ A proxy object that allows for awaiting a method that is no longer async.
281
+
282
+ See https://wrapt.readthedocs.io/en/master/wrappers.html#object-proxy for more
283
+ """
284
+
285
+ def __init__(self, wrapped, class_name: str, method_name: str):
286
+ super().__init__(wrapped)
287
+ self._self_class_name = class_name
288
+ self._self_method_name = method_name
289
+ self._self_already_awaited = False
290
+
291
+ def __await__(self):
292
+ if not self._self_already_awaited:
293
+ warnings.warn(
294
+ (
295
+ f"The {self._self_method_name!r} method on {self._self_class_name!r}"
296
+ " is no longer async and awaiting it will raise an error after Dec 2024"
297
+ " - please remove the `await` keyword."
298
+ ),
299
+ DeprecationWarning,
300
+ stacklevel=2,
301
+ )
302
+ self._self_already_awaited = True
303
+ yield
304
+ return self.__wrapped__
305
+
306
+ def __repr__(self):
307
+ return repr(self.__wrapped__)
308
+
309
+ def __reduce_ex__(self, protocol):
310
+ return (
311
+ type(self),
312
+ (self.__wrapped__,),
313
+ {"_self_already_awaited": self._self_already_awaited},
314
+ )
315
+
316
+
317
+ def deprecated_async_method(wrapped):
318
+ """Decorator that wraps a sync method to allow awaiting it even though it is no longer async."""
319
+
320
+ @wrapt.decorator
321
+ def wrapper(wrapped, instance, args, kwargs):
322
+ result = wrapped(*args, **kwargs)
323
+ return AsyncCompatProxy(
324
+ result, class_name=instance.__class__.__name__, method_name=wrapped.__name__
325
+ )
326
+
327
+ return wrapper(wrapped)
@@ -5,11 +5,41 @@ The `getattr_migration` function is used to handle imports for moved or removed
5
5
  It is used in the `__getattr__` attribute of modules that have moved or removed objects.
6
6
 
7
7
  Usage:
8
- ```python
9
- from prefect._internal.compatibility.migration import getattr_migration
10
8
 
11
- __getattr__ = getattr_migration(__name__)
12
- ```
9
+ Moved objects:
10
+ 1. Add the old and new path to the `MOVED_IN_V3` dictionary, e.g. `MOVED_IN_V3 = {"old_path": "new_path"}`
11
+ 2. In the module where the object was moved from, add the following lines:
12
+ ```python
13
+ # at top
14
+ from prefect._internal.compatibility.migration import getattr_migration
15
+
16
+ # at bottom
17
+ __getattr__ = getattr_migration(__name__)
18
+ ```
19
+
20
+ Example at src/prefect/engine.py
21
+
22
+ Removed objects:
23
+ 1. Add the old path and error message to the `REMOVED_IN_V3` dictionary, e.g. `REMOVED_IN_V3 = {"old_path": "error_message"}`
24
+ 2. In the module where the object was removed, add the following lines:
25
+ ```python
26
+ # at top
27
+ from prefect._internal.compatibility.migration import getattr_migration
28
+
29
+ # at bottom
30
+ __getattr__ = getattr_migration(__name__)
31
+
32
+ ```
33
+ If the entire old module was removed, add a stub for the module with the following lines:
34
+ ```python
35
+ # at top
36
+ from prefect._internal.compatibility.migration import getattr_migration
37
+
38
+ # at bottom
39
+ __getattr__ = getattr_migration(__name__)
40
+ ```
41
+
42
+ Example at src/prefect/infrastructure/base.py
13
43
  """
14
44
 
15
45
  import sys
@@ -27,15 +57,27 @@ MOVED_IN_V3 = {
27
57
  "prefect.engine:resume_flow_run": "prefect.flow_runs:resume_flow_run",
28
58
  "prefect.engine:suspend_flow_run": "prefect.flow_runs:suspend_flow_run",
29
59
  "prefect.engine:_in_process_pause": "prefect.flow_runs:_in_process_pause",
60
+ "prefect.client:get_client": "prefect.client.orchestration:get_client",
30
61
  }
31
62
 
63
+ upgrade_guide_msg = "Refer to the upgrade guide for more information: https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/."
64
+
32
65
  REMOVED_IN_V3 = {
33
- "prefect.deployments.deployments:Deployment": "Use 'flow.serve()', `flow.deploy()`, or `prefect deploy` instead.",
34
- "prefect.deployments:Deployment": "Use 'flow.serve()', `flow.deploy()`, or `prefect deploy` instead.",
35
- "prefect.filesystems:GCS": "Use 'prefect_gcp' instead.",
36
- "prefect.filesystems:Azure": "Use 'prefect_azure' instead.",
37
- "prefect.filesystems:S3": "Use 'prefect_aws' instead.",
38
- "prefect.engine:_out_of_process_pause": "Use 'prefect.flow_runs.pause_flow_run' instead.",
66
+ "prefect.client.schemas.objects:MinimalDeploymentSchedule": "Use `prefect.client.schemas.actions.DeploymentScheduleCreate` instead.",
67
+ "prefect.context:PrefectObjectRegistry": upgrade_guide_msg,
68
+ "prefect.deployments.deployments:Deployment": "Use `flow.serve()`, `flow.deploy()`, or `prefect deploy` instead.",
69
+ "prefect.deployments:Deployment": "Use `flow.serve()`, `flow.deploy()`, or `prefect deploy` instead.",
70
+ "prefect.filesystems:GCS": "Use `prefect_gcp.GcsBucket` instead.",
71
+ "prefect.filesystems:Azure": "Use `prefect_azure.AzureBlobStorageContainer` instead.",
72
+ "prefect.filesystems:S3": "Use `prefect_aws.S3Bucket` instead.",
73
+ "prefect.filesystems:GitHub": "Use `prefect_github.GitHubRepository` instead.",
74
+ "prefect.engine:_out_of_process_pause": "Use `prefect.flow_runs.pause_flow_run` instead.",
75
+ "prefect.agent:PrefectAgent": "Use workers instead. " + upgrade_guide_msg,
76
+ "prefect.infrastructure:KubernetesJob": "Use workers instead. " + upgrade_guide_msg,
77
+ "prefect.infrastructure.base:Infrastructure": "Use the `BaseWorker` class to create custom infrastructure integrations instead. "
78
+ + upgrade_guide_msg,
79
+ "prefect.workers.block:BlockWorkerJobConfiguration": upgrade_guide_msg,
80
+ "prefect.workers.cloud:BlockWorker": upgrade_guide_msg,
39
81
  }
40
82
 
41
83
  # IMPORTANT FOR USAGE: When adding new modules to MOVED_IN_V3 or REMOVED_IN_V3, include the following lines at the bottom of that module:
@@ -112,7 +154,7 @@ def getattr_migration(module_name: str) -> Callable[[str], Any]:
112
154
  if import_path in REMOVED_IN_V3.keys():
113
155
  error_message = REMOVED_IN_V3[import_path]
114
156
  raise PrefectImportError(
115
- f"{import_path!r} has been removed. {error_message}"
157
+ f"`{import_path}` has been removed. {error_message}"
116
158
  )
117
159
 
118
160
  globals: Dict[str, Any] = sys.modules[module_name].__dict__
@@ -0,0 +1,7 @@
1
+ KNOWN_EXTRAS_FOR_PACKAGES = {
2
+ "prefect-kubernetes": "prefect[kubernetes]",
3
+ "prefect-aws": "prefect[aws]",
4
+ "prefect-gcp": "prefect[gcp]",
5
+ "prefect-azure": "prefect[azure]",
6
+ "prefect-docker": "prefect[docker]",
7
+ }
@@ -0,0 +1,6 @@
1
+ """
2
+ 2024-06-27: This surfaces an actionable error message for moved or removed objects in Prefect 3.0 upgrade.
3
+ """
4
+ from prefect._internal.compatibility.migration import getattr_migration
5
+
6
+ __getattr__ = getattr_migration(__name__)
@@ -798,7 +798,7 @@ class Block(BaseModel, ABC):
798
798
  name: str,
799
799
  validate: bool = True,
800
800
  client: Optional["PrefectClient"] = None,
801
- ):
801
+ ) -> "Self":
802
802
  """
803
803
  Retrieves data from the block document with the given name for the block type
804
804
  that corresponds with the current class and returns an instantiated version of
@@ -15,3 +15,7 @@ $ python -m asyncio
15
15
  ```
16
16
  </div>
17
17
  """
18
+
19
+ from prefect._internal.compatibility.migration import getattr_migration
20
+
21
+ __getattr__ = getattr_migration(__name__)
@@ -8,7 +8,6 @@ from typing import (
8
8
  Generic,
9
9
  List,
10
10
  Optional,
11
- TypeVar,
12
11
  Union,
13
12
  overload,
14
13
  )
@@ -26,8 +25,9 @@ from pydantic import (
26
25
  model_validator,
27
26
  )
28
27
  from pydantic_extra_types.pendulum_dt import DateTime
29
- from typing_extensions import Literal, Self
28
+ from typing_extensions import Literal, Self, TypeVar
30
29
 
30
+ from prefect._internal.compatibility.migration import getattr_migration
31
31
  from prefect._internal.schemas.bases import ObjectBaseModel, PrefectBaseModel
32
32
  from prefect._internal.schemas.fields import CreatedBy, UpdatedBy
33
33
  from prefect._internal.schemas.validators import (
@@ -60,7 +60,7 @@ if TYPE_CHECKING:
60
60
  from prefect.results import BaseResult
61
61
 
62
62
 
63
- R = TypeVar("R")
63
+ R = TypeVar("R", default=Any)
64
64
 
65
65
 
66
66
  DEFAULT_BLOCK_SCHEMA_VERSION = "non-versioned"
@@ -1604,3 +1604,6 @@ class CsrfToken(ObjectBaseModel):
1604
1604
  expiration: datetime.datetime = Field(
1605
1605
  default=..., description="The expiration time of the CSRF token"
1606
1606
  )
1607
+
1608
+
1609
+ __getattr__ = getattr_migration(__name__)
@@ -78,10 +78,10 @@ def client_injector(
78
78
 
79
79
 
80
80
  def inject_client(
81
- fn: Callable[P, Coroutine[Any, Any, Any]],
82
- ) -> Callable[P, Coroutine[Any, Any, Any]]:
81
+ fn: Callable[P, Coroutine[Any, Any, R]],
82
+ ) -> Callable[P, Coroutine[Any, Any, R]]:
83
83
  """
84
- Simple helper to provide a context managed client to a asynchronous function.
84
+ Simple helper to provide a context managed client to an asynchronous function.
85
85
 
86
86
  The decorated function _must_ take a `client` kwarg and if a client is passed when
87
87
  called it will be used instead of creating a new one, but it will not be context
@@ -89,7 +89,7 @@ def inject_client(
89
89
  """
90
90
 
91
91
  @wraps(fn)
92
- async def with_injected_client(*args: P.args, **kwargs: P.kwargs) -> Any:
92
+ async def with_injected_client(*args: P.args, **kwargs: P.kwargs) -> R:
93
93
  client = cast(Optional["PrefectClient"], kwargs.pop("client", None))
94
94
  client, inferred = get_or_create_client(client)
95
95
  if not inferred:
@@ -32,6 +32,7 @@ from typing_extensions import Self
32
32
  import prefect.logging
33
33
  import prefect.logging.configuration
34
34
  import prefect.settings
35
+ from prefect._internal.compatibility.migration import getattr_migration
35
36
  from prefect.client.orchestration import PrefectClient, SyncPrefectClient, get_client
36
37
  from prefect.client.schemas import FlowRun, TaskRun
37
38
  from prefect.events.worker import EventsWorker
@@ -608,3 +609,8 @@ def root_settings_context():
608
609
 
609
610
 
610
611
  GLOBAL_SETTINGS_CONTEXT: SettingsContext = root_settings_context()
612
+
613
+
614
+ # 2024-07-02: This surfaces an actionable error message for removed objects
615
+ # in Prefect 3.0 upgrade.
616
+ __getattr__ = getattr_migration(__name__)
@@ -1,11 +1,14 @@
1
- from typing import TYPE_CHECKING, Any, List, Optional
1
+ from typing import TYPE_CHECKING, Any, List, Optional, Sequence, Union
2
2
 
3
3
  from prefect.client.schemas.actions import DeploymentScheduleCreate
4
4
  from prefect.client.schemas.schedules import is_schedule_type
5
5
 
6
6
  if TYPE_CHECKING:
7
7
  from prefect.client.schemas.schedules import SCHEDULE_TYPES
8
- from prefect.client.types.flexible_schedule_list import FlexibleScheduleList
8
+
9
+ FlexibleScheduleList = Sequence[
10
+ Union[DeploymentScheduleCreate, dict[str, Any], "SCHEDULE_TYPES"]
11
+ ]
9
12
 
10
13
 
11
14
  def create_deployment_schedule_create(
@@ -22,6 +22,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
22
22
 
23
23
  from prefect._internal.compatibility.deprecated import PrefectDeprecationWarning
24
24
  from prefect._internal.concurrency.api import Call, from_async
25
+ from prefect._internal.integrations import KNOWN_EXTRAS_FOR_PACKAGES
25
26
  from prefect.logging.loggers import get_logger
26
27
  from prefect.settings import PREFECT_DEBUG_MODE
27
28
  from prefect.utilities.importtools import import_object
@@ -84,6 +85,11 @@ def _get_function_for_step(
84
85
  raise
85
86
 
86
87
  try:
88
+ packages = [
89
+ KNOWN_EXTRAS_FOR_PACKAGES.get(package, package)
90
+ for package in packages
91
+ if package
92
+ ]
87
93
  subprocess.check_call([sys.executable, "-m", "pip", "install", *packages])
88
94
  except subprocess.CalledProcessError:
89
95
  get_logger("deployments.steps.core").warning(
@@ -31,16 +31,16 @@ if __name__ == "__main__":
31
31
  try:
32
32
  from prefect.flow_engine import (
33
33
  load_flow_and_flow_run,
34
- run_flow_async,
35
- run_flow_sync,
34
+ run_flow,
36
35
  )
37
36
 
38
37
  flow_run, flow = load_flow_and_flow_run(flow_run_id=flow_run_id)
39
38
  # run the flow
40
39
  if flow.isasync:
41
- run_coro_as_sync(run_flow_async(flow, flow_run=flow_run))
40
+ run_coro_as_sync(run_flow(flow, flow_run=flow_run))
42
41
  else:
43
- run_flow_sync(flow, flow_run=flow_run)
42
+ run_flow(flow, flow_run=flow_run)
43
+
44
44
  except Abort as exc:
45
45
  engine_logger.info(
46
46
  f"Engine execution of flow run '{flow_run_id}' aborted by orchestrator:"
@@ -187,18 +187,18 @@ class EventTrigger(ResourceTrigger):
187
187
  within: Optional[timedelta] = data.get("within")
188
188
 
189
189
  if isinstance(within, (int, float)):
190
- data["within"] = within = timedelta(seconds=within)
190
+ within = timedelta(seconds=within)
191
191
 
192
192
  if posture == Posture.Proactive:
193
193
  if not within or within == timedelta(0):
194
- data["within"] = timedelta(seconds=10.0)
194
+ within = timedelta(seconds=10.0)
195
195
  elif within < timedelta(seconds=10.0):
196
196
  raise ValueError(
197
197
  "`within` for Proactive triggers must be greater than or equal to "
198
198
  "10 seconds"
199
199
  )
200
200
 
201
- return data
201
+ return data | {"within": within} if within else data
202
202
 
203
203
  def describe_for_cli(self, indent: int = 0) -> str:
204
204
  """Return a human-readable description of this trigger for the CLI"""
@@ -178,7 +178,10 @@ class ParameterTypeError(PrefectException):
178
178
 
179
179
  @classmethod
180
180
  def from_validation_error(cls, exc: ValidationError) -> Self:
181
- bad_params = [f'{".".join(err["loc"])}: {err["msg"]}' for err in exc.errors()]
181
+ bad_params = [
182
+ f'{".".join(str(item) for item in err["loc"])}: {err["msg"]}'
183
+ for err in exc.errors()
184
+ ]
182
185
  msg = "Flow run received invalid parameters:\n - " + "\n - ".join(bad_params)
183
186
  return cls(msg)
184
187
 
@@ -95,7 +95,7 @@ class LocalFileSystem(WritableFileSystem, WritableDeploymentStorage):
95
95
  def cast_pathlib(cls, value):
96
96
  return stringify_path(value)
97
97
 
98
- def _resolve_path(self, path: str) -> Path:
98
+ def _resolve_path(self, path: str, validate: bool = False) -> Path:
99
99
  # Only resolve the base path at runtime, default to the current directory
100
100
  basepath = (
101
101
  Path(self.basepath).expanduser().resolve()
@@ -114,11 +114,12 @@ class LocalFileSystem(WritableFileSystem, WritableDeploymentStorage):
114
114
  resolved_path = basepath / resolved_path
115
115
  else:
116
116
  resolved_path = resolved_path.resolve()
117
+
118
+ if validate:
117
119
  if basepath not in resolved_path.parents and (basepath != resolved_path):
118
120
  raise ValueError(
119
121
  f"Provided path {resolved_path} is outside of the base path {basepath}."
120
122
  )
121
-
122
123
  return resolved_path
123
124
 
124
125
  @sync_compatible
@@ -184,7 +185,7 @@ class LocalFileSystem(WritableFileSystem, WritableDeploymentStorage):
184
185
  Defaults to copying the entire contents of the current working directory to the block's basepath.
185
186
  An `ignore_file` path may be provided that can include gitignore style expressions for filepaths to ignore.
186
187
  """
187
- destination_path = self._resolve_path(to_path)
188
+ destination_path = self._resolve_path(to_path, validate=True)
188
189
 
189
190
  if not local_path:
190
191
  local_path = Path(".").absolute()