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, pmpp, yselivanov, zzzeek
Date 2020-07-08.13:28:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594214928.58.0.522189116069.issue22239@roundup.psfhosted.org>
In-reply-to
Content
as far as cancellation, I gather you're referring to what in gevent / greenlet is the GreenletExit exception.  Sure, that thing is a PITA.   Hence we're all working to provide asyncio frontends and networking backends so that the effects of cancellation I (handwavy handwavy) believe would work smoothly as long as the middle part is done right.   cancellation is likely a more prominent issue with HTTP requests and responses because users are hitting their browser stop buttons all the time.  With databases this typically is within the realm of network partitioning or service restarts, or if the driver is screwing up in some way which with the monkeypatching thing is more likely, but "cancellation" from a database perspective is not the constant event that I think it would be in an HTTP perspective.


> I think I either disagree or am missing something :-). Certainly for both edgedb and urllib3, when they're running in sync mode, they end up using synchronous network APIs at the "bottom", and it works fine.

OK it took me a minute to understand what you're saying, which is, if we are doing the coroutine.send() thing you illustrated below, we're not in an event loop anyway so we can just call blocking code.   OK I did not understand that.  I haven't looked at the coroutine internals through all of this (which is part of my original assertion that I should not have been the person proposing this whole greenlet thing anyway :) ).

Why did urllib3 write unasync?  https://pypi.org/project/unasync/    strictly so they can have a python 2 codebase and that's it?   

SQLAlchemy goes python 3 only in version 2.0.  I did bench the coro example against a non-coro example and it's 3x slower likely due to the StopIteration but as mentioned earlier if this is only once per front-to-back then it would not amount to anything in context.   Still, the risk factor of a rewrite like that, where risk encompasses just all the dumb mistakes and bugs that would be introduced by rewriting everything, does not seem worth it.
History
Date User Action Args
2020-07-08 13:28:48zzzeeksetrecipients: + zzzeek, jcea, djarb, njs, jab, pmpp, martin.panter, yselivanov, Rokas K. (rku), crusaderky
2020-07-08 13:28:48zzzeeksetmessageid: <1594214928.58.0.522189116069.issue22239@roundup.psfhosted.org>
2020-07-08 13:28:48zzzeeklinkissue22239 messages
2020-07-08 13:28:48zzzeekcreate