5 ms·
It looks like uvloop requires Python 3.5. How practical is it to create a fork for companies stuck on Python 2.7?
by jamesmishra 10y ago
It looks like uvloop requires Python 3.5. How practical is it to create a fork for companies stuck on Python 2.7?
- 1st1 10y agoNot really practical. uvloop is designed to work in tandem with asyncio, which is a Python 3-only module. asyncio, in turn, requires 'yield from' support, something that Python 2 doesn't have.
- jquast 10y agoThe 'Trollius' module backported asyncio to Python 2, requiring syntax changes, though. For example "yield from" to "yield From()". Work on Trollius was stopped a few weeks ago, there wasn't enough interest/use. Call for interested maintainers, http://trollius.readthedocs.io/deprecated.html#deprecated http://trollius.readthedocs.io/deprecated.html#deprecated
- takeda 10y agoThe problem with Trollius was that packages that asyncio packages needed explicitly to add support for it to work (because Python 2 does not have yield from) Several packages (I remember aiohttp was one of them) did not want to do that.
- sharpshadow 10y agoToday it should be good practice to use containers with Python 2.7 and 3.5 or any other versions you like. With that you can solve most szenarios.
- takeda 10y agoPython is actually designed in such way that you can install multiple major versions and they can coexist perfectly fine together. For example you can install python 2.6, 2.7, 3.3, 3.4, & 3.5 all on one host without any conflicts. The limitation is that many distributions prefer to not maintain different versions of supposedly the same language. If you use RedHat or CentOS you can just use https://ius.io/ https://ius.io/ and get access to the other python versions. This is one of few repos that makes sure the packages don't conflict with system ones.
- masklinn 10y ago> How practical is it to create a fork for companies stuck on Python 2.7? Not very, it's an alternative event loop for asyncio[0] which was introduced in 3.4 and builds upon other Python 3 features (e.g. `yield from`) [0] https://docs.python.org/3/library/asyncio.html https://docs.python.org/3/library/asyncio.html
- sametmax 10y agoUse either docker or/and crossbar.io to isolate the 2.7 code as a service if you don't want to port it, then add the rest of the code in 3.