prefect-client 2.19.6__tar.gz → 2.19.8__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.6/src/prefect_client.egg-info → prefect-client-2.19.8}/PKG-INFO +1 -1
  2. {prefect-client-2.19.6 → prefect-client-2.19.8}/requirements-client.txt +1 -1
  3. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/engine.py +21 -9
  4. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/exceptions.py +4 -1
  5. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/flows.py +138 -46
  6. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runner/server.py +1 -1
  7. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/tasks.py +2 -0
  8. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/importtools.py +1 -1
  9. {prefect-client-2.19.6 → prefect-client-2.19.8/src/prefect_client.egg-info}/PKG-INFO +1 -1
  10. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect_client.egg-info/requires.txt +1 -1
  11. {prefect-client-2.19.6 → prefect-client-2.19.8}/LICENSE +0 -0
  12. {prefect-client-2.19.6 → prefect-client-2.19.8}/MANIFEST.in +0 -0
  13. {prefect-client-2.19.6 → prefect-client-2.19.8}/README.md +0 -0
  14. {prefect-client-2.19.6 → prefect-client-2.19.8}/requirements-dev.txt +0 -0
  15. {prefect-client-2.19.6 → prefect-client-2.19.8}/requirements.txt +0 -0
  16. {prefect-client-2.19.6 → prefect-client-2.19.8}/setup.cfg +0 -0
  17. {prefect-client-2.19.6 → prefect-client-2.19.8}/setup.py +0 -0
  18. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/.prefectignore +0 -0
  19. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/__init__.py +0 -0
  20. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/__init__.py +0 -0
  21. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/_logging.py +0 -0
  22. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/compatibility/__init__.py +0 -0
  23. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/compatibility/deprecated.py +0 -0
  24. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/compatibility/experimental.py +0 -0
  25. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/__init__.py +0 -0
  26. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/api.py +0 -0
  27. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/calls.py +0 -0
  28. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  29. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  30. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/inspection.py +0 -0
  31. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/primitives.py +0 -0
  32. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/services.py +0 -0
  33. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/threads.py +0 -0
  34. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/concurrency/waiters.py +0 -0
  35. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/__init__.py +0 -0
  36. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/_base_model.py +0 -0
  37. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/_compat.py +0 -0
  38. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/_flags.py +0 -0
  39. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/_types.py +0 -0
  40. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/annotations/__init__.py +0 -0
  41. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
  42. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/schemas.py +0 -0
  43. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/__init__.py +0 -0
  44. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/config_dict.py +0 -0
  45. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/field_validator.py +0 -0
  46. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_construct.py +0 -0
  47. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_copy.py +0 -0
  48. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_dump.py +0 -0
  49. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_dump_json.py +0 -0
  50. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_fields.py +0 -0
  51. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_fields_set.py +0 -0
  52. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_json_schema.py +0 -0
  53. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_rebuild.py +0 -0
  54. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_validate.py +0 -0
  55. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_validate_json.py +0 -0
  56. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/model_validator.py +0 -0
  57. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/utilities/type_adapter.py +0 -0
  58. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
  59. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  60. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  61. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/pytz.py +0 -0
  62. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/schemas/__init__.py +0 -0
  63. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/schemas/bases.py +0 -0
  64. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/schemas/fields.py +0 -0
  65. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/schemas/serializers.py +0 -0
  66. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_internal/schemas/validators.py +0 -0
  67. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/__init__.py +0 -0
  68. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/__init__.py +0 -0
  69. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/applications.py +0 -0
  70. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/background.py +0 -0
  71. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/concurrency.py +0 -0
  72. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/datastructures.py +0 -0
  73. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/dependencies/__init__.py +0 -0
  74. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/dependencies/models.py +0 -0
  75. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/dependencies/utils.py +0 -0
  76. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/encoders.py +0 -0
  77. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/exception_handlers.py +0 -0
  78. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/exceptions.py +0 -0
  79. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/logger.py +0 -0
  80. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/middleware/__init__.py +0 -0
  81. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/middleware/asyncexitstack.py +0 -0
  82. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/middleware/cors.py +0 -0
  83. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/middleware/gzip.py +0 -0
  84. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/middleware/httpsredirect.py +0 -0
  85. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/middleware/trustedhost.py +0 -0
  86. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/middleware/wsgi.py +0 -0
  87. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/openapi/__init__.py +0 -0
  88. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/openapi/constants.py +0 -0
  89. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/openapi/docs.py +0 -0
  90. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/openapi/models.py +0 -0
  91. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/openapi/utils.py +0 -0
  92. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/param_functions.py +0 -0
  93. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/params.py +0 -0
  94. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/requests.py +0 -0
  95. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/responses.py +0 -0
  96. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/routing.py +0 -0
  97. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/security/__init__.py +0 -0
  98. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/security/api_key.py +0 -0
  99. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/security/base.py +0 -0
  100. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/security/http.py +0 -0
  101. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/security/oauth2.py +0 -0
  102. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/security/open_id_connect_url.py +0 -0
  103. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/security/utils.py +0 -0
  104. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/staticfiles.py +0 -0
  105. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/templating.py +0 -0
  106. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/testclient.py +0 -0
  107. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/types.py +0 -0
  108. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/utils.py +0 -0
  109. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/fastapi/websockets.py +0 -0
  110. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/__init__.py +0 -0
  111. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/_compat.py +0 -0
  112. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/_exception_handler.py +0 -0
  113. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/_utils.py +0 -0
  114. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/applications.py +0 -0
  115. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/authentication.py +0 -0
  116. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/background.py +0 -0
  117. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/concurrency.py +0 -0
  118. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/config.py +0 -0
  119. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/convertors.py +0 -0
  120. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/datastructures.py +0 -0
  121. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/endpoints.py +0 -0
  122. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/exceptions.py +0 -0
  123. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/formparsers.py +0 -0
  124. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/__init__.py +0 -0
  125. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/authentication.py +0 -0
  126. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/base.py +0 -0
  127. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/cors.py +0 -0
  128. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/errors.py +0 -0
  129. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/exceptions.py +0 -0
  130. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/gzip.py +0 -0
  131. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/httpsredirect.py +0 -0
  132. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/sessions.py +0 -0
  133. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/trustedhost.py +0 -0
  134. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/middleware/wsgi.py +0 -0
  135. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/requests.py +0 -0
  136. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/responses.py +0 -0
  137. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/routing.py +0 -0
  138. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/schemas.py +0 -0
  139. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/staticfiles.py +0 -0
  140. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/status.py +0 -0
  141. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/templating.py +0 -0
  142. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/testclient.py +0 -0
  143. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/types.py +0 -0
  144. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_vendor/starlette/websockets.py +0 -0
  145. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/_version.py +0 -0
  146. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/agent.py +0 -0
  147. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/artifacts.py +0 -0
  148. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/automations.py +0 -0
  149. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/blocks/__init__.py +0 -0
  150. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/blocks/abstract.py +0 -0
  151. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/blocks/core.py +0 -0
  152. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/blocks/fields.py +0 -0
  153. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/blocks/kubernetes.py +0 -0
  154. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/blocks/notifications.py +0 -0
  155. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/blocks/system.py +0 -0
  156. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/blocks/webhook.py +0 -0
  157. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/__init__.py +0 -0
  158. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/base.py +0 -0
  159. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/cloud.py +0 -0
  160. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/collections.py +0 -0
  161. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/constants.py +0 -0
  162. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/orchestration.py +0 -0
  163. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/schemas/__init__.py +0 -0
  164. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/schemas/actions.py +0 -0
  165. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/schemas/filters.py +0 -0
  166. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/schemas/objects.py +0 -0
  167. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/schemas/responses.py +0 -0
  168. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/schemas/schedules.py +0 -0
  169. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/schemas/sorting.py +0 -0
  170. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/subscriptions.py +0 -0
  171. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/client/utilities.py +0 -0
  172. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/concurrency/__init__.py +0 -0
  173. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/concurrency/asyncio.py +0 -0
  174. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/concurrency/events.py +0 -0
  175. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/concurrency/services.py +0 -0
  176. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/concurrency/sync.py +0 -0
  177. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/context.py +0 -0
  178. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/__init__.py +0 -0
  179. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/base.py +0 -0
  180. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/deployments.py +0 -0
  181. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/runner.py +0 -0
  182. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/schedules.py +0 -0
  183. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/steps/__init__.py +0 -0
  184. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/steps/core.py +0 -0
  185. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/steps/pull.py +0 -0
  186. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deployments/steps/utility.py +0 -0
  187. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deprecated/__init__.py +0 -0
  188. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deprecated/data_documents.py +0 -0
  189. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deprecated/packaging/__init__.py +0 -0
  190. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deprecated/packaging/base.py +0 -0
  191. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deprecated/packaging/docker.py +0 -0
  192. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deprecated/packaging/file.py +0 -0
  193. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deprecated/packaging/orion.py +0 -0
  194. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/deprecated/packaging/serializers.py +0 -0
  195. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/__init__.py +0 -0
  196. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/actions.py +0 -0
  197. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/cli/__init__.py +0 -0
  198. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/cli/automations.py +0 -0
  199. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/clients.py +0 -0
  200. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/filters.py +0 -0
  201. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/instrument.py +0 -0
  202. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/related.py +0 -0
  203. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/schemas/__init__.py +0 -0
  204. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/schemas/automations.py +0 -0
  205. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/schemas/deployment_triggers.py +0 -0
  206. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/schemas/events.py +0 -0
  207. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/schemas/labelling.py +0 -0
  208. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/utilities.py +0 -0
  209. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/events/worker.py +0 -0
  210. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/filesystems.py +0 -0
  211. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/flow_runs.py +0 -0
  212. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/futures.py +0 -0
  213. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/__init__.py +0 -0
  214. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/base.py +0 -0
  215. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/container.py +0 -0
  216. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/kubernetes.py +0 -0
  217. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/process.py +0 -0
  218. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
  219. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
  220. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
  221. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
  222. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/infrastructure/provisioners/modal.py +0 -0
  223. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/input/__init__.py +0 -0
  224. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/input/actions.py +0 -0
  225. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/input/run_input.py +0 -0
  226. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/logging/__init__.py +0 -0
  227. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/logging/configuration.py +0 -0
  228. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/logging/filters.py +0 -0
  229. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/logging/formatters.py +0 -0
  230. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/logging/handlers.py +0 -0
  231. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/logging/highlighters.py +0 -0
  232. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/logging/loggers.py +0 -0
  233. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/logging/logging.yml +0 -0
  234. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/manifests.py +0 -0
  235. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/new_flow_engine.py +0 -0
  236. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/new_task_engine.py +0 -0
  237. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/plugins.py +0 -0
  238. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/profiles.toml +0 -0
  239. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/py.typed +0 -0
  240. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/pydantic/__init__.py +0 -0
  241. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/pydantic/main.py +0 -0
  242. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/results.py +0 -0
  243. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runner/__init__.py +0 -0
  244. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runner/runner.py +0 -0
  245. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runner/storage.py +0 -0
  246. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runner/submit.py +0 -0
  247. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runner/utils.py +0 -0
  248. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runtime/__init__.py +0 -0
  249. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runtime/deployment.py +0 -0
  250. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runtime/flow_run.py +0 -0
  251. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/runtime/task_run.py +0 -0
  252. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/serializers.py +0 -0
  253. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
  254. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  255. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/settings.py +0 -0
  256. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/software/__init__.py +0 -0
  257. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/software/base.py +0 -0
  258. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/software/conda.py +0 -0
  259. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/software/pip.py +0 -0
  260. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/software/python.py +0 -0
  261. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/states.py +0 -0
  262. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/task_engine.py +0 -0
  263. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/task_runners.py +0 -0
  264. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/task_server.py +0 -0
  265. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/types/__init__.py +0 -0
  266. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/__init__.py +0 -0
  267. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/annotations.py +0 -0
  268. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/asyncutils.py +0 -0
  269. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/callables.py +0 -0
  270. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/collections.py +0 -0
  271. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/compat.py +0 -0
  272. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/context.py +0 -0
  273. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/dispatch.py +0 -0
  274. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/dockerutils.py +0 -0
  275. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/engine.py +0 -0
  276. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/filesystem.py +0 -0
  277. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/hashing.py +0 -0
  278. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/math.py +0 -0
  279. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/names.py +0 -0
  280. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/processutils.py +0 -0
  281. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/pydantic.py +0 -0
  282. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/render_swagger.py +0 -0
  283. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  284. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/schema_tools/hydration.py +0 -0
  285. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/schema_tools/validation.py +0 -0
  286. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/services.py +0 -0
  287. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/slugify.py +0 -0
  288. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/templating.py +0 -0
  289. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/text.py +0 -0
  290. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/timeout.py +0 -0
  291. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/utilities/visualization.py +0 -0
  292. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/variables.py +0 -0
  293. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/workers/__init__.py +0 -0
  294. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/workers/base.py +0 -0
  295. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/workers/block.py +0 -0
  296. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/workers/process.py +0 -0
  297. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/workers/server.py +0 -0
  298. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect/workers/utilities.py +0 -0
  299. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect_client.egg-info/SOURCES.txt +0 -0
  300. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect_client.egg-info/dependency_links.txt +0 -0
  301. {prefect-client-2.19.6 → prefect-client-2.19.8}/src/prefect_client.egg-info/top_level.txt +0 -0
  302. {prefect-client-2.19.6 → prefect-client-2.19.8}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 2.19.6
