prefect-client 3.0.0rc6__tar.gz → 3.0.0rc8__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 (197) hide show
  1. {prefect-client-3.0.0rc6/src/prefect_client.egg-info → prefect-client-3.0.0rc8}/PKG-INFO +1 -1
  2. prefect-client-3.0.0rc8/src/prefect/__init__.py +121 -0
  3. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/compatibility/migration.py +2 -2
  4. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/orchestration.py +0 -3
  5. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/schemas/actions.py +0 -2
  6. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/schemas/objects.py +12 -8
  7. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/schemas/responses.py +0 -6
  8. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/flows.py +7 -11
  9. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/futures.py +73 -13
  10. prefect-client-3.0.0rc6/src/prefect/__init__.py → prefect-client-3.0.0rc8/src/prefect/main.py +0 -33
  11. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/plugins.py +1 -64
  12. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/results.py +14 -71
  13. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runner/storage.py +75 -6
  14. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/settings.py +14 -138
  15. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/states.py +54 -5
  16. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/task_engine.py +10 -0
  17. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/task_runners.py +113 -7
  18. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/tasks.py +66 -26
  19. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8/src/prefect_client.egg-info}/PKG-INFO +1 -1
  20. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect_client.egg-info/SOURCES.txt +1 -0
  21. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/LICENSE +0 -0
  22. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/MANIFEST.in +0 -0
  23. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/README.md +0 -0
  24. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/requirements-client.txt +0 -0
  25. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/requirements-dev.txt +0 -0
  26. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/requirements.txt +0 -0
  27. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/setup.cfg +0 -0
  28. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/setup.py +0 -0
  29. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/.prefectignore +0 -0
  30. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/__init__.py +0 -0
  31. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/_logging.py +0 -0
  32. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/compatibility/__init__.py +0 -0
  33. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/compatibility/deprecated.py +0 -0
  34. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/compatibility/experimental.py +0 -0
  35. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/__init__.py +0 -0
  36. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/api.py +0 -0
  37. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/calls.py +0 -0
  38. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  39. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  40. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/inspection.py +0 -0
  41. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/primitives.py +0 -0
  42. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/services.py +0 -0
  43. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/threads.py +0 -0
  44. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/concurrency/waiters.py +0 -0
  45. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/pydantic/__init__.py +0 -0
  46. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
  47. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
  48. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/pydantic/schemas.py +0 -0
  49. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
  50. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  51. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  52. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/pytz.py +0 -0
  53. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/schemas/__init__.py +0 -0
  54. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/schemas/bases.py +0 -0
  55. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/schemas/fields.py +0 -0
  56. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/schemas/serializers.py +0 -0
  57. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_internal/schemas/validators.py +0 -0
  58. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/_version.py +0 -0
  59. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/artifacts.py +0 -0
  60. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/automations.py +0 -0
  61. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/blocks/__init__.py +0 -0
  62. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/blocks/abstract.py +0 -0
  63. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/blocks/core.py +0 -0
  64. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/blocks/fields.py +0 -0
  65. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/blocks/notifications.py +0 -0
  66. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/blocks/redis.py +0 -0
  67. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/blocks/system.py +0 -0
  68. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/blocks/webhook.py +0 -0
  69. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/cache_policies.py +0 -0
  70. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/__init__.py +0 -0
  71. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/base.py +0 -0
  72. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/cloud.py +0 -0
  73. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/collections.py +0 -0
  74. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/constants.py +0 -0
  75. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/schemas/__init__.py +0 -0
  76. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/schemas/filters.py +0 -0
  77. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/schemas/schedules.py +0 -0
  78. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/schemas/sorting.py +0 -0
  79. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/subscriptions.py +0 -0
  80. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/types/__init__.py +0 -0
  81. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/types/flexible_schedule_list.py +0 -0
  82. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/client/utilities.py +0 -0
  83. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/concurrency/__init__.py +0 -0
  84. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/concurrency/asyncio.py +0 -0
  85. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/concurrency/events.py +0 -0
  86. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/concurrency/services.py +0 -0
  87. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/concurrency/sync.py +0 -0
  88. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/context.py +0 -0
  89. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/__init__.py +0 -0
  90. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/base.py +0 -0
  91. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/deployments.py +0 -0
  92. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/flow_runs.py +0 -0
  93. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/runner.py +0 -0
  94. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/schedules.py +0 -0
  95. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/steps/__init__.py +0 -0
  96. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/steps/core.py +0 -0
  97. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/steps/pull.py +0 -0
  98. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/deployments/steps/utility.py +0 -0
  99. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/docker/__init__.py +0 -0
  100. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/docker/docker_image.py +0 -0
  101. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/engine.py +0 -0
  102. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/__init__.py +0 -0
  103. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/actions.py +0 -0
  104. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/cli/__init__.py +0 -0
  105. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/cli/automations.py +0 -0
  106. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/clients.py +0 -0
  107. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/filters.py +0 -0
  108. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/related.py +0 -0
  109. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/schemas/__init__.py +0 -0
  110. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/schemas/automations.py +0 -0
  111. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/schemas/deployment_triggers.py +0 -0
  112. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/schemas/events.py +0 -0
  113. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/schemas/labelling.py +0 -0
  114. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/utilities.py +0 -0
  115. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/events/worker.py +0 -0
  116. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/exceptions.py +0 -0
  117. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/filesystems.py +0 -0
  118. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/flow_engine.py +0 -0
  119. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/flow_runs.py +0 -0
  120. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/infrastructure/__init__.py +0 -0
  121. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
  122. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
  123. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
  124. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
  125. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/infrastructure/provisioners/modal.py +0 -0
  126. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/input/__init__.py +0 -0
  127. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/input/actions.py +0 -0
  128. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/input/run_input.py +0 -0
  129. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/logging/__init__.py +0 -0
  130. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/logging/configuration.py +0 -0
  131. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/logging/filters.py +0 -0
  132. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/logging/formatters.py +0 -0
  133. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/logging/handlers.py +0 -0
  134. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/logging/highlighters.py +0 -0
  135. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/logging/loggers.py +0 -0
  136. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/logging/logging.yml +0 -0
  137. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/manifests.py +0 -0
  138. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/profiles.toml +0 -0
  139. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/py.typed +0 -0
  140. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/records/__init__.py +0 -0
  141. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/records/result_store.py +0 -0
  142. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/records/store.py +0 -0
  143. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runner/__init__.py +0 -0
  144. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runner/runner.py +0 -0
  145. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runner/server.py +0 -0
  146. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runner/submit.py +0 -0
  147. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runner/utils.py +0 -0
  148. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runtime/__init__.py +0 -0
  149. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runtime/deployment.py +0 -0
  150. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runtime/flow_run.py +0 -0
  151. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/runtime/task_run.py +0 -0
  152. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/serializers.py +0 -0
  153. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
  154. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  155. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/task_runs.py +0 -0
  156. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/task_worker.py +0 -0
  157. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/transactions.py +0 -0
  158. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/types/__init__.py +0 -0
  159. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/types/entrypoint.py +0 -0
  160. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/__init__.py +0 -0
  161. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/annotations.py +0 -0
  162. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/asyncutils.py +0 -0
  163. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/callables.py +0 -0
  164. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/collections.py +0 -0
  165. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/compat.py +0 -0
  166. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/context.py +0 -0
  167. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/dispatch.py +0 -0
  168. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/dockerutils.py +0 -0
  169. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/engine.py +0 -0
  170. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/filesystem.py +0 -0
  171. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/hashing.py +0 -0
  172. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/importtools.py +0 -0
  173. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/math.py +0 -0
  174. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/names.py +0 -0
  175. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/processutils.py +0 -0
  176. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/pydantic.py +0 -0
  177. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/render_swagger.py +0 -0
  178. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  179. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/schema_tools/hydration.py +0 -0
  180. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/schema_tools/validation.py +0 -0
  181. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/services.py +0 -0
  182. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/slugify.py +0 -0
  183. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/templating.py +0 -0
  184. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/text.py +0 -0
  185. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/timeout.py +0 -0
  186. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/urls.py +0 -0
  187. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/utilities/visualization.py +0 -0
  188. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/variables.py +0 -0
  189. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/workers/__init__.py +0 -0
  190. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/workers/base.py +0 -0
  191. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/workers/process.py +0 -0
  192. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/workers/server.py +0 -0
  193. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect/workers/utilities.py +0 -0
  194. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect_client.egg-info/dependency_links.txt +0 -0
  195. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect_client.egg-info/requires.txt +0 -0
  196. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/src/prefect_client.egg-info/top_level.txt +0 -0
  197. {prefect-client-3.0.0rc6 → prefect-client-3.0.0rc8}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 3.0.0rc6
