prefect-client 3.3.0__tar.gz → 3.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. {prefect_client-3.3.0 → prefect_client-3.3.1}/PKG-INFO +2 -1
  2. {prefect_client-3.3.0 → prefect_client-3.3.1}/pyproject.toml +1 -0
  3. prefect_client-3.3.1/src/prefect/_build_info.py +5 -0
  4. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/compatibility/deprecated.py +29 -18
  5. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/calls.py +5 -2
  6. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/base.py +16 -2
  7. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/flows.py +17 -17
  8. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/tasks.py +8 -9
  9. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/types/_datetime.py +2 -2
  10. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/callables.py +1 -1
  11. prefect_client-3.3.0/src/prefect/_build_info.py +0 -5
  12. {prefect_client-3.3.0 → prefect_client-3.3.1}/.gitignore +0 -0
  13. {prefect_client-3.3.0 → prefect_client-3.3.1}/LICENSE +0 -0
  14. {prefect_client-3.3.0 → prefect_client-3.3.1}/README.md +0 -0
  15. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/.prefectignore +0 -0
  16. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/__init__.py +0 -0
  17. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/__main__.py +0 -0
  18. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_experimental/__init__.py +0 -0
  19. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_experimental/bundles.py +0 -0
  20. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_experimental/lineage.py +0 -0
  21. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_experimental/sla/__init__.py +0 -0
  22. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_experimental/sla/client.py +0 -0
  23. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_experimental/sla/objects.py +0 -0
  24. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/__init__.py +0 -0
  25. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/_logging.py +0 -0
  26. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/compatibility/__init__.py +0 -0
  27. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/compatibility/async_dispatch.py +0 -0
  28. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/compatibility/migration.py +0 -0
  29. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/__init__.py +0 -0
  30. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/api.py +0 -0
  31. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  32. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  33. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/inspection.py +0 -0
  34. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/primitives.py +0 -0
  35. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/services.py +0 -0
  36. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/threads.py +0 -0
  37. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/concurrency/waiters.py +0 -0
  38. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/integrations.py +0 -0
  39. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/pydantic/__init__.py +0 -0
  40. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/pydantic/schemas.py +0 -0
  41. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
  42. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  43. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  44. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/pytz.py +0 -0
  45. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/retries.py +0 -0
  46. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/schemas/__init__.py +0 -0
  47. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/schemas/bases.py +0 -0
  48. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/schemas/fields.py +0 -0
  49. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/schemas/serializers.py +0 -0
  50. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_internal/schemas/validators.py +0 -0
  51. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_result_records.py +0 -0
  52. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_vendor/croniter/__init__.py +0 -0
  53. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_vendor/croniter/croniter.py +0 -0
  54. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/_waiters.py +0 -0
  55. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/agent.py +0 -0
  56. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/artifacts.py +0 -0
  57. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/automations.py +0 -0
  58. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/blocks/__init__.py +0 -0
  59. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/blocks/abstract.py +0 -0
  60. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/blocks/core.py +0 -0
  61. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/blocks/fields.py +0 -0
  62. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/blocks/notifications.py +0 -0
  63. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/blocks/redis.py +0 -0
  64. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/blocks/system.py +0 -0
  65. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/blocks/webhook.py +0 -0
  66. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/cache_policies.py +0 -0
  67. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/__init__.py +0 -0
  68. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/cloud.py +0 -0
  69. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/collections.py +0 -0
  70. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/constants.py +0 -0
  71. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/__init__.py +0 -0
  72. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_artifacts/__init__.py +0 -0
  73. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_artifacts/client.py +0 -0
  74. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_automations/__init__.py +0 -0
  75. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_automations/client.py +0 -0
  76. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_blocks_documents/__init__.py +0 -0
  77. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_blocks_documents/client.py +0 -0
  78. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_blocks_schemas/__init__.py +0 -0
  79. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_blocks_schemas/client.py +0 -0
  80. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_blocks_types/__init__.py +0 -0
  81. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_blocks_types/client.py +0 -0
  82. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_concurrency_limits/__init__.py +0 -0
  83. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_concurrency_limits/client.py +0 -0
  84. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_deployments/__init__.py +0 -0
  85. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_deployments/client.py +0 -0
  86. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_flow_runs/__init__.py +0 -0
  87. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_flow_runs/client.py +0 -0
  88. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_flows/__init__.py +0 -0
  89. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_flows/client.py +0 -0
  90. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_logs/__init__.py +0 -0
  91. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_logs/client.py +0 -0
  92. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_variables/__init__.py +0 -0
  93. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_variables/client.py +0 -0
  94. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_work_pools/__init__.py +0 -0
  95. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/_work_pools/client.py +0 -0
  96. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/base.py +0 -0
  97. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/orchestration/routes.py +0 -0
  98. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/schemas/__init__.py +0 -0
  99. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/schemas/actions.py +0 -0
  100. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/schemas/filters.py +0 -0
  101. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/schemas/objects.py +0 -0
  102. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/schemas/responses.py +0 -0
  103. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/schemas/schedules.py +0 -0
  104. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/schemas/sorting.py +0 -0
  105. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/subscriptions.py +0 -0
  106. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/types/__init__.py +0 -0
  107. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/types/flexible_schedule_list.py +0 -0
  108. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/client/utilities.py +0 -0
  109. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/__init__.py +0 -0
  110. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/_asyncio.py +0 -0
  111. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/_events.py +0 -0
  112. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/asyncio.py +0 -0
  113. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/context.py +0 -0
  114. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/services.py +0 -0
  115. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/sync.py +0 -0
  116. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/v1/__init__.py +0 -0
  117. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/v1/_asyncio.py +0 -0
  118. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/v1/_events.py +0 -0
  119. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/v1/asyncio.py +0 -0
  120. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/v1/context.py +0 -0
  121. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/v1/services.py +0 -0
  122. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/concurrency/v1/sync.py +0 -0
  123. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/context.py +0 -0
  124. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/__init__.py +0 -0
  125. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/base.py +0 -0
  126. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/deployments.py +0 -0
  127. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/flow_runs.py +0 -0
  128. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/runner.py +0 -0
  129. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/schedules.py +0 -0
  130. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/steps/__init__.py +0 -0
  131. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/steps/core.py +0 -0
  132. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/steps/pull.py +0 -0
  133. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/deployments/steps/utility.py +0 -0
  134. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/docker/__init__.py +0 -0
  135. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/docker/docker_image.py +0 -0
  136. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/engine.py +0 -0
  137. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/__init__.py +0 -0
  138. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/actions.py +0 -0
  139. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/cli/__init__.py +0 -0
  140. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/cli/automations.py +0 -0
  141. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/clients.py +0 -0
  142. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/filters.py +0 -0
  143. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/related.py +0 -0
  144. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/schemas/__init__.py +0 -0
  145. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/schemas/automations.py +0 -0
  146. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/schemas/deployment_triggers.py +0 -0
  147. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/schemas/events.py +0 -0
  148. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/schemas/labelling.py +0 -0
  149. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/utilities.py +0 -0
  150. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/events/worker.py +0 -0
  151. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/exceptions.py +0 -0
  152. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/filesystems.py +0 -0
  153. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/flow_engine.py +0 -0
  154. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/flow_runs.py +0 -0
  155. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/futures.py +0 -0
  156. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/infrastructure/__init__.py +0 -0
  157. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/infrastructure/base.py +0 -0
  158. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/infrastructure/provisioners/__init__.py +0 -0
  159. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/infrastructure/provisioners/cloud_run.py +0 -0
  160. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/infrastructure/provisioners/coiled.py +0 -0
  161. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/infrastructure/provisioners/container_instance.py +0 -0
  162. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/infrastructure/provisioners/ecs.py +0 -0
  163. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/infrastructure/provisioners/modal.py +0 -0
  164. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/input/__init__.py +0 -0
  165. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/input/actions.py +0 -0
  166. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/input/run_input.py +0 -0
  167. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/locking/__init__.py +0 -0
  168. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/locking/filesystem.py +0 -0
  169. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/locking/memory.py +0 -0
  170. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/locking/protocol.py +0 -0
  171. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/logging/__init__.py +0 -0
  172. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/logging/configuration.py +0 -0
  173. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/logging/filters.py +0 -0
  174. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/logging/formatters.py +0 -0
  175. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/logging/handlers.py +0 -0
  176. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/logging/highlighters.py +0 -0
  177. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/logging/loggers.py +0 -0
  178. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/logging/logging.yml +0 -0
  179. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/main.py +0 -0
  180. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/plugins.py +0 -0
  181. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/py.typed +0 -0
  182. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/results.py +0 -0
  183. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runner/__init__.py +0 -0
  184. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runner/runner.py +0 -0
  185. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runner/server.py +0 -0
  186. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runner/storage.py +0 -0
  187. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runner/submit.py +0 -0
  188. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runner/utils.py +0 -0
  189. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runtime/__init__.py +0 -0
  190. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runtime/deployment.py +0 -0
  191. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runtime/flow_run.py +0 -0
  192. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/runtime/task_run.py +0 -0
  193. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/schedules.py +0 -0
  194. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/serializers.py +0 -0
  195. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/__init__.py +0 -0
  196. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/admin.py +0 -0
  197. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/artifacts.py +0 -0
  198. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/automations.py +0 -0
  199. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/block_capabilities.py +0 -0
  200. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/block_documents.py +0 -0
  201. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/block_schemas.py +0 -0
  202. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/block_types.py +0 -0
  203. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/clients.py +0 -0
  204. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/collections.py +0 -0
  205. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
  206. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/concurrency_limits.py +0 -0
  207. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/concurrency_limits_v2.py +0 -0
  208. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/csrf_token.py +0 -0
  209. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/dependencies.py +0 -0
  210. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/deployments.py +0 -0
  211. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/events.py +0 -0
  212. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/flow_run_notification_policies.py +0 -0
  213. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/flow_run_states.py +0 -0
  214. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/flow_runs.py +0 -0
  215. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/flows.py +0 -0
  216. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/logs.py +0 -0
  217. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/middleware.py +0 -0
  218. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/root.py +0 -0
  219. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/run_history.py +0 -0
  220. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/saved_searches.py +0 -0
  221. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/server.py +0 -0
  222. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  223. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/task_run_states.py +0 -0
  224. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/task_runs.py +0 -0
  225. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/task_workers.py +0 -0
  226. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/templates.py +0 -0
  227. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/ui/__init__.py +0 -0
  228. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/ui/flow_runs.py +0 -0
  229. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/ui/flows.py +0 -0
  230. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/ui/schemas.py +0 -0
  231. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/ui/task_runs.py +0 -0
  232. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/validation.py +0 -0
  233. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/variables.py +0 -0
  234. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/work_queues.py +0 -0
  235. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/server/api/workers.py +0 -0
  236. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/__init__.py +0 -0
  237. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/base.py +0 -0
  238. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/constants.py +0 -0
  239. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/context.py +0 -0
  240. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/legacy.py +0 -0
  241. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/__init__.py +0 -0
  242. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/api.py +0 -0
  243. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/cli.py +0 -0
  244. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/client.py +0 -0
  245. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/cloud.py +0 -0
  246. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/deployments.py +0 -0
  247. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/experiments.py +0 -0
  248. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/flows.py +0 -0
  249. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/internal.py +0 -0
  250. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/logging.py +0 -0
  251. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/results.py +0 -0
  252. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/root.py +0 -0
  253. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/runner.py +0 -0
  254. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/__init__.py +0 -0
  255. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/api.py +0 -0
  256. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/database.py +0 -0
  257. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/deployments.py +0 -0
  258. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/ephemeral.py +0 -0
  259. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/events.py +0 -0
  260. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/flow_run_graph.py +0 -0
  261. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/root.py +0 -0
  262. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/services.py +0 -0
  263. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/tasks.py +0 -0
  264. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/server/ui.py +0 -0
  265. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/tasks.py +0 -0
  266. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/testing.py +0 -0
  267. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/models/worker.py +0 -0
  268. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/profiles.py +0 -0
  269. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/profiles.toml +0 -0
  270. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/settings/sources.py +0 -0
  271. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/states.py +0 -0
  272. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/task_engine.py +0 -0
  273. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/task_runners.py +0 -0
  274. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/task_runs.py +0 -0
  275. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/task_worker.py +0 -0
  276. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/telemetry/__init__.py +0 -0
  277. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/telemetry/bootstrap.py +0 -0
  278. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/telemetry/instrumentation.py +0 -0
  279. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/telemetry/logging.py +0 -0
  280. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/telemetry/processors.py +0 -0
  281. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/telemetry/run_telemetry.py +0 -0
  282. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/telemetry/services.py +0 -0
  283. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/transactions.py +0 -0
  284. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/types/__init__.py +0 -0
  285. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/types/entrypoint.py +0 -0
  286. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/__init__.py +0 -0
  287. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/_deprecated.py +0 -0
  288. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/_engine.py +0 -0
  289. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/_git.py +0 -0
  290. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/annotations.py +0 -0
  291. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/asyncutils.py +0 -0
  292. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/collections.py +0 -0
  293. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/compat.py +0 -0
  294. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/context.py +0 -0
  295. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/dispatch.py +0 -0
  296. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/dockerutils.py +0 -0
  297. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/engine.py +0 -0
  298. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/filesystem.py +0 -0
  299. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/generics.py +0 -0
  300. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/hashing.py +0 -0
  301. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/importtools.py +0 -0
  302. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/math.py +0 -0
  303. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/names.py +0 -0
  304. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/processutils.py +0 -0
  305. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/pydantic.py +0 -0
  306. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/render_swagger.py +0 -0
  307. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  308. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/schema_tools/hydration.py +0 -0
  309. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/schema_tools/validation.py +0 -0
  310. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/services.py +0 -0
  311. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/slugify.py +0 -0
  312. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/templating.py +0 -0
  313. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/text.py +0 -0
  314. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/timeout.py +0 -0
  315. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/urls.py +0 -0
  316. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/utilities/visualization.py +0 -0
  317. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/variables.py +0 -0
  318. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/workers/__init__.py +0 -0
  319. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/workers/base.py +0 -0
  320. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/workers/block.py +0 -0
  321. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/workers/cloud.py +0 -0
  322. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/workers/process.py +0 -0
  323. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/workers/server.py +0 -0
  324. {prefect_client-3.3.0 → prefect_client-3.3.1}/src/prefect/workers/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prefect-client