3
+ Version: 2.19.8
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -32,7 +32,7 @@ sniffio >=1.3.0, < 2.0.0
32
32
  toml >= 0.10.0
33
33
  typing_extensions >= 4.5.0, < 5.0.0
34
34
  ujson >= 5.8.0, < 6.0.0
35
- uvicorn >= 0.14.0, < 0.29.0
35
+ uvicorn >= 0.14.0, !=0.29.0
36
36
  websockets >= 10.4, < 13.0
37
37
 
38
38
  # additional dependencies of starlette, which we're currently vendoring
@@ -1375,6 +1375,7 @@ def enter_task_run_engine(
1375
1375
  return_type: EngineReturnType,
1376
1376
  task_runner: Optional[BaseTaskRunner],
1377
1377
  mapped: bool,
1378
+ entering_from_task_run: Optional[bool] = False,
1378
1379
  ) -> Union[PrefectFuture, Awaitable[PrefectFuture], TaskRun]:
1379
1380
  """Sync entrypoint for task calls"""
1380
1381
 
@@ -1402,14 +1403,20 @@ def enter_task_run_engine(
1402
1403
  if flow_run_context.timeout_scope and flow_run_context.timeout_scope.cancel_called:
1403
1404
  raise TimeoutError("Flow run timed out")
1404
1405
 
1406
+ call_arguments = {
1407
+ "task": task,
1408
+ "flow_run_context": flow_run_context,
1409
+ "parameters": parameters,
1410
+ "wait_for": wait_for,
1411
+ "return_type": return_type,
1412
+ "task_runner": task_runner,
1413
+ }
1414
+
1415
+ if not mapped:
1416
+ call_arguments["entering_from_task_run"] = entering_from_task_run
1417
+
1405
1418
  begin_run = create_call(
1406
- begin_task_map if mapped else get_task_call_return_value,
1407
- task=task,
1408
- flow_run_context=flow_run_context,
1409
- parameters=parameters,
1410
- wait_for=wait_for,
1411
- return_type=return_type,
1412
- task_runner=task_runner,
1419
+ begin_task_map if mapped else get_task_call_return_value, **call_arguments
1413
1420
  )
1414
1421
 
1415
1422
  if task.isasync and (
@@ -1536,6 +1543,7 @@ async def get_task_call_return_value(
1536
1543
  return_type: EngineReturnType,
1537
1544
  task_runner: Optional[BaseTaskRunner],
1538
1545
  extra_task_inputs: Optional[Dict[str, Set[TaskRunInput]]] = None,
1546
+ entering_from_task_run: Optional[bool] = False,
1539
1547
  ):
1540
1548
  extra_task_inputs = extra_task_inputs or {}
1541
1549
 
@@ -1546,6 +1554,7 @@ async def get_task_call_return_value(
1546
1554
  wait_for=wait_for,
1547
1555
  task_runner=task_runner,
1548
1556
  extra_task_inputs=extra_task_inputs,
1557
+ entering_from_task_run=entering_from_task_run,
1549
1558
  )
1550
1559
  if return_type == "future":
1551
1560
  return future
@@ -1564,12 +1573,14 @@ async def create_task_run_future(
1564
1573
  wait_for: Optional[Iterable[PrefectFuture]],
1565
1574
  task_runner: Optional[BaseTaskRunner],
1566
1575
  extra_task_inputs: Dict[str, Set[TaskRunInput]],
1576
+ entering_from_task_run: Optional[bool] = False,
1567
1577
  ) -> PrefectFuture:
1568
1578
  # Default to the flow run's task runner
1569
1579
  task_runner = task_runner or flow_run_context.task_runner
1570
1580
 
1571
1581
  # Generate a name for the future
1572
1582
  dynamic_key = _dynamic_key_for_task_run(flow_run_context, task)
1583
+
1573
1584
  task_run_name = (
1574
1585
  f"{task.name}-{dynamic_key}"
1575
1586
  if flow_run_context and flow_run_context.flow_run
@@ -1604,8 +1615,9 @@ async def create_task_run_future(
1604
1615
  )
1605
1616
  )
1606
1617
 
1607
- # Track the task run future in the flow run context
1608
- flow_run_context.task_run_futures.append(future)
1618
+ if not entering_from_task_run:
1619
+ # Track the task run future in the flow run context
1620
+ flow_run_context.task_run_futures.append(future)
1609
1621
 
1610
1622
  if task_runner.concurrency_type == TaskConcurrencyType.SEQUENTIAL:
1611
1623
  await future._wait()
@@ -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
 
@@ -28,6 +28,8 @@ from typing import (
28
28
  List,
29
29
  NoReturn,
30
30
  Optional,
31
+ Set,
32
+ Tuple,
31
33
  Type,
32
34
  TypeVar,
33
35
  Union,
@@ -75,6 +77,7 @@ from prefect.exceptions import (
75
77
  MissingFlowError,
76
78
  ObjectNotFound,
77
79
  ParameterTypeError,
80
+ ScriptError,
78
81
  UnspecifiedFlowError,
79
82
  )
80
83
  from prefect.filesystems import ReadableDeploymentStorage
@@ -1677,6 +1680,14 @@ def load_flow_from_entrypoint(
1677
1680
  raise MissingFlowError(
1678
1681
  f"Flow function with name {func_name!r} not found in {path!r}. "
1679
1682
  ) from exc
1683
+ except ScriptError as exc:
1684
+ # If the flow has dependencies that are not installed in the current
1685
+ # environment, fallback to loading the flow via AST parsing. The
1686
+ # drawback of this approach is that we're unable to actually load the
1687
+ # function, so we create a placeholder flow that will re-raise this
1688
+ # exception when called.
1689
+
1690
+ flow = load_placeholder_flow(entrypoint=entrypoint, raises=exc)
1680
1691
 
1681
1692
  if not isinstance(flow, Flow):
1682
1693
  raise MissingFlowError(
@@ -1802,24 +1813,138 @@ async def serve(
1802
1813
  await runner.start()
1803
1814
 
1804
1815
 
1805
- def load_flow_argument_from_entrypoint(
1806
- entrypoint: str, arg: str = "name"
1807
- ) -> Optional[str]:
1816
+ def load_placeholder_flow(entrypoint: str, raises: Exception):
1808
1817
  """
1809
- Extract a flow argument from an entrypoint string.
1818
+ Load a placeholder flow that is initialized with the same arguments as the
1819
+ flow specified in the entrypoint. If called the flow will raise `raises`.
1810
1820
 
1811
- Loads the source code of the entrypoint and extracts the flow argument from the
1812
- `flow` decorator.
1821
+ This is useful when a flow can't be loaded due to missing dependencies or
1822
+ other issues but the base metadata defining the flow is still needed.
1813
1823
 
1814
1824
  Args:
1815
- entrypoint: a string in the format `<path_to_script>:<flow_func_name>` or a module path
1816
- to a flow function
1825
+ entrypoint: a string in the format `<path_to_script>:<flow_func_name>`
1826
+ or a module path to a flow function
1827
+ raises: an exception to raise when the flow is called
1828
+ """
1829
+
1830
+ def _base_placeholder():
1831
+ raise raises
1832
+
1833
+ def sync_placeholder_flow(*args, **kwargs):
1834
+ _base_placeholder()
1835
+
1836
+ async def async_placeholder_flow(*args, **kwargs):
1837
+ _base_placeholder()
1838
+
1839
+ placeholder_flow = (
1840
+ async_placeholder_flow
1841
+ if is_entrypoint_async(entrypoint)
1842
+ else sync_placeholder_flow
1843
+ )
1844
+
1845
+ arguments = load_flow_arguments_from_entrypoint(entrypoint)
1846
+ arguments["fn"] = placeholder_flow
1847
+
1848
+ return Flow(**arguments)
1849
+
1850
+
1851
+ def load_flow_arguments_from_entrypoint(
1852
+ entrypoint: str, arguments: Optional[Union[List[str], Set[str]]] = None
1853
+ ) -> Dict[str, Any]:
1854
+ """
1855
+ Extract flow arguments from an entrypoint string.
1856
+
1857
+ Loads the source code of the entrypoint and extracts the flow arguments
1858
+ from the `flow` decorator.
1859
+
1860
+ Args:
1861
+ entrypoint: a string in the format `<path_to_script>:<flow_func_name>`
1862
+ or a module path to a flow function
1863
+ """
1864
+
1865
+ func_def, source_code = _entrypoint_definition_and_source(entrypoint)
1866
+
1867
+ if arguments is None:
1868
+ # If no arguments are provided default to known arguments that are of
1869
+ # built-in types.
1870
+ arguments = {
1871
+ "name",
1872
+ "version",
1873
+ "retries",
1874
+ "retry_delay_seconds",
1875
+ "description",
1876
+ "timeout_seconds",
1877
+ "validate_parameters",
1878
+ "persist_result",
1879
+ "cache_result_in_memory",
1880
+ "log_prints",
1881
+ }
1882
+
1883
+ result = {}
1884
+
1885
+ for decorator in func_def.decorator_list:
1886
+ if (
1887
+ isinstance(decorator, ast.Call)
1888
+ and getattr(decorator.func, "id", "") == "flow"
1889
+ ):
1890
+ for keyword in decorator.keywords:
1891
+ if keyword.arg not in arguments:
1892
+ continue
1893
+
1894
+ if isinstance(keyword.value, ast.Constant):
1895
+ # Use the string value of the argument
1896
+ result[keyword.arg] = str(keyword.value.value)
1897
+ continue
1898
+
1899
+ # if the arg value is not a raw str (i.e. a variable or expression),
1900
+ # then attempt to evaluate it
1901
+ namespace = safe_load_namespace(source_code)
1902
+ literal_arg_value = ast.get_source_segment(source_code, keyword.value)
1903
+ cleaned_value = (
1904
+ literal_arg_value.replace("\n", "") if literal_arg_value else ""
1905
+ )
1906
+
1907
+ try:
1908
+ evaluated_value = eval(cleaned_value, namespace) # type: ignore
1909
+ result[keyword.arg] = str(evaluated_value)
1910
+ except Exception as e:
1911
+ logger.info(
1912
+ "Failed to parse @flow argument: `%s=%s` due to the following error. Ignoring and falling back to default behavior.",
1913
+ keyword.arg,
1914
+ literal_arg_value,
1915
+ exc_info=e,
1916
+ )
1917
+ # ignore the decorator arg and fallback to default behavior
1918
+ continue
1919
+
1920
+ if "name" in arguments and "name" not in result:
1921
+ # If no matching decorator or keyword argument for `name' is found
1922
+ # fallback to the function name.
1923
+ result["name"] = func_def.name.replace("_", "-")
1924
+
1925
+ return result
1926
+
1927
+
1928
+ def is_entrypoint_async(entrypoint: str) -> bool:
1929
+ """
1930
+ Determine if the function specified in the entrypoint is asynchronous.
1931
+
1932
+ Args:
1933
+ entrypoint: A string in the format `<path_to_script>:<func_name>` or
1934
+ a module path to a function.
1817
1935
 
1818
1936
  Returns:
1819
- The flow argument value
1937
+ True if the function is asynchronous, False otherwise.
1820
1938
  """
1939
+ func_def, _ = _entrypoint_definition_and_source(entrypoint)
1940
+ return isinstance(func_def, ast.AsyncFunctionDef)
1941
+
1942
+
1943
+ def _entrypoint_definition_and_source(
1944
+ entrypoint: str,
1945
+ ) -> Tuple[Union[ast.FunctionDef, ast.AsyncFunctionDef], str]:
1821
1946
  if ":" in entrypoint:
1822
- # split by the last colon once to handle Windows paths with drive letters i.e C:\path\to\file.py:do_stuff
1947
+ # Split by the last colon once to handle Windows paths with drive letters i.e C:\path\to\file.py:do_stuff
1823
1948
  path, func_name = entrypoint.rsplit(":", maxsplit=1)
1824
1949
  source_code = Path(path).read_text()
1825
1950
  else:
@@ -1828,6 +1953,7 @@ def load_flow_argument_from_entrypoint(
1828
1953
  if not spec or not spec.origin:
1829
1954
  raise ValueError(f"Could not find module {path!r}")
1830
1955
  source_code = Path(spec.origin).read_text()
1956
+
1831
1957
  parsed_code = ast.parse(source_code)
1832
1958
  func_def = next(
1833
1959
  (
@@ -1844,42 +1970,8 @@ def load_flow_argument_from_entrypoint(
1844
1970
  ),
1845
1971
  None,
1846
1972
  )
1973
+
1847
1974
  if not func_def:
1848
1975
  raise ValueError(f"Could not find flow {func_name!r} in {path!r}")
1849
- for decorator in func_def.decorator_list:
1850
- if (
1851
- isinstance(decorator, ast.Call)
1852
- and getattr(decorator.func, "id", "") == "flow"
1853
- ):
1854
- for keyword in decorator.keywords:
1855
- if keyword.arg == arg:
1856
- if isinstance(keyword.value, ast.Constant):
1857
- return (
1858
- keyword.value.value
1859
- ) # Return the string value of the argument
1860
-
1861
- # if the arg value is not a raw str (i.e. a variable or expression),
1862
- # then attempt to evaluate it
1863
- namespace = safe_load_namespace(source_code)
1864
- literal_arg_value = ast.get_source_segment(
1865
- source_code, keyword.value
1866
- )
1867
- try:
1868
- evaluated_value = eval(literal_arg_value, namespace) # type: ignore
1869
- except Exception as e:
1870
- logger.info(
1871
- "Failed to parse @flow argument: `%s=%s` due to the following error. Ignoring and falling back to default behavior.",
1872
- arg,
1873
- literal_arg_value,
1874
- exc_info=e,
1875
- )
1876
- # ignore the decorator arg and fallback to default behavior
1877
- break
1878
- return str(evaluated_value)
1879
-
1880
- if arg == "name":
1881
- return func_name.replace(
1882
- "_", "-"
1883
- ) # If no matching decorator or keyword argument is found
1884
1976
 
1885
- return None
1977
+ return func_def, source_code
@@ -202,7 +202,7 @@ def _build_generic_endpoint_for_flows(
202
202
 
203
203
  try:
204
204
  flow = load_flow_from_entrypoint(body.entrypoint)
205
- except (MissingFlowError, ScriptError, ModuleNotFoundError):
205
+ except (FileNotFoundError, MissingFlowError, ScriptError, ModuleNotFoundError):
206
206
  return JSONResponse(
207
207
  status_code=status.HTTP_404_NOT_FOUND,
208
208
  content={"message": "Flow not found"},
@@ -685,6 +685,7 @@ class Task(Generic[P, R]):
685
685
  return_type=return_type,
686
686
  client=get_client(),
687
687
  )
688
+ entering_from_task_run = bool(TaskRunContext.get())
688
689
 
689
690
  return enter_task_run_engine(
690
691
  self,
@@ -693,6 +694,7 @@ class Task(Generic[P, R]):
693
694
  task_runner=SequentialTaskRunner(),
694
695
  return_type=return_type,
695
696
  mapped=False,
697
+ entering_from_task_run=entering_from_task_run,
696
698
  )
697
699
 
698
700
  @overload
@@ -423,7 +423,7 @@ def safe_load_namespace(source_code: str):
423
423
  logger.debug("Failed to import from %s: %s", node.module, e)
424
424
 
425
425
  # Handle local definitions
426
- for node in ast.walk(parsed_code):
426
+ for node in parsed_code.body:
427
427
  if isinstance(node, (ast.ClassDef, ast.FunctionDef, ast.Assign)):
428
428
  try:
429
429
  # Compile and execute each class and function definition and assignment
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 2.19.6
3
+ Version: 2.19.8
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -27,7 +27,7 @@ sniffio<2.0.0,>=1.3.0
27
27
  toml>=0.10.0
28
28
  typing_extensions<5.0.0,>=4.5.0
29
29
  ujson<6.0.0,>=5.8.0
30
- uvicorn<0.29.0,>=0.14.0
30
+ uvicorn!=0.29.0,>=0.14.0
31
31
  websockets<13.0,>=10.4
32
32
  itsdangerous
33
33
  python-multipart>=0.0.7
File without changes