3
+ Version: 3.0.0rc8
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -0,0 +1,121 @@
1
+ # isort: skip_file
2
+
3
+ # Setup version and path constants
4
+
5
+ from . import _version
6
+ import importlib
7
+ import pathlib
8
+ from typing import TYPE_CHECKING, Any
9
+
10
+ __version_info__ = _version.get_versions()
11
+ __version__ = __version_info__["version"]
12
+
13
+ # The absolute path to this module
14
+ __module_path__ = pathlib.Path(__file__).parent
15
+ # The absolute path to the root of the repository, only valid for use during development
16
+ __development_base_path__ = __module_path__.parents[1]
17
+
18
+ # The absolute path to the built UI within the Python module, used by
19
+ # `prefect server start` to serve a dynamic build of the UI
20
+ __ui_static_subpath__ = __module_path__ / "server" / "ui_build"
21
+
22
+ # The absolute path to the built UI within the Python module
23
+ __ui_static_path__ = __module_path__ / "server" / "ui"
24
+
25
+ del _version, pathlib
26
+
27
+ if TYPE_CHECKING:
28
+ from .main import (
29
+ allow_failure,
30
+ flow,
31
+ Flow,
32
+ get_client,
33
+ get_run_logger,
34
+ Manifest,
35
+ State,
36
+ tags,
37
+ task,
38
+ Task,
39
+ Transaction,
40
+ unmapped,
41
+ serve,
42
+ deploy,
43
+ pause_flow_run,
44
+ resume_flow_run,
45
+ suspend_flow_run,
46
+ )
47
+
48
+ _slots: dict[str, Any] = {
49
+ "__version_info__": __version_info__,
50
+ "__version__": __version__,
51
+ "__module_path__": __module_path__,
52
+ "__development_base_path__": __development_base_path__,
53
+ "__ui_static_subpath__": __ui_static_subpath__,
54
+ "__ui_static_path__": __ui_static_path__,
55
+ }
56
+
57
+ _public_api: dict[str, tuple[str, str]] = {
58
+ "allow_failure": (__spec__.parent, ".main"),
59
+ "flow": (__spec__.parent, ".main"),
60
+ "Flow": (__spec__.parent, ".main"),
61
+ "get_client": (__spec__.parent, ".main"),
62
+ "get_run_logger": (__spec__.parent, ".main"),
63
+ "Manifest": (__spec__.parent, ".main"),
64
+ "State": (__spec__.parent, ".main"),
65
+ "tags": (__spec__.parent, ".main"),
66
+ "task": (__spec__.parent, ".main"),
67
+ "Task": (__spec__.parent, ".main"),
68
+ "Transaction": (__spec__.parent, ".main"),
69
+ "unmapped": (__spec__.parent, ".main"),
70
+ "serve": (__spec__.parent, ".main"),
71
+ "deploy": (__spec__.parent, ".main"),
72
+ "pause_flow_run": (__spec__.parent, ".main"),
73
+ "resume_flow_run": (__spec__.parent, ".main"),
74
+ "suspend_flow_run": (__spec__.parent, ".main"),
75
+ }
76
+
77
+ # Declare API for type-checkers
78
+ __all__ = [
79
+ "allow_failure",
80
+ "flow",
81
+ "Flow",
82
+ "get_client",
83
+ "get_run_logger",
84
+ "Manifest",
85
+ "State",
86
+ "tags",
87
+ "task",
88
+ "Task",
89
+ "Transaction",
90
+ "unmapped",
91
+ "serve",
92
+ "deploy",
93
+ "pause_flow_run",
94
+ "resume_flow_run",
95
+ "suspend_flow_run",
96
+ "__version_info__",
97
+ "__version__",
98
+ "__module_path__",
99
+ "__development_base_path__",
100
+ "__ui_static_subpath__",
101
+ "__ui_static_path__",
102
+ ]
103
+
104
+
105
+ def __getattr__(attr_name: str) -> object:
106
+ if attr_name in _slots:
107
+ return _slots[attr_name]
108
+
109
+ dynamic_attr = _public_api.get(attr_name)
110
+ if dynamic_attr is None:
111
+ return importlib.import_module(f".{attr_name}", package=__name__)
112
+
113
+ package, module_name = dynamic_attr
114
+
115
+ from importlib import import_module
116
+
117
+ if module_name == "__module__":
118
+ return import_module(f".{attr_name}", package=package)
119
+ else:
120
+ module = import_module(module_name, package=package)
121
+ return getattr(module, attr_name)
@@ -30,8 +30,8 @@ MOVED_IN_V3 = {
30
30
  }