3
- Version: 3.3.0
3
+ Version: 3.3.1
4
4
  Summary: Workflow orchestration and management.
5
5
  Project-URL: Changelog, https://github.com/PrefectHQ/prefect/releases
6
6
  Project-URL: Documentation, https://docs.prefect.io
@@ -26,6 +26,7 @@ Requires-Dist: asgi-lifespan<3.0,>=1.0
26
26
  Requires-Dist: cachetools<6.0,>=5.3
27
27
  Requires-Dist: cloudpickle<4.0,>=2.0
28
28
  Requires-Dist: coolname<3.0.0,>=1.0.4
29
+ Requires-Dist: dateparser<2.0.0,>=1.1.1
29
30
  Requires-Dist: exceptiongroup>=1.0.0
30
31
  Requires-Dist: fastapi<1.0.0,>=0.111.0
31
32
  Requires-Dist: fsspec>=2022.5.0
@@ -30,6 +30,7 @@ dependencies = [
30
30
  "cachetools>=5.3,<6.0",
31
31
  "cloudpickle>=2.0,<4.0",
32
32
  "coolname>=1.0.4,<3.0.0",
33
+ "dateparser>=1.1.1,<2.0.0",
33
34
  "exceptiongroup>=1.0.0",
34
35
  "fastapi>=0.111.0,<1.0.0",
35
36
  "fsspec>=2022.5.0",
@@ -0,0 +1,5 @@
1
+ # Generated by versioningit
2
+ __version__ = "3.3.1"
3
+ __build_date__ = "2025-04-01 02:38:39.208039+00:00"
4
+ __git_commit__ = "6a1646202888ea59a3493f30ee9eaed6aea07960"
5
+ __dirty__ = False
@@ -10,12 +10,15 @@ will be calculated 6 months later. Start and end dates are always in the format
10
10
  e.g. Jan 2023.
11
11
  """
12
12
 
13
+ from __future__ import annotations
14
+
13
15
  import datetime
14
16
  import functools
15
17
  import sys
16
18
  import warnings
17
19
  from typing import TYPE_CHECKING, Any, Callable, Optional, Union
18
20
 
21
+ import dateparser
19
22
  from pydantic import BaseModel
20
23
  from typing_extensions import ParamSpec, TypeAlias, TypeVar
21
24
 
@@ -32,6 +35,9 @@ R = TypeVar("R", infer_variance=True)
32
35
  M = TypeVar("M", bound=BaseModel)
33
36
  T = TypeVar("T")
34
37
 
38
+ # Note: A datetime is strongly preferred over a string, but a string is acceptable for
39
+ # backwards compatibility until support is dropped from dateparser in Python 3.15.
40
+ _AcceptableDate: TypeAlias = Optional[Union[datetime.datetime, str]]
35
41
 
36
42
  DEPRECATED_WARNING = (
37
43
  "{name} has been deprecated{when}. It will not be available in new releases after {end_date}."
@@ -51,18 +57,25 @@ class PrefectDeprecationWarning(DeprecationWarning):
51
57
  """
52
58
 
53
59
 
60
+ def _coerce_datetime(
61
+ dt: Optional[_AcceptableDate],
62
+ ) -> Optional[datetime.datetime]:
63
+ if dt is None or isinstance(dt, datetime.datetime):
64
+ return dt
65
+ with warnings.catch_warnings():
66
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
67
+ return dateparser.parse(dt)
68
+
69
+
54
70
  def generate_deprecation_message(
55
71
  name: str,
56
- start_date: Optional[datetime.datetime] = None,
57
- end_date: Optional[datetime.datetime] = None,
72
+ start_date: Optional[_AcceptableDate] = None,
73
+ end_date: Optional[_AcceptableDate] = None,
58
74
  help: str = "",
59
75
  when: str = "",
60
76
  ) -> str:
61
- if start_date is not None and not isinstance(start_date, datetime.datetime):
62
- raise ValueError("Must provide start_date as a datetime")
63
-
64
- if end_date is not None and not isinstance(end_date, datetime.datetime):
65
- raise ValueError("Must provide end_date as a datetime")
77
+ start_date = _coerce_datetime(start_date)
78
+ end_date = _coerce_datetime(end_date)
66
79
 
67
80
  if start_date is None and end_date is None:
68
81
  raise ValueError(
@@ -87,8 +100,8 @@ def generate_deprecation_message(
87
100
 
88
101
  def deprecated_callable(
89
102
  *,
90
- start_date: Optional[datetime.datetime] = None,
91
- end_date: Optional[datetime.datetime] = None,
103
+ start_date: Optional[_AcceptableDate] = None,
104
+ end_date: Optional[_AcceptableDate] = None,
92
105
  stacklevel: int = 2,
93
106
  help: str = "",
94
107
  ) -> Callable[[Callable[P, R]], Callable[P, R]]:
@@ -112,8 +125,8 @@ def deprecated_callable(
112
125
 
113
126
  def deprecated_class(
114
127
  *,
115
- start_date: Optional[datetime.datetime] = None,
116
- end_date: Optional[datetime.datetime] = None,
128
+ start_date: Optional[_AcceptableDate] = None,
129
+ end_date: Optional[_AcceptableDate] = None,
117
130
  stacklevel: int = 2,
118
131
  help: str = "",
119
132
  ) -> Callable[[type[T]], type[T]]:
@@ -141,8 +154,8 @@ def deprecated_class(
141
154
  def deprecated_parameter(
142
155
  name: str,
143
156
  *,
144
- start_date: Optional[datetime.datetime] = None,
145
- end_date: Optional[datetime.datetime] = None,
157
+ start_date: Optional[_AcceptableDate] = None,
158
+ end_date: Optional[_AcceptableDate] = None,
146
159
  stacklevel: int = 2,
147
160
  help: str = "",
148
161
  when: Optional[Callable[[Any], bool]] = None,
@@ -197,8 +210,8 @@ JsonDict: TypeAlias = dict[str, JsonValue]
197
210
  def deprecated_field(
198
211
  name: str,
199
212
  *,
200
- start_date: Optional[datetime.datetime] = None,
201
- end_date: Optional[datetime.datetime] = None,
213
+ start_date: Optional[_AcceptableDate] = None,
214
+ end_date: Optional[_AcceptableDate] = None,
202
215
  when_message: str = "",
203
216
  help: str = "",
204
217
  when: Optional[Callable[[Any], bool]] = None,
@@ -279,9 +292,7 @@ def inject_renamed_module_alias_finder():
279
292
  sys.meta_path.insert(0, AliasedModuleFinder(DEPRECATED_MODULE_ALIASES))
280
293
 
281
294
 
282
- def register_renamed_module(
283
- old_name: str, new_name: str, start_date: datetime.datetime
284
- ):
295
+ def register_renamed_module(old_name: str, new_name: str, start_date: _AcceptableDate):
285
296
  """
286
297
  Register a renamed module.
287
298
 
@@ -374,8 +374,11 @@ class Call(Generic[T]):
374
374
 
375
375
  except CancelledError:
376
376
  # Report cancellation
377
- if TYPE_CHECKING:
378
- assert cancel_scope is not None
377
+ # in rare cases, enforce_sync_deadline raises CancelledError
378
+ # prior to yielding
379
+ if cancel_scope is None:
380
+ self.future.cancel()
381
+ return None
379
382
  if cancel_scope.timedout():
380
383
  setattr(self.future, "_timed_out", True)
381
384
  self.future.cancel()
@@ -222,6 +222,10 @@ class PrefectHttpxAsyncClient(httpx.AsyncClient):
222
222
  if the request either raises an exception listed in `retry_exceptions` or
223
223
  receives a response with a status code listed in `retry_codes`.
224
224
 
225
+ Retries are not counted against the limit if the response headers contains
226
+ a reserved value, indicating that the server is undergoing maintenance. These
227
+ requests will retry indefinitely until the header is no longer returned.
228
+
225
229
  Retries will be delayed based on either the retry header (preferred) or
226
230
  exponential backoff if a retry header is not provided.
227
231
  """
@@ -239,18 +243,21 @@ class PrefectHttpxAsyncClient(httpx.AsyncClient):
239
243
  await self._add_csrf_headers(request=request)
240
244
 
241
245
  while try_count <= PREFECT_CLIENT_MAX_RETRIES.value():
242
- try_count += 1
243
246
  retry_seconds = None
244
247
  exc_info = None
245
248
 
246
249
  try:
247
250
  response = await send(request, *send_args, **send_kwargs)
248
251
  except retry_exceptions: # type: ignore
252
+ try_count += 1
249
253
  if try_count > PREFECT_CLIENT_MAX_RETRIES.value():
250
254
  raise
251
255
  # Otherwise, we will ignore this error but capture the info for logging
252
256
  exc_info = sys.exc_info()
253
257
  else:
258
+ if response.headers.get("Prefect-Maintenance") != "true":
259
+ try_count += 1
260
+
254
261
  # We got a response; check if it's a CSRF error, otherwise
255
262
  # return immediately if it is not retryable
256
263
  if (
@@ -441,6 +448,10 @@ class PrefectHttpxSyncClient(httpx.Client):
441
448
  if the request either raises an exception listed in `retry_exceptions` or
442
449
  receives a response with a status code listed in `retry_codes`.
443
450
 
451
+ Retries are not counted against the limit if the response headers contains
452
+ a reserved value, indicating that the server is undergoing maintenance. These
453
+ requests will retry indefinitely until the header is no longer returned.
454
+
444
455
  Retries will be delayed based on either the retry header (preferred) or
445
456
  exponential backoff if a retry header is not provided.
446
457
  """
@@ -458,18 +469,21 @@ class PrefectHttpxSyncClient(httpx.Client):
458
469
  self._add_csrf_headers(request=request)
459
470
 
460
471
  while try_count <= PREFECT_CLIENT_MAX_RETRIES.value():
461
- try_count += 1
462
472
  retry_seconds = None
463
473
  exc_info = None
464
474
 
465
475
  try:
466
476
  response = send(request, *send_args, **send_kwargs)
467
477
  except retry_exceptions: # type: ignore
478
+ try_count += 1
468
479
  if try_count > PREFECT_CLIENT_MAX_RETRIES.value():
469
480
  raise
470
481
  # Otherwise, we will ignore this error but capture the info for logging
471
482
  exc_info = sys.exc_info()
472
483
  else:
484
+ if response.headers.get("Prefect-Maintenance") != "true":
485
+ try_count += 1
486
+
473
487
  # We got a response; check if it's a CSRF error, otherwise
474
488
  # return immediately if it is not retryable
475
489
  if (
@@ -272,10 +272,11 @@ class Flow(Generic[P, R]):
272
272
 
273
273
  if isinstance(fn, classmethod):
274
274
  fn = cast(Callable[P, R], fn.__func__)
275
+ self._isclassmethod = True
275
276
 
276
277
  if isinstance(fn, staticmethod):
277
278
  fn = cast(Callable[P, R], fn.__func__)
278
- setattr(fn, "__prefect_static__", True)
279
+ self._isstaticmethod = True
279
280
 
280
281
  if not callable(fn):
281
282
  raise TypeError("'fn' must be callable")
@@ -405,11 +406,11 @@ class Flow(Generic[P, R]):
405
406
 
406
407
  @property
407
408
  def isclassmethod(self) -> bool:
408
- return hasattr(self.fn, "__prefect_cls__")
409
+ return getattr(self, "_isclassmethod", False)
409
410
 
410
411
  @property
411
412
  def isstaticmethod(self) -> bool:
412
- return getattr(self.fn, "__prefect_static__", False)
413
+ return getattr(self, "_isstaticmethod", False)
413
414
 
414
415
  def __get__(self, instance: Any, owner: Any) -> "Flow[P, R]":
415
416
  """
@@ -417,21 +418,20 @@ class Flow(Generic[P, R]):
417
418
  When an instance method is loaded, this method is called with the "self" instance as
418
419
  an argument. We return a copy of the flow with that instance bound to the flow's function.
419
420
  """
420
- if self.isstaticmethod:
421
- return self
422
-
423
421
  # wrapped function is a classmethod
424
- if instance is None:
425
- bound_flow = copy(self)
426
- setattr(bound_flow.fn, "__prefect_cls__", owner)
427
- return bound_flow
428
-
429
- # if the flow is being accessed on an instance, bind the instance to the __prefect_self__ attribute
430
- # of the flow's function. This will allow it to be automatically added to the flow's parameters
431
- else:
432
- bound_flow = copy(self)
433
- setattr(bound_flow.fn, "__prefect_self__", instance)
434
- return bound_flow
422
+ if self.isclassmethod:
423
+ bound_task = copy(self)
424
+ setattr(bound_task.fn, "__prefect_cls__", owner)
425
+ return bound_task
426
+
427
+ # if the task is being accessed on an instance, bind the instance to the __prefect_self__ attribute
428
+ # of the task's function. This will allow it to be automatically added to the task's parameters
429
+ if instance:
430
+ bound_task = copy(self)
431
+ bound_task.fn.__prefect_self__ = instance # type: ignore[attr-defined]
432
+ return bound_task
433
+
434
+ return self
435
435
 
436
436
  def with_options(
437
437
  self,
@@ -382,10 +382,11 @@ class Task(Generic[P, R]):
382
382
 
383
383
  if isinstance(fn, classmethod):
384
384
  fn = cast(Callable[P, R], fn.__func__)
385
+ self._isclassmethod = True
385
386
 
386
387
  if isinstance(fn, staticmethod):
387
388
  fn = cast(Callable[P, R], fn.__func__)
388
- setattr(fn, "__prefect_static__", True)
389
+ self._isstaticmethod = True
389
390
 
390
391
  if not callable(fn):
391
392
  raise TypeError("'fn' must be callable")
@@ -547,11 +548,11 @@ class Task(Generic[P, R]):
547
548
 
548
549
  @property
549
550
  def isclassmethod(self) -> bool:
550
- return hasattr(self.fn, "__prefect_cls__")
551
+ return getattr(self, "_isclassmethod", False)
551
552
 
552
553
  @property
553
554
  def isstaticmethod(self) -> bool:
554
- return getattr(self.fn, "__prefect_static__", False)
555
+ return getattr(self, "_isstaticmethod", False)
555
556
 
556
557
  def __get__(self, instance: Any, owner: Any) -> "Task[P, R]":
557
558
  """
@@ -559,23 +560,21 @@ class Task(Generic[P, R]):
559
560
  When an instance method is loaded, this method is called with the "self" instance as
560
561
  an argument. We return a copy of the task with that instance bound to the task's function.
561
562
  """
562
-
563
- if self.isstaticmethod:
564
- return self
565
-
566
563
  # wrapped function is a classmethod
567
- if not instance:
564
+ if self.isclassmethod:
568
565
  bound_task = copy(self)
569
566
  setattr(bound_task.fn, "__prefect_cls__", owner)
570
567
  return bound_task
571
568
 
572
569
  # if the task is being accessed on an instance, bind the instance to the __prefect_self__ attribute
573
570
  # of the task's function. This will allow it to be automatically added to the task's parameters
574
- else:
571
+ if instance:
575
572
  bound_task = copy(self)
576
573
  bound_task.fn.__prefect_self__ = instance # type: ignore[attr-defined]
577
574
  return bound_task
578
575
 
576
+ return self
577
+
579
578
  def with_options(
580
579
  self,
581
580
  *,
@@ -130,7 +130,7 @@ def end_of_period(dt: datetime.datetime, period: str) -> datetime.datetime:
130
130
  ValueError: If an invalid unit is specified.
131
131
  """
132
132
  if sys.version_info >= (3, 13):
133
- from whenever import Weekday, ZonedDateTime
133
+ from whenever import Weekday, ZonedDateTime, days
134
134
 
135
135
  if not isinstance(dt.tzinfo, ZoneInfo):
136
136
  zdt = ZonedDateTime.from_py_datetime(
@@ -150,8 +150,8 @@ def end_of_period(dt: datetime.datetime, period: str) -> datetime.datetime:
150
150
  days_till_end_of_week: int = (
151
151
  Weekday.SUNDAY.value - zdt.date().day_of_week().value
152
152
  )
153
+ zdt = zdt + days(days_till_end_of_week)
153
154
  zdt = zdt.replace(
154
- day=zdt.day + days_till_end_of_week,
155
155
  hour=23,
156
156
  minute=59,
157
157
  second=59,
@@ -63,7 +63,7 @@ def get_call_parameters(
63
63
  """
64
64
  if hasattr(fn, "__prefect_self__"):
65
65
  call_args = (getattr(fn, "__prefect_self__"), *call_args)
66
- if hasattr(fn, "__prefect_cls__"):
66
+ elif hasattr(fn, "__prefect_cls__"):
67
67
  call_args = (getattr(fn, "__prefect_cls__"), *call_args)
68
68
 
69
69
  try:
@@ -1,5 +0,0 @@
1
- # Generated by versioningit
2
- __version__ = "3.3.0"
3
- __build_date__ = "2025-03-31 15:28:57.721236+00:00"
4
- __git_commit__ = "ef73b2c49e26b05c55b52022048da00f0845dcf1"
5
- __dirty__ = False
File without changes
File without changes