promise icon indicating copy to clipboard operation
promise copied to clipboard

Python 2.7 issue

Open MagnusSjoberg opened this issue 8 years ago • 4 comments

In iterate_promise.py a python 3 construct is used: yield from This prevents correct installs on i.e. CentOS which uses python 2.7.9 Would it be possible to change to using a 2.7 friendly construct like: for foo in promise.future: yield foo since there are no advanced (python >= 3) uses of yield?

MagnusSjoberg avatar Oct 17 '16 08:10 MagnusSjoberg

Will this be merged to master? (and available in >2.0.1?)

boneill42 avatar Apr 25 '17 18:04 boneill42

Nope, this is not added into the core. The yield from x syntax is not equivalent to for i in x: yield i, and have some performance repercussions.

http://stackoverflow.com/questions/17581332/converting-yield-from-statement-to-python-2-7-code

However this file is not required and the import is already covered by an ImportError or SyntaxError catch.

I think this just prints a warning once the package is installed, but doesn't prevent the install on any machine, is that right?

syrusakbary avatar Apr 26 '17 03:04 syrusakbary

No, I had it fail to install on a couple machines. I found it really difficult to replicate the issue, though, which is why I closed #19

LivInTheLookingGlass avatar Apr 26 '17 15:04 LivInTheLookingGlass

This may help:

https://pypi.python.org/pypi/yieldfrom/1.0.0

LivInTheLookingGlass avatar May 01 '17 13:05 LivInTheLookingGlass