31
31
 
32
32
  REMOVED_IN_V3 = {
33
- "prefect.deployments.deployments:Deployment": "Use 'flow.serve()' or `prefect deploy` instead.",
34
- "prefect.deployments:Deployment": "Use 'flow.serve()' or `prefect deploy` instead.",
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
35
  "prefect.filesystems:GCS": "Use 'prefect_gcp' instead.",
36
36
  "prefect.filesystems:Azure": "Use 'prefect_azure' instead.",
37
37
  "prefect.filesystems:S3": "Use 'prefect_aws' instead.",
@@ -1601,7 +1601,6 @@ class PrefectClient:
1601
1601
  work_pool_name: Optional[str] = None,
1602
1602
  tags: Optional[List[str]] = None,
1603
1603
  storage_document_id: Optional[UUID] = None,
1604
- manifest_path: Optional[str] = None,
1605
1604
  path: Optional[str] = None,
1606
1605
  entrypoint: Optional[str] = None,
1607
1606
  infrastructure_document_id: Optional[UUID] = None,
@@ -1650,7 +1649,6 @@ class PrefectClient:
1650
1649
  storage_document_id=storage_document_id,
1651
1650
  path=path,
1652
1651
  entrypoint=entrypoint,
1653
- manifest_path=manifest_path, # for backwards compat
1654
1652
  infrastructure_document_id=infrastructure_document_id,
1655
1653
  job_variables=dict(job_variables or {}),
1656
1654
  parameter_openapi_schema=parameter_openapi_schema,
@@ -1723,7 +1721,6 @@ class PrefectClient:
1723
1721
  description=deployment.description,
1724
1722
  work_queue_name=deployment.work_queue_name,
1725
1723
  tags=deployment.tags,
1726
- manifest_path=deployment.manifest_path,
1727
1724
  path=deployment.path,
1728
1725
  entrypoint=deployment.entrypoint,
1729
1726
  parameters=deployment.parameters,
@@ -173,7 +173,6 @@ class DeploymentCreate(ActionBaseModel):
173
173
  tags: List[str] = Field(default_factory=list)
174
174
  pull_steps: Optional[List[dict]] = Field(None)
175
175
 
176
- manifest_path: Optional[str] = Field(None)
177
176
  work_queue_name: Optional[str] = Field(None)
178
177
  work_pool_name: Optional[str] = Field(
179
178
  default=None,
@@ -246,7 +245,6 @@ class DeploymentUpdate(ActionBaseModel):
246
245
  description="Overrides to apply to flow run infrastructure at runtime.",
247
246
  )
248
247
  entrypoint: Optional[str] = Field(None)
249
- manifest_path: Optional[str] = Field(None)
250
248
  storage_document_id: Optional[UUID] = Field(None)
251
249
  infrastructure_document_id: Optional[UUID] = Field(None)
252
250
  enforce_parameter_schema: Optional[bool] = Field(
@@ -179,7 +179,10 @@ class State(ObjectBaseModel, Generic[R]):
179
179
  ...
180
180
 
181
181
  def result(
182
- self, raise_on_failure: bool = True, fetch: Optional[bool] = None
182
+ self,
183
+ raise_on_failure: bool = True,
184
+ fetch: Optional[bool] = None,
185
+ retry_result_failure: bool = True,
183
186
  ) -> Union[R, Exception]:
184
187
  """
185
188
  Retrieve the result attached to this state.
@@ -191,6 +194,8 @@ class State(ObjectBaseModel, Generic[R]):
191
194
  results into data. For synchronous users, this defaults to `True`.
192
195
  For asynchronous users, this defaults to `False` for backwards
193
196
  compatibility.
197
+ retry_result_failure: a boolean specifying whether to retry on failures to
198
+ load the result from result storage
194
199
 
195
200
  Raises:
196
201
  TypeError: If the state is failed but the result is not an exception.
@@ -253,7 +258,12 @@ class State(ObjectBaseModel, Generic[R]):
253
258
  """
254
259
  from prefect.states import get_state_result
255
260
 
256
- return get_state_result(self, raise_on_failure=raise_on_failure, fetch=fetch)
261
+ return get_state_result(
262
+ self,
263
+ raise_on_failure=raise_on_failure,
264
+ fetch=fetch,
265
+ retry_result_failure=retry_result_failure,
266
+ )
257
267
 
258
268
  def to_state_create(self):
259
269
  """
@@ -1040,12 +1050,6 @@ class Deployment(ObjectBaseModel):
1040
1050
  "The path to the entrypoint for the workflow, relative to the `path`."
1041
1051
  ),
1042
1052
  )
1043
- manifest_path: Optional[str] = Field(
1044
- default=None,
1045
- description=(
1046
- "The path to the flow's manifest file, relative to the chosen storage."
1047
- ),
1048
- )
1049
1053
  storage_document_id: Optional[UUID] = Field(
1050
1054
  default=None,
1051
1055
  description="The block document defining storage used for this flow.",
@@ -371,12 +371,6 @@ class DeploymentResponse(ObjectBaseModel):
371
371
  "The path to the entrypoint for the workflow, relative to the `path`."
372
372
  ),
373
373
  )
374
- manifest_path: Optional[str] = Field(
375
- default=None,
376
- description=(
377
- "The path to the flow's manifest file, relative to the chosen storage."
378
- ),
379
- )
380
374
  storage_document_id: Optional[UUID] = Field(
381
375
  default=None,
382
376
  description="The block document defining storage used for this flow.",
@@ -8,7 +8,6 @@ import ast
8
8
  import datetime
9
9
  import importlib.util
10
10
  import inspect
11
- import json
12
11
  import os
13
12
  import re
14
13
  import sys
@@ -72,8 +71,9 @@ from prefect.logging.loggers import flow_run_logger
72
71
  from prefect.results import ResultSerializer, ResultStorage
73
72
  from prefect.runner.storage import (
74
73
  BlockStorageAdapter,
74
+ LocalStorage,
75
75
  RunnerStorage,
76
- create_storage_from_url,
76
+ create_storage_from_source,
77
77
  )
78
78
  from prefect.settings import (
79
79
  PREFECT_DEFAULT_WORK_POOL_NAME,
@@ -969,7 +969,7 @@ class Flow(Generic[P, R]):
969
969
  ```
970
970
  """
971
971
  if isinstance(source, str):
972
- storage = create_storage_from_url(source)
972
+ storage = create_storage_from_source(source)
973
973
  elif isinstance(source, RunnerStorage):
974
974
  storage = source
975
975
  elif hasattr(source, "get_directory"):
@@ -980,6 +980,9 @@ class Flow(Generic[P, R]):
980
980
  " URL to remote storage or a storage object."
981
981
  )
982
982
  with tempfile.TemporaryDirectory() as tmpdir:
983
+ if not isinstance(storage, LocalStorage):
984
+ storage.set_base_path(Path(tmpdir))
985
+ await storage.pull_code()
983
986
  storage.set_base_path(Path(tmpdir))
984
987
  await storage.pull_code()
985
988
 
@@ -1811,7 +1814,7 @@ async def load_flow_from_flow_run(
1811
1814
  )
1812
1815
  storage_block = Block._from_block_document(storage_document)
1813
1816
  else:
1814
- basepath = deployment.path or Path(deployment.manifest_path).parent
1817
+ basepath = deployment.path
1815
1818
  if runner_storage_base_path:
1816
1819
  basepath = str(basepath).replace(
1817
1820
  "$STORAGE_BASE_PATH", runner_storage_base_path
@@ -1836,13 +1839,6 @@ async def load_flow_from_flow_run(
1836
1839
  os.chdir(output["directory"])
1837
1840
 
1838
1841
  import_path = relative_path_to_current_platform(deployment.entrypoint)
1839
- # for backwards compat
1840
- if deployment.manifest_path:
1841
- with open(deployment.manifest_path, "r") as f:
1842
- import_path = json.load(f)["import_path"]
1843
- import_path = (
1844
- Path(deployment.manifest_path).parent / import_path
1845
- ).absolute()
1846
1842
  run_logger.debug(f"Importing flow code from '{import_path}'")
1847
1843
 
1848
1844
  flow = await run_sync_in_worker_thread(load_flow_from_entrypoint, str(import_path))
@@ -2,8 +2,9 @@ import abc
2
2
  import concurrent.futures
3
3
  import inspect
4
4
  import uuid
5
+ from collections.abc import Iterator
5
6
  from functools import partial
6
- from typing import Any, Generic, Optional, Set, Union, cast
7
+ from typing import Any, Generic, List, Optional, Set, Union, cast
7
8
 
8
9
  from typing_extensions import TypeVar
9
10
 
@@ -16,13 +17,15 @@ from prefect.task_runs import TaskRunWaiter
16
17
  from prefect.utilities.annotations import quote
17
18
  from prefect.utilities.asyncutils import run_coro_as_sync
18
19
  from prefect.utilities.collections import StopVisiting, visit_collection
20
+ from prefect.utilities.timeout import timeout as timeout_context
19
21
 
20
22
  F = TypeVar("F")
23
+ R = TypeVar("R")
21
24
 
22
25
  logger = get_logger(__name__)
23
26
 
24
27
 
25
- class PrefectFuture(abc.ABC):
28
+ class PrefectFuture(abc.ABC, Generic[R]):
26
29
  """
27
30
  Abstract base class for Prefect futures. A Prefect future is a handle to the
28
31
  asynchronous execution of a task run. It provides methods to wait for the task
@@ -31,7 +34,7 @@ class PrefectFuture(abc.ABC):
31
34
 
32
35
  def __init__(self, task_run_id: uuid.UUID):
33
36
  self._task_run_id = task_run_id
34
- self._final_state = None
37
+ self._final_state: Optional[State[R]] = None
35
38
 
36
39
  @property
37
40
  def task_run_id(self) -> uuid.UUID:
@@ -61,7 +64,7 @@ class PrefectFuture(abc.ABC):
61
64
  If the task run has already completed, this method will return immediately.
62
65
 
63
66
  Args:
64
- - timeout: The maximum number of seconds to wait for the task run to complete.
67
+ timeout: The maximum number of seconds to wait for the task run to complete.
65
68
  If the task run has not completed after the timeout has elapsed, this method will return.
66
69
  """
67
70
 
@@ -70,7 +73,7 @@ class PrefectFuture(abc.ABC):
70
73
  self,
71
74
  timeout: Optional[float] = None,
72
75
  raise_on_failure: bool = True,
73
- ) -> Any:
76
+ ) -> R:
74
77
  ...
75
78
  """
76
79
  Get the result of the task run associated with this future.
@@ -78,16 +81,16 @@ class PrefectFuture(abc.ABC):
78
81
  If the task run has not completed, this method will wait for the task run to complete.
79
82
 
80
83
  Args:
81
- - timeout: The maximum number of seconds to wait for the task run to complete.
84
+ timeout: The maximum number of seconds to wait for the task run to complete.
82
85
  If the task run has not completed after the timeout has elapsed, this method will return.
83
- - raise_on_failure: If `True`, an exception will be raised if the task run fails.
86
+ raise_on_failure: If `True`, an exception will be raised if the task run fails.
84
87
 
85
88
  Returns:
86
89
  The result of the task run.
87
90
  """
88
91
 
89
92
 
90
- class PrefectWrappedFuture(PrefectFuture, abc.ABC, Generic[F]):
93
+ class PrefectWrappedFuture(PrefectFuture, abc.ABC, Generic[R, F]):
91
94
  """
92
95
  A Prefect future that wraps another future object.
93
96
  """
@@ -102,7 +105,7 @@ class PrefectWrappedFuture(PrefectFuture, abc.ABC, Generic[F]):
102
105
  return self._wrapped_future
103
106
 
104
107
 
105
- class PrefectConcurrentFuture(PrefectWrappedFuture[concurrent.futures.Future]):
108
+ class PrefectConcurrentFuture(PrefectWrappedFuture[R, concurrent.futures.Future]):
106
109
  """
107
110
  A Prefect future that wraps a concurrent.futures.Future. This future is used
108
111
  when the task run is submitted to a ThreadPoolExecutor.
@@ -120,7 +123,7 @@ class PrefectConcurrentFuture(PrefectWrappedFuture[concurrent.futures.Future]):
120
123
  self,
121
124
  timeout: Optional[float] = None,
122
125
  raise_on_failure: bool = True,
123
- ) -> Any:
126
+ ) -> R:
124
127
  if not self._final_state:
125
128
  try:
126
129
  future_result = self._wrapped_future.result(timeout=timeout)
@@ -156,7 +159,7 @@ class PrefectConcurrentFuture(PrefectWrappedFuture[concurrent.futures.Future]):
156
159
  )
157
160
 
158
161
 
159
- class PrefectDistributedFuture(PrefectFuture):
162
+ class PrefectDistributedFuture(PrefectFuture[R]):
160
163
  """
161
164
  Represents the result of a computation happening anywhere.
162
165
 
@@ -205,7 +208,7 @@ class PrefectDistributedFuture(PrefectFuture):
205
208
  self,
206
209
  timeout: Optional[float] = None,
207
210
  raise_on_failure: bool = True,
208
- ) -> Any:
211
+ ) -> R:
209
212
  return run_coro_as_sync(
210
213
  self.result_async(timeout=timeout, raise_on_failure=raise_on_failure)
211
214
  )
