prefect-client 2.19.8__tar.gz → 2.19.9__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 (302) hide show
  1. {prefect-client-2.19.8/src/prefect_client.egg-info → prefect-client-2.19.9}/PKG-INFO +1 -1
  2. {prefect-client-2.19.8 → prefect-client-2.19.9}/requirements-client.txt +1 -1
  3. {prefect-client-2.19.8 → prefect-client-2.19.9}/requirements.txt +1 -1
  4. {prefect-client-2.19.8 → prefect-client-2.19.9}/setup.cfg +1 -0
  5. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/schemas/objects.py +5 -0
  6. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/deployments.py +9 -2
  7. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/engine.py +33 -3
  8. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/flows.py +8 -1
  9. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/tasks.py +25 -12
  10. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/asyncutils.py +10 -5
  11. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/workers/block.py +9 -0
  12. {prefect-client-2.19.8 → prefect-client-2.19.9/src/prefect_client.egg-info}/PKG-INFO +1 -1
  13. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect_client.egg-info/requires.txt +1 -1
  14. {prefect-client-2.19.8 → prefect-client-2.19.9}/LICENSE +0 -0
  15. {prefect-client-2.19.8 → prefect-client-2.19.9}/MANIFEST.in +0 -0
  16. {prefect-client-2.19.8 → prefect-client-2.19.9}/README.md +0 -0
  17. {prefect-client-2.19.8 → prefect-client-2.19.9}/requirements-dev.txt +0 -0
  18. {prefect-client-2.19.8 → prefect-client-2.19.9}/setup.py +0 -0
  19. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/.prefectignore +0 -0
  20. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/__init__.py +0 -0
  21. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/__init__.py +0 -0
  22. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/_logging.py +0 -0
  23. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/compatibility/__init__.py +0 -0
  24. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/compatibility/deprecated.py +0 -0
  25. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/compatibility/experimental.py +0 -0
  26. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/__init__.py +0 -0
  27. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/api.py +0 -0
  28. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/calls.py +0 -0
  29. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  30. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  31. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/inspection.py +0 -0
  32. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/primitives.py +0 -0
  33. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/services.py +0 -0
  34. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/threads.py +0 -0
  35. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/concurrency/waiters.py +0 -0
  36. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/__init__.py +0 -0
  37. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/_base_model.py +0 -0
  38. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/_compat.py +0 -0
  39. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/_flags.py +0 -0
  40. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/_types.py +0 -0
  41. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
  42. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
  43. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/schemas.py +0 -0
  44. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/__init__.py +0 -0
  45. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/config_dict.py +0 -0
  46. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/field_validator.py +0 -0
  47. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_construct.py +0 -0
  48. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_copy.py +0 -0
  49. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_dump.py +0 -0
  50. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_dump_json.py +0 -0
  51. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_fields.py +0 -0
  52. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_fields_set.py +0 -0
  53. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_json_schema.py +0 -0
  54. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_rebuild.py +0 -0
  55. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_validate.py +0 -0
  56. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_validate_json.py +0 -0
  57. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/model_validator.py +0 -0
  58. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/utilities/type_adapter.py +0 -0
  59. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
  60. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  61. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  62. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/pytz.py +0 -0
  63. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/schemas/__init__.py +0 -0
  64. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/schemas/bases.py +0 -0
  65. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/schemas/fields.py +0 -0
  66. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/schemas/serializers.py +0 -0
  67. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_internal/schemas/validators.py +0 -0
  68. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/__init__.py +0 -0
  69. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/__init__.py +0 -0
  70. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/applications.py +0 -0
  71. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/background.py +0 -0
  72. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/concurrency.py +0 -0
  73. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/datastructures.py +0 -0
  74. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/dependencies/__init__.py +0 -0
  75. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/dependencies/models.py +0 -0
  76. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/dependencies/utils.py +0 -0
  77. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/encoders.py +0 -0
  78. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/exception_handlers.py +0 -0
  79. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/exceptions.py +0 -0
  80. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/logger.py +0 -0
  81. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/__init__.py +0 -0
  82. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/asyncexitstack.py +0 -0
  83. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/cors.py +0 -0
  84. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/gzip.py +0 -0
  85. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/httpsredirect.py +0 -0
  86. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/trustedhost.py +0 -0
  87. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/middleware/wsgi.py +0 -0
  88. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/__init__.py +0 -0
  89. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/constants.py +0 -0
  90. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/docs.py +0 -0
  91. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/models.py +0 -0
  92. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/openapi/utils.py +0 -0
  93. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/param_functions.py +0 -0
  94. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/params.py +0 -0
  95. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/requests.py +0 -0
  96. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/responses.py +0 -0
  97. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/routing.py +0 -0
  98. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/__init__.py +0 -0
  99. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/api_key.py +0 -0
  100. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/base.py +0 -0
  101. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/http.py +0 -0
  102. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/oauth2.py +0 -0
  103. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/open_id_connect_url.py +0 -0
  104. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/security/utils.py +0 -0
  105. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/staticfiles.py +0 -0
  106. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/templating.py +0 -0
  107. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/testclient.py +0 -0
  108. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/types.py +0 -0
  109. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/utils.py +0 -0
  110. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/fastapi/websockets.py +0 -0
  111. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/__init__.py +0 -0
  112. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/_compat.py +0 -0
  113. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/_exception_handler.py +0 -0
  114. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/_utils.py +0 -0
  115. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/applications.py +0 -0
  116. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/authentication.py +0 -0
  117. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/background.py +0 -0
  118. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/concurrency.py +0 -0
  119. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/config.py +0 -0
  120. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/convertors.py +0 -0
  121. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/datastructures.py +0 -0
  122. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/endpoints.py +0 -0
  123. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/exceptions.py +0 -0
  124. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/formparsers.py +0 -0
  125. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/__init__.py +0 -0
  126. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/authentication.py +0 -0
  127. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/base.py +0 -0
  128. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/cors.py +0 -0
  129. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/errors.py +0 -0
  130. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/exceptions.py +0 -0
  131. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/gzip.py +0 -0
  132. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/httpsredirect.py +0 -0
  133. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/sessions.py +0 -0
  134. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/trustedhost.py +0 -0
  135. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/middleware/wsgi.py +0 -0
  136. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/requests.py +0 -0
  137. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/responses.py +0 -0
  138. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/routing.py +0 -0
  139. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/schemas.py +0 -0
  140. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/staticfiles.py +0 -0
  141. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/status.py +0 -0
  142. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/templating.py +0 -0
  143. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/testclient.py +0 -0
  144. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/types.py +0 -0
  145. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_vendor/starlette/websockets.py +0 -0
  146. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/_version.py +0 -0
  147. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/agent.py +0 -0
  148. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/artifacts.py +0 -0
  149. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/automations.py +0 -0
  150. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/blocks/__init__.py +0 -0
  151. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/blocks/abstract.py +0 -0
  152. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/blocks/core.py +0 -0
  153. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/blocks/fields.py +0 -0
  154. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/blocks/kubernetes.py +0 -0
  155. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/blocks/notifications.py +0 -0
  156. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/blocks/system.py +0 -0
  157. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/blocks/webhook.py +0 -0
  158. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/__init__.py +0 -0
  159. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/base.py +0 -0
  160. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/cloud.py +0 -0
  161. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/collections.py +0 -0
  162. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/constants.py +0 -0
  163. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/orchestration.py +0 -0
  164. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/schemas/__init__.py +0 -0
  165. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/schemas/actions.py +0 -0
  166. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/schemas/filters.py +0 -0
  167. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/schemas/responses.py +0 -0
  168. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/schemas/schedules.py +0 -0
  169. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/schemas/sorting.py +0 -0
  170. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/subscriptions.py +0 -0
  171. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/client/utilities.py +0 -0
  172. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/concurrency/__init__.py +0 -0
  173. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/concurrency/asyncio.py +0 -0
  174. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/concurrency/events.py +0 -0
  175. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/concurrency/services.py +0 -0
  176. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/concurrency/sync.py +0 -0
  177. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/context.py +0 -0
  178. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/__init__.py +0 -0
  179. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/base.py +0 -0
  180. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/runner.py +0 -0
  181. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/schedules.py +0 -0
  182. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/steps/__init__.py +0 -0
  183. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/steps/core.py +0 -0
  184. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/steps/pull.py +0 -0
  185. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deployments/steps/utility.py +0 -0
  186. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deprecated/__init__.py +0 -0
  187. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deprecated/data_documents.py +0 -0
  188. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/__init__.py +0 -0
  189. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/base.py +0 -0
  190. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/docker.py +0 -0
  191. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/file.py +0 -0
  192. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/orion.py +0 -0
  193. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/deprecated/packaging/serializers.py +0 -0
  194. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/__init__.py +0 -0
  195. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/actions.py +0 -0
  196. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/cli/__init__.py +0 -0
  197. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/cli/automations.py +0 -0
  198. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/clients.py +0 -0
  199. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/filters.py +0 -0
  200. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/instrument.py +0 -0
  201. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/related.py +0 -0
  202. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/schemas/__init__.py +0 -0
  203. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/schemas/automations.py +0 -0
  204. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/schemas/deployment_triggers.py +0 -0
  205. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/schemas/events.py +0 -0
  206. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/schemas/labelling.py +0 -0
  207. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/utilities.py +0 -0
  208. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/events/worker.py +0 -0
  209. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/exceptions.py +0 -0
  210. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/filesystems.py +0 -0
  211. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/flow_runs.py +0 -0
  212. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/futures.py +0 -0
  213. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/__init__.py +0 -0
  214. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/base.py +0 -0
  215. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/container.py +0 -0
  216. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/kubernetes.py +0 -0
  217. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/process.py +0 -0
  218. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
  219. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
  220. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
  221. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
  222. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/infrastructure/provisioners/modal.py +0 -0
  223. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/input/__init__.py +0 -0
  224. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/input/actions.py +0 -0
  225. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/input/run_input.py +0 -0
  226. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/logging/__init__.py +0 -0
  227. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/logging/configuration.py +0 -0
  228. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/logging/filters.py +0 -0
  229. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/logging/formatters.py +0 -0
  230. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/logging/handlers.py +0 -0
  231. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/logging/highlighters.py +0 -0
  232. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/logging/loggers.py +0 -0
  233. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/logging/logging.yml +0 -0
  234. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/manifests.py +0 -0
  235. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/new_flow_engine.py +0 -0
  236. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/new_task_engine.py +0 -0
  237. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/plugins.py +0 -0
  238. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/profiles.toml +0 -0
  239. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/py.typed +0 -0
  240. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/pydantic/__init__.py +0 -0
  241. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/pydantic/main.py +0 -0
  242. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/results.py +0 -0
  243. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runner/__init__.py +0 -0
  244. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runner/runner.py +0 -0
  245. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runner/server.py +0 -0
  246. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runner/storage.py +0 -0
  247. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runner/submit.py +0 -0
  248. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runner/utils.py +0 -0
  249. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runtime/__init__.py +0 -0
  250. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runtime/deployment.py +0 -0
  251. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runtime/flow_run.py +0 -0
  252. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/runtime/task_run.py +0 -0
  253. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/serializers.py +0 -0
  254. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
  255. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  256. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/settings.py +0 -0
  257. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/software/__init__.py +0 -0
  258. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/software/base.py +0 -0
  259. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/software/conda.py +0 -0
  260. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/software/pip.py +0 -0
  261. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/software/python.py +0 -0
  262. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/states.py +0 -0
  263. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/task_engine.py +0 -0
  264. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/task_runners.py +0 -0
  265. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/task_server.py +0 -0
  266. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/types/__init__.py +0 -0
  267. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/__init__.py +0 -0
  268. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/annotations.py +0 -0
  269. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/callables.py +0 -0
  270. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/collections.py +0 -0
  271. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/compat.py +0 -0
  272. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/context.py +0 -0
  273. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/dispatch.py +0 -0
  274. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/dockerutils.py +0 -0
  275. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/engine.py +0 -0
  276. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/filesystem.py +0 -0
  277. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/hashing.py +0 -0
  278. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/importtools.py +0 -0
  279. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/math.py +0 -0
  280. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/names.py +0 -0
  281. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/processutils.py +0 -0
  282. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/pydantic.py +0 -0
  283. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/render_swagger.py +0 -0
  284. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  285. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/schema_tools/hydration.py +0 -0
  286. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/schema_tools/validation.py +0 -0
  287. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/services.py +0 -0
  288. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/slugify.py +0 -0
  289. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/templating.py +0 -0
  290. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/text.py +0 -0
  291. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/timeout.py +0 -0
  292. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/utilities/visualization.py +0 -0
  293. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/variables.py +0 -0
  294. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/workers/__init__.py +0 -0
  295. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/workers/base.py +0 -0
  296. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/workers/process.py +0 -0
  297. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/workers/server.py +0 -0
  298. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect/workers/utilities.py +0 -0
  299. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect_client.egg-info/SOURCES.txt +0 -0
  300. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect_client.egg-info/dependency_links.txt +0 -0
  301. {prefect-client-2.19.8 → prefect-client-2.19.9}/src/prefect_client.egg-info/top_level.txt +0 -0
  302. {prefect-client-2.19.8 → prefect-client-2.19.9}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 2.19.8
