startover / pythonfutures

Automatically exported from code.google.com/p/pythonfutures
Other
0 stars 0 forks source link

Python 2.5 compatibility #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
According to PyPI it should be compatible with Python 2.5, but there is an 
issue with `notify_all`. It should be notifyAll on Python 2.5.

Original issue reported on code.google.com by marc.sch...@gmail.com on 9 Apr 2013 at 1:08

GoogleCodeExporter commented 9 years ago
To stay compatible with Python 3.0 and 3.1 you can do:

if sys.version_info < (2, 6):
    setattr(threading._Condition, 'notify_all', threading._Condition.notifyAll)

Original comment by marc.sch...@gmail.com on 9 Apr 2013 at 1:13