> On 5 Aug 2016, at 02:21, Glyph Lefkowitz <gl...@twistedmatrix.com> wrote:
> 
> Not really.  You can't use the asyncio task scheduler, but we've been 
> upgrading to be able to support asyncio from Twisted and it's a lot easier 
> than many other Python 3 porting tasks :).

To follow up on Glyph’s point, what’s key is that the asyncio support doesn’t 
have to be present. It only has to be present if you assume that, in my 
previous example, I was always doing “import asyncio; 
asyncio.run_until_complete” (not real, I need an event loop, but I’m not trying 
to dirty up the example here).

However, run() can be *anything*. In particular, if we had “separate but equal” 
backends, one for sync code and one for asyncio’s event loop, it doesn’t matter 
if the asyncio event loop isn’t present in the Python runtime: we just see the 
import error and say “ok, only synchronous mode is available”. The goal there 
is to provide a transition: synchronous mode becomes the “legacy” mode in 
Requests, with the expectation that we’ll transition over to a purely evented 
backend in some future release.


>> Requests library (as well as sqlalchemy) are very crucial scaffolds for 
>> python community, I suspect you will be forced to support Python 2 up to the 
>> official death of branch at least.
> 
> I don't think that's in question.


I think we should support Python 2 up to end of support. However, I don’t think 
we should support Python 2 for *one day longer* than that unless a third-party 
vendor wants to cover the engineering cost of doing so.

Additionally, I have exactly no problem with calling the synchronous legacy 
mode in Requests exactly that: it will remain unchanged and so will probably 
continue to work, but we are no longer developing it. Requests is an extremely 
important part of the community, which is why I have no problem using it to 
exert subtle but real pressure to encourage people to move to Python 3.

Not right now, of course: we’ve still got a few years before that’s going to be 
necessary. =)

Cory

_______________________________________________
Async-sig mailing list
Async-sig@python.org
https://mail.python.org/mailman/listinfo/async-sig
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to