3
+ Version: 2.19.9
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -6,7 +6,7 @@ coolname >= 1.0.4, < 3.0.0
6
6
  croniter >= 1.0.12, < 3.0.0
7
7
  fsspec >= 2022.5.0
8
8
  graphviz >= 0.20.1
9
- griffe >= 0.20.0
9
+ griffe >= 0.20.0, <0.48.0
10
10
  httpcore >=1.0.5, < 2.0.0
11
11
  httpx[http2] >= 0.23, != 0.23.2
12
12
  importlib_metadata >= 4.4; python_version < '3.10'
@@ -9,7 +9,7 @@ cryptography >= 36.0.1
9
9
  dateparser >= 1.1.1, < 2.0.0
10
10
  docker >= 4.0
11
11
  graphviz >= 0.20.1
12
- griffe >= 0.20.0
12
+ griffe >= 0.20.0, <0.48.0
13
13
  jinja2 >= 3.0.0, < 4.0.0
14
14
  jinja2-humanize-extension >= 0.4.0
15
15
  humanize >= 4.9.0
@@ -52,6 +52,7 @@ filterwarnings =
52
52
  ignore::ResourceWarning
53
53
  ignore::pytest.PytestUnraisableExceptionWarning
54
54
  ignore::pluggy.PluggyTeardownRaisedWarning
