syrusakbary/promise

Python 2.7 issue

MagnusSjoberg opened this issue · 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?

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

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?

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