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 zzzeek
Recipients Rokas K. (rku), crusaderky, djarb, jab, jcea, martin.panter, njs, yselivanov, zzzeek
Date 2020-07-07.20:26:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594153572.12.0.00537732106629.issue22239@roundup.psfhosted.org>
In-reply-to
Content
> With greenlets OTOH, it becomes possible for another task to observe someobj.a == 1 without someobj.b == 2, in case someobj.__setattr__ internally invoked an await_().

let me try this one more time.    Basically if someone wrote this:

async def do_thing():
   someobj.a =1
   await do_io_setattr(someobj, "b", 2)

then in the async approach, you can again say, assuming "someobj" is global, that another task can observe "someobj.a == 1" without "someobj.b == 2".    I suppose you are making the argument that because there's an "await" keyword there, now everything is OK because the reader of the code knows there's a context switch.

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.  That SQLAlchemy internally is not using this coding style, whether or not that leads to new kinds of bugs, there are new kinds of bugs no matter what kind of code a library uses, I don't think this hurts the user community.  The community is hurting *A LOT* right now because asyncio is intentionally non-compatible with the traditional blocking approach that is not only still prevalent it's one that a lot of us think is *easier* to work with.
History
Date User Action Args
2020-07-07 20:26:12zzzeeksetrecipients: + zzzeek, jcea, djarb, njs, jab, martin.panter, yselivanov, Rokas K. (rku), crusaderky
2020-07-07 20:26:12zzzeeksetmessageid: <1594153572.12.0.00537732106629.issue22239@roundup.psfhosted.org>
2020-07-07 20:26:12zzzeeklinkissue22239 messages
2020-07-07 20:26:12zzzeekcreate