pypi prefect 2.19.9
2.19.9: Sync or Swim

latest releases: 3.0.2, 2.20.7, 3.0.1...
one month ago

This PR continues Prefect's 2.0 lineage as we prepare for a major 3.0 release. This release is particularly special with respect to 3.0 as it adds warnings to APIs or interfaces that will need updating in 3.0.

There are many internal APIs in Prefect that can be run both synchronously and asynchronously depending on the runtime context in which they are called. If you've ever encountered the error AttributeError: 'coroutine' object has no attribute when loading a Block then you know what I'm referring to. In 3.0 we have updated the internal logic for switching between synchronous/asynchronous modes in an attempt to provide clearer guidelines and improved performance.

If you ever encounter such an error, you can now use the special _sync keyword argument to explicitly enforce the mode of execution you'd prefer:

my_block = Block.load("example/block", _sync=True)

my_block = await Block.load("example/block", _sync=False)

When this kwarg is not provided, Prefect makes an educated guess as to whether a coroutine should be returned to await or whether to run the logic synchronously on your behalf.

New Features ๐ŸŽ‰

Bug Fixes ๐Ÿž

Development & Tidiness ๐Ÿงน

Full Changelog: 2.19.8...2.19.9

Don't miss a new prefect release

NewReleases is sending notifications on new releases.