At the risk of spamming... I also find the whole ...
# ask-community
n
At the risk of spamming... I also find the whole "smart async/sync" functionality quite frustrating. Take this example:
Copy code
bucket = S3Bucket.load("bucket-name")
The type of
bucket
here is
S3Bucket | Coroutine[Any, Any, S3Bucket]
. Because of that, any downstream function that uses
bucket
is going to take issue with its type. I'm clearly using it in a synchronous context here (the parent flow is synchronous), so how can I call this in a way that clearly indicates that I want a synchronous response and a narrow type? With the way things are now, I'm littering
cast()
all over the place, and it's pretty gross. But maybe I'm just going about this wrong.
a
n
Interesting. I see a lot of merged commits referencing this talking about prefect_aws.s3 migrating off sync_compatible. Does this mean I can soon expect to use
S3Bucket.load()
and get a fully synchronous return type, because there will be an
S3Bucket.aload()
equivalent?
a
Yep!
🎉 2