@@ -214,7 +217,7 @@ class PrefectDistributedFuture(PrefectFuture):
214
217
  self,
215
218
  timeout: Optional[float] = None,
216
219
  raise_on_failure: bool = True,
217
- ):
220
+ ) -> R:
218
221
  if not self._final_state:
219
222
  await self.wait_async(timeout=timeout)
220
223
  if not self._final_state:
@@ -232,6 +235,63 @@ class PrefectDistributedFuture(PrefectFuture):
232
235
  return self.task_run_id == other.task_run_id
233
236
 
234
237
 
238
+ class PrefectFutureList(list, Iterator, Generic[F]):
239
+ """
240
+ A list of Prefect futures.
241
+
242
+ This class provides methods to wait for all futures
243
+ in the list to complete and to retrieve the results of all task runs.
244
+ """
245
+
246
+ def wait(self, timeout: Optional[float] = None) -> None:
247
+ """
248
+ Wait for all futures in the list to complete.
249
+
250
+ Args:
251
+ timeout: The maximum number of seconds to wait for all futures to
252
+ complete. This method will not raise if the timeout is reached.
253
+ """
254
+ try:
255
+ with timeout_context(timeout):
256
+ for future in self:
257
+ future.wait()
258
+ except TimeoutError:
259
+ logger.debug("Timed out waiting for all futures to complete.")
260
+ return
261
+
262
+ def result(
263
+ self,
264
+ timeout: Optional[float] = None,
265
+ raise_on_failure: bool = True,
266
+ ) -> List:
267
+ """
268
+ Get the results of all task runs associated with the futures in the list.
269
+
270
+ Args:
271
+ timeout: The maximum number of seconds to wait for all futures to
272
+ complete.
273
+ raise_on_failure: If `True`, an exception will be raised if any task run fails.
274
+
275
+ Returns:
276
+ A list of results of the task runs.
277
+
278
+ Raises:
279
+ TimeoutError: If the timeout is reached before all futures complete.
280
+ """
281
+ try:
282
+ with timeout_context(timeout):
283
+ return [
284
+ future.result(raise_on_failure=raise_on_failure) for future in self
285
+ ]
286
+ except TimeoutError as exc:
287
+ # timeout came from inside the task
288
+ if "Scope timed out after {timeout} second(s)." not in str(exc):
289
+ raise
290
+ raise TimeoutError(
291
+ f"Timed out waiting for all futures to complete within {timeout} seconds"
292
+ ) from exc
293
+
294
+
235
295
  def resolve_futures_to_states(
236
296
  expr: Union[PrefectFuture, Any],
237
297
  ) -> Union[State, Any]:
@@ -1,29 +1,3 @@
1
- # isort: skip_file
2
-
3
- # Setup version and path constants
4
-
5
- from . import _version
6
- import importlib
7
- import pathlib
8
-
9
- __version_info__ = _version.get_versions()
10
- __version__ = __version_info__["version"]
11
-
12
- # The absolute path to this module
13
- __module_path__ = pathlib.Path(__file__).parent
14
- # The absolute path to the root of the repository, only valid for use during development
15
- __development_base_path__ = __module_path__.parents[1]
16
-
17
- # The absolute path to the built UI within the Python module, used by
18
- # `prefect server start` to serve a dynamic build of the UI
19
- __ui_static_subpath__ = __module_path__ / "server" / "ui_build"
20
-
21
- # The absolute path to the built UI within the Python module
22
- __ui_static_path__ = __module_path__ / "server" / "ui"
23
-
24
- del _version, pathlib
25
-
26
-
27
1
  # Import user-facing API
28
2
  from prefect.deployments import deploy
29
3
  from prefect.states import State
@@ -58,9 +32,6 @@ prefect.client.schemas.State.model_rebuild()
58
32
  prefect.client.schemas.StateCreate.model_rebuild()
59
33
  Transaction.model_rebuild()
60
34
 
61
-
62
- prefect.plugins.load_extra_entrypoints()
63
-
64
35
  # Configure logging
65
36
  import prefect.logging.configuration
66
37
 
@@ -69,10 +40,6 @@ prefect.logging.get_logger("profiles").debug(
69
40
  f"Using profile {prefect.context.get_settings_context().profile.name!r}"
70
41
  )
71
42
 
72
- # Ensure moved names are accessible at old locations
73
- prefect.client.get_client = get_client
74
- prefect.client.PrefectClient = PrefectClient
75
-
76
43
 
77
44
  from prefect._internal.compatibility.deprecated import (
78
45
  inject_renamed_module_alias_finder,
@@ -8,12 +8,11 @@ Currently supported entrypoints:
8
8
  should be imported when Prefect is imported.
9
9
  """
10
10
 
11
- import sys
12
11
  from types import ModuleType
13
12
  from typing import Any, Dict, Union
14
13
 
15
14
  import prefect.settings
16
- from prefect.utilities.compat import EntryPoint, EntryPoints, entry_points
15
+ from prefect.utilities.compat import EntryPoints, entry_points
17
16
 
18
17
 
19
18
  def safe_load_entrypoints(entrypoints: EntryPoints) -> Dict[str, Union[Exception, Any]]:
@@ -39,68 +38,6 @@ def safe_load_entrypoints(entrypoints: EntryPoints) -> Dict[str, Union[Exception
39
38
  return results
40
39
 
41
40
 
42
- def load_extra_entrypoints() -> Dict[str, Union[Exception, Any]]:
43
- # Note: Return values are only exposed for testing.
44
- results = {}
45
-
46
- if not prefect.settings.PREFECT_EXTRA_ENTRYPOINTS.value():
47
- return results
48
-
49
- values = {
50
- value.strip()
51
- for value in prefect.settings.PREFECT_EXTRA_ENTRYPOINTS.value().split(",")
52
- }
53
-
54
- entrypoints = []
55
- for value in values:
56
- try:
57
- entrypoint = EntryPoint(name=None, value=value, group="prefect-extra")
58
- except Exception as exc:
59
- print(
60
- (
61
- f"Warning! Failed to parse extra entrypoint {value!r}:"
62
- f" {type(exc).__name__}: {exc}"
63
- ),
64
- file=sys.stderr,
65
- )
66
- results[value] = exc
67
- else:
68
- entrypoints.append(entrypoint)
69
-
70
- for value, result in zip(
71
- values, safe_load_entrypoints(EntryPoints(entrypoints)).values()
72
- ):
73
- results[value] = result
74
-
75
- if isinstance(result, Exception):
76
- print(
77
- (
78
- f"Warning! Failed to load extra entrypoint {value!r}:"
79
- f" {type(result).__name__}: {result}"
80
- ),
81
- file=sys.stderr,
82
- )
83
- elif callable(result):
84
- try:
85
- results[value] = result()
86
- except Exception as exc:
87
- print(
88
- (
89
- f"Warning! Failed to run callable entrypoint {value!r}:"
90
- f" {type(exc).__name__}: {exc}"
91
- ),
92
- file=sys.stderr,
93
- )
94
- results[value] = exc
95
- else:
96
- if prefect.settings.PREFECT_DEBUG_MODE:
97
- print(
98
- "Loaded extra entrypoint {value!r} successfully.", file=sys.stderr
99
- )
100
-
101
- return results
102
-
103
-
104
41
  def load_prefect_collections() -> Dict[str, ModuleType]:
105
42
  """
106
43
  Load all Prefect collections that define an entrypoint in the group