This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author njs
Recipients Rokas K. (rku), crusaderky, djarb, jab, jcea, martin.panter, njs, yselivanov, zzzeek
Date 2020-07-07.21:15:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594156539.35.0.439840526522.issue22239@roundup.psfhosted.org>
In-reply-to
Content
> Whether or not one buys that, the point of my approach is that SQLAlchemy itself *will* publish async methods.  End user code *will not* ever context switch to another task without them explicitly calling using an await.

Oh, I thought the primary problem for SQLAlchemy supporting async is that the ORM needs to do IO from inside __getattr__ methods. So I assumed that the reason you were so excited about greenlets was that it would let you use await_() from inside those __getattr__ calls, which would involve exposing your use of greenlets as part of your public API.

If you're just talking about using greenlets internally and then writing both sync and async shims to be your public API, then obviously that reduces the risks. Maybe greenlets will cause you problems, maybe not, but either way you know what you're getting into and the decision only affects you :-). But, if that's all you're using them for, then I'm not sure that they have a significant advantage over the edgedb-style synchronous wrapper or the unasync-style automatically generated sync code.
History
Date User Action Args
2020-07-07 21:15:39njssetrecipients: + njs, jcea, djarb, zzzeek, jab, martin.panter, yselivanov, Rokas K. (rku), crusaderky
2020-07-07 21:15:39njssetmessageid: <1594156539.35.0.439840526522.issue22239@roundup.psfhosted.org>
2020-07-07 21:15:39njslinkissue22239 messages
2020-07-07 21:15:39njscreate