55
+ ignore::prefect._internal.compatibility.deprecated.PrefectDeprecationWarning
55
56
 
56
57
  [mypy]
57
58
  plugins =
@@ -17,6 +17,7 @@ import pendulum
17
17
 
18
18
  from prefect._internal.compatibility.deprecated import (
19
19
  DeprecatedInfraOverridesField,
20
+ deprecated_class,
20
21
  )
21
22
  from prefect._internal.pydantic import HAS_PYDANTIC_V2
22
23
  from prefect.types import NonNegativeInteger, PositiveInteger
@@ -917,6 +918,10 @@ class Flow(ObjectBaseModel):
917
918
  return raise_on_name_with_banned_characters(v)
918
919
 
919
920
 
921
+ @deprecated_class(
922
+ start_date="Jun 2024",
923
+ help="Will be removed in Prefect 3 in favor of prefect.client.schemas.actions.DeploymentScheduleCreate",
924
+ )
920
925
  class MinimalDeploymentSchedule(PrefectBaseModel):
921
926
  schedule: SCHEDULE_TYPES = Field(
922
927
  default=..., description="The schedule for the deployment."
@@ -238,12 +238,17 @@ async def run_deployment(
238
238
  return flow_run
239
239
 
240
240
 
241
+ @deprecated_callable(
242
+ start_date="Jun 2024",
243
+ help="Will be moved in Prefect 3 to prefect.flows:load_flow_from_flow_run",
244
+ )
241
245
  @inject_client
242
246
  async def load_flow_from_flow_run(
243
247
  flow_run: FlowRun,
244
248
  client: PrefectClient,
245
249
  ignore_storage: bool = False,
246
250
  storage_base_path: Optional[str] = None,
251
+ use_placeholder_flow: bool = True,
247
252
  ) -> Flow:
248
253
  """
249
254
  Load a flow from the location/script provided in a deployment's storage document.
@@ -270,7 +275,7 @@ async def load_flow_from_flow_run(
270
275
  f"Importing flow code from module path {deployment.entrypoint}"
271
276
  )
272
277
  flow = await run_sync_in_worker_thread(
273
- load_flow_from_entrypoint, deployment.entrypoint
278
+ load_flow_from_entrypoint, deployment.entrypoint, use_placeholder_flow
274
279
  )
275
280
  return flow
276
281
 
@@ -314,7 +319,9 @@ async def load_flow_from_flow_run(
314
319
  ).absolute()
315
320
  run_logger.debug(f"Importing flow code from '{import_path}'")
316
321
 
317
- flow = await run_sync_in_worker_thread(load_flow_from_entrypoint, str(import_path))
322
+ flow = await run_sync_in_worker_thread(
323
+ load_flow_from_entrypoint, str(import_path), use_placeholder_flow
324
+ )
318
325
 
319
326
  return flow
320
327
 
@@ -113,7 +113,10 @@ from typing_extensions import Literal
113
113
  import prefect
114
114
  import prefect.context
115
115
  import prefect.plugins
116
- from prefect._internal.compatibility.deprecated import deprecated_parameter
116
+ from prefect._internal.compatibility.deprecated import (
117
+ deprecated_callable,
118
+ deprecated_parameter,
119
+ )
117
120
  from prefect._internal.compatibility.experimental import experimental_parameter
118
121
  from prefect._internal.concurrency.api import create_call, from_async, from_sync
119
122
  from prefect._internal.concurrency.calls import get_current_call
@@ -417,9 +420,12 @@ async def retrieve_flow_then_begin_flow_run(
417
420
 
418
421
  try:
419
422
  flow = (
420
- load_flow_from_entrypoint(entrypoint)
423
+ # We do not want to use a placeholder flow at runtime
424
+ load_flow_from_entrypoint(entrypoint, use_placeholder_flow=False)
421
425
  if entrypoint
422
- else await load_flow_from_flow_run(flow_run, client=client)
426
+ else await load_flow_from_flow_run(
427
+ flow_run, client=client, use_placeholder_flow=False
428
+ )
423
429
  )
424
430
  except Exception:
425
431
  message = (
@@ -975,6 +981,10 @@ async def orchestrate_flow_run(
975
981
  return state
976
982
 
977
983
 
984
+ @deprecated_callable(
985
+ start_date="Jun 2024",
986
+ help="Will be moved in Prefect 3 to prefect.flow_runs:pause_flow_run",
987
+ )
978
988
  @overload
979
989
  async def pause_flow_run(
980
990
  wait_for_input: None = None,
@@ -987,6 +997,10 @@ async def pause_flow_run(
987
997
  ...
988
998
 
989
999
 
1000
+ @deprecated_callable(
1001
+ start_date="Jun 2024",
1002
+ help="Will be moved in Prefect 3 to prefect.flow_runs:pause_flow_run",
1003
+ )
990
1004
  @overload
991
1005
  async def pause_flow_run(
992
1006
  wait_for_input: Type[T],
@@ -1095,6 +1109,10 @@ async def pause_flow_run(
1095
1109
  )
1096
1110
 
1097
1111
 
1112
+ @deprecated_callable(
1113
+ start_date="Jun 2024",
1114
+ help="Will be moved in Prefect 3 to prefect.flow_runs:_in_process_pause",
1115
+ )
1098
1116
  @inject_client
1099
1117
  async def _in_process_pause(
1100
1118
  timeout: int = 3600,
@@ -1190,6 +1208,10 @@ async def _in_process_pause(
1190
1208
  raise FlowPauseTimeout("Flow run was paused and never resumed.")
1191
1209
 
1192
1210
 
1211
+ @deprecated_callable(
1212
+ start_date="Jun 2024",
1213
+ help="Will be moved in Prefect 3 to prefect.flow_runs.pause_flow_run.",
1214
+ )
1193
1215
  @inject_client
1194
1216
  async def _out_of_process_pause(
1195
1217
  flow_run_id: UUID,
@@ -1212,6 +1234,10 @@ async def _out_of_process_pause(
1212
1234
  raise RuntimeError(response.details.reason)
1213
1235
 
1214
1236
 
1237
+ @deprecated_callable(
1238
+ start_date="Jun 2024",
1239
+ help="Will be moved in Prefect 3 to prefect.flow_runs:suspend_flow_run",
1240
+ )
1215
1241
  @overload
1216
1242
  async def suspend_flow_run(
1217
1243
  wait_for_input: None = None,
@@ -1343,6 +1369,10 @@ async def suspend_flow_run(
1343
1369
  raise Pause()
1344
1370
 
1345
1371
 
1372
+ @deprecated_callable(
1373
+ start_date="Jun 2024",
1374
+ help="Will be moved in Prefect 3 to prefect.flow_runs:resume_flow_run",
1375
+ )
1346
1376
  @sync_compatible
1347
1377
  async def resume_flow_run(flow_run_id, run_input: Optional[Dict] = None):
1348
1378
  """
@@ -1650,6 +1650,7 @@ def load_flow_from_script(path: str, flow_name: str = None) -> Flow:
1650
1650
 
1651
1651
  def load_flow_from_entrypoint(
1652
1652
  entrypoint: str,
1653
+ use_placeholder_flow: bool = True,
1653
1654
  ) -> Flow:
1654
1655
  """
1655
1656
  Extract a flow object from a script at an entrypoint by running all of the code in the file.
@@ -1657,6 +1658,9 @@ def load_flow_from_entrypoint(
1657
1658
  Args:
1658
1659
  entrypoint: a string in the format `<path_to_script>:<flow_func_name>` or a module path
1659
1660
  to a flow function
1661
+ use_placeholder_flow: If True, a placeholder flow will be used if the entrypoint
1662
+ cannot be loaded for any reason (e.g. dependencies are missing). If False, an
1663
+ exception will be raised.
1660
1664
 
1661
1665
  Returns:
1662
1666
  The flow object from the script
@@ -1687,7 +1691,10 @@ def load_flow_from_entrypoint(
1687
1691
  # function, so we create a placeholder flow that will re-raise this
1688
1692
  # exception when called.
1689
1693
 
1690
- flow = load_placeholder_flow(entrypoint=entrypoint, raises=exc)
1694
+ if use_placeholder_flow:
1695
+ flow = load_placeholder_flow(entrypoint=entrypoint, raises=exc)
1696
+ else:
1697
+ raise
1691
1698
 
1692
1699
  if not isinstance(flow, Flow):
1693
1700
  raise MissingFlowError(
@@ -6,7 +6,6 @@ Module containing the base workflow task class and decorator - for most use case
6
6
 
7
7
  import datetime
8
8
  import inspect
9
- import os
10
9
  from copy import copy
11
10
  from functools import partial, update_wrapper
12
11
  from typing import (
@@ -76,6 +75,8 @@ P = ParamSpec("P") # The parameters of the task
76
75
 
77
76
  logger = get_logger("tasks")
78
77
 
78
+ NUM_CHARS_DYNAMIC_KEY: int = 8
79
+
79
80
 
80
81
  def task_input_hash(
81
82
  context: "TaskRunContext", arguments: Dict[str, Any]
@@ -125,6 +126,28 @@ def exponential_backoff(backoff_factor: float) -> Callable[[int], List[float]]:
125
126
  return retry_backoff_callable
126
127
 
127
128
 
129
+ def _generate_task_key(fn: Callable[..., Any]) -> str:
130
+ """Generate a task key based on the function name and source code.
131
+ We may eventually want some sort of top-level namespace here to
132
+ disambiguate tasks with the same function name in different modules,
133
+ in a more human-readable way, while avoiding relative import problems (see #12337).
134
+ As long as the task implementations are unique (even if named the same), we should
135
+ not have any collisions.
136
+ Args:
137
+ fn: The function to generate a task key for.
138
+ """
139
+ if not hasattr(fn, "__qualname__"):
140
+ return to_qualified_name(type(fn))
141
+
142
+ qualname = fn.__qualname__.split(".")[-1]
143
+
144
+ code_hash = (
145
+ h[:NUM_CHARS_DYNAMIC_KEY] if (h := hash_objects(fn.__code__)) else "unknown"
146
+ )
147
+
148
+ return f"{qualname}-{code_hash}"
149
+
150
+
128
151
  @PrefectObjectRegistry.register_instances
129
152
  class Task(Generic[P, R]):
130
153
  """
@@ -292,17 +315,7 @@ class Task(Generic[P, R]):
292
315
 
293
316
  self.tags = set(tags if tags else [])
294
317
 
295
- if not hasattr(self.fn, "__qualname__"):
296
- self.task_key = to_qualified_name(type(self.fn))
297
- else:
298
- try:
299
- task_origin_hash = hash_objects(
300
- self.name, os.path.abspath(inspect.getsourcefile(self.fn))
301
- )
302
- except TypeError:
303
- task_origin_hash = "unknown-source-file"
304
-
305
- self.task_key = f"{self.fn.__qualname__}-{task_origin_hash}"
318
+ self.task_key = _generate_task_key(self.fn)
306
319
 
307
320
  self.cache_key_fn = cache_key_fn
308
321
  self.cache_expiration = cache_expiration
@@ -261,14 +261,14 @@ def sync_compatible(async_fn: T) -> T:
261
261
  """
262
262
 
263
263
  @wraps(async_fn)
264
- def coroutine_wrapper(*args, **kwargs):
264
+ def coroutine_wrapper(*args, _sync: Optional[bool] = None, **kwargs):
265
265
  from prefect._internal.concurrency.api import create_call, from_sync
266
266
  from prefect._internal.concurrency.calls import get_current_call, logger
267
267
  from prefect._internal.concurrency.event_loop import get_running_loop
268
268
  from prefect._internal.concurrency.threads import get_global_loop
269
269
  from prefect.settings import PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT
270
270
 
271
- if PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT:
271
+ if PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT or _sync is False:
272
272
  return async_fn(*args, **kwargs)
273
273
 
274
274
  global_thread_portal = get_global_loop()
@@ -276,12 +276,17 @@ def sync_compatible(async_fn: T) -> T:
276
276
  current_call = get_current_call()
277
277
  current_loop = get_running_loop()
278
278
 
279
- if current_thread.ident == global_thread_portal.thread.ident:
279
+ if (
280
+ current_thread.ident == global_thread_portal.thread.ident
281
+ and _sync is not True
282
+ ):
280
283
  logger.debug(f"{async_fn} --> return coroutine for internal await")
281
284
  # In the prefect async context; return the coro for us to await
282
285
  return async_fn(*args, **kwargs)
283
- elif in_async_main_thread() and (
284
- not current_call or is_async_fn(current_call.fn)
286
+ elif (
287
+ in_async_main_thread()
288
+ and (not current_call or is_async_fn(current_call.fn))
289
+ and _sync is not True
285
290
  ):
286
291
  # In the main async context; return the coro for them to await
287
292
  logger.debug(f"{async_fn} --> return coroutine for user await")
@@ -4,6 +4,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional
4
4
  import anyio
5
5
  import anyio.abc
6
6
 
7
+ from prefect._internal.compatibility.deprecated import deprecated_class
7
8
  from prefect._internal.pydantic import HAS_PYDANTIC_V2
8
9
  from prefect._internal.schemas.validators import validate_block_is_infrastructure
9
10
  from prefect.blocks.core import Block
@@ -27,6 +28,10 @@ if TYPE_CHECKING:
27
28
  from prefect.client.schemas.responses import DeploymentResponse
28
29
 
29
30
 
31
+ @deprecated_class(
32
+ start_date="Jun 2024",
33
+ help="Refer to the upgrade guide for more information: https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/",
34
+ )
30
35
  class BlockWorkerJobConfiguration(BaseModel):
31
36
  block: Block = Field(
32
37
  default=..., description="The infrastructure block to use for job creation."
@@ -144,6 +149,10 @@ class BlockWorkerResult(BaseWorkerResult):
144
149
  """Result of a block worker job"""
145
150
 
146
151
 
152
+ @deprecated_class(
153
+ start_date="Jun 2024",
154
+ help="Refer to the upgrade guide for more information: https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/",
155
+ )
147
156
  class BlockWorker(BaseWorker):
148
157
  type = "block"
149
158
  job_configuration = BlockWorkerJobConfiguration
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 2.19.8
3
+ Version: 2.19.9
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -6,7 +6,7 @@ coolname<3.0.0,>=1.0.4
6
6
  croniter<3.0.0,>=1.0.12
7
7
  fsspec>=2022.5.0
8
8
  graphviz>=0.20.1
9
- griffe>=0.20.0
9
+ griffe<0.48.0,>=0.20.0
10
10
  httpcore<2.0.0,>=1.0.5
11
11
  httpx[http2]!=0.23.2,>=0.23
12
12
  importlib-resources<6.2.0,>=6.1.3
File without changes