<p dir="ltr">I think this is a packaging problem. </p>
<p dir="ltr">In an ideal world, Python would ship some version of asyncio, but you would also be able to pip install a newer version into your virtual environment, and it would override the version in stdlib.</p>
<p dir="ltr">As it stands now, however, if you pip install another version of asyncio, the version in stdlib still takes precedence. What I end up doing in my (non open source) projects is to include a copy of asyncio and manually modify sys.path to point to it.</p>
<p dir="ltr">Can we fix pip/virtualenv instead?</p>
<div class="gmail_quote">On 28 Aug 2015 10:02 am, "Victor Stinner" <<a href="mailto:victor.stinner@gmail.com">victor.stinner@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
2015-08-27 23:15 GMT+02:00 Yury Selivanov <<a href="mailto:yselivanov.ml@gmail.com">yselivanov.ml@gmail.com</a>>:<br>
> Recently, in an asyncio related issue [1], Guido said that new features<br>
> for asyncio have to wait till 3.6, since asyncio is no longer a provisional<br>
> package. (...)<br>
> For example, there is an issue [2] to add starttls support to asyncio.<br>
> (...)<br>
> Aside from adding new APIs, we also have to improve debugging<br>
> capabilities.<br>
> (...)<br>
<br>
I would propose something more radical: remove asyncio from the stdlib.<br>
<br>
PEP 411: "While it is considered an unlikely outcome, such packages<br>
*may even be removed* from the standard library without a deprecation<br>
period if the concerns regarding their API or maintenance prove<br>
well-founded."<br>
<br>
As an asyncio developer, I'm not sure that asyncio fits well into the<br>
Python stdlib. The release cycle of feature release is long (18<br>
months? or more?), the release cycle for bugfix release is sometimes<br>
also too long (1 month at least). It's also frustrating to have subtle<br>
API differences between Python 3.3, 3.4 and 3.5. For example,<br>
asyncio.JoinableQueue was removed in Python 3.5, asyncio.Queue can<br>
*now* be used instead, but asyncio.JoinableQueue should be used on<br>
older Python version... It means that you have to write different code<br>
depending on your Python version to support all Python versions.<br>
<br>
I can give much more examples of missing asyncio features. Example:<br>
Windows proactor event loop doesn't support signals (CTRL+C) nor UDP.<br>
<br>
asyncio is moving so fast, that changes are not documented at all in<br>
Misc/NEWS or Doc/whatsnews/x.y.rst. I tried to document changes in my<br>
fork Trollius. See its changelog to have an idea how fast asyncio is<br>
still changing:<br>
<a href="http://trollius.readthedocs.org/changelog.html" rel="noreferrer" target="_blank">http://trollius.readthedocs.org/changelog.html</a><br>
<br>
I don't know how users will react to the removal of asyncio from the<br>
stdlib ("asyncio is not trusted/supported by Python?").<br>
<br>
The idea is to install it using pip: "pip install asyncio". The major<br>
difference is that "pip install -U asyncio" allows to retrieve the<br>
latest asyncio version, independently of your Python version. Hum, I<br>
don't know if it works with Python 3.4 (which "asyncio" module is used<br>
in this case?).<br>
<br>
Developing asyncio only on Github would avoid the risk of having<br>
patches temporary only in Github or only in CPython. It avoids the<br>
need to synchronize the Git (Github) and Mercurial (CPython)<br>
repositories.<br>
<br>
<br>
Compare Python release dates with Twisted, Tornado and eventlet release dates.<br>
<br>
Twisted releases:<br>
<br>
* 2015-01-30: 15.0.0<br>
* 2015-04-13: 15.1.0<br>
* 2015-05-19: 15.2.0<br>
* 2015-08-04: 15.3.0<br>
<br>
Tornado releases:<br>
<br>
* 2014-07-15: 4.0<br>
* 2015-02-07: 4.1<br>
* 2015-05-27: 4.2<br>
* 2015-07-17: 4.2.1<br>
<br>
eventlet releases:<br>
<br>
* 2015-02-25: 0.17.1<br>
* 2015-04-03: 0.17.2<br>
* 2015-04-09: 0.17.3<br>
* 2015-05-08: 0.17.4<br>
<br>
Victor<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/gjcarneiro%40gmail.com" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/gjcarneiro%40gmail.com</a><br>
</blockquote></div>