Closed bsipocz closed 4 years ago
I ran into a SyntaxError
as well when trying to install pymc
with Python 3.7 (as a dependency for HDDM
), fixed with the following patch:
await is a keyword in Python 3.7+, so rename 'await' method to avoid SyntaxError
--- pymc-2.3.7/pymc/threadpool.py.orig 2020-03-19 17:48:14.572211381 +0100
+++ pymc-2.3.7/pymc/threadpool.py 2020-03-19 17:49:39.573111182 +0100
@@ -343,7 +343,7 @@
self.main_lock.release()
self.counter_lock.release()
- def await(self):
+ def waitforit(self):
self.main_lock.acquire()
self.main_lock.release()
@@ -384,7 +384,7 @@
exc_callback=eb,
args=args,
requestID=id(args)))
- done_lock.await()
+ done_lock.waitforit()
if exceptions:
six.reraise(*exceptions[0])
@boegel want to do a PR?
@twiecki I started looking into a PR, and noticed you've already fixed this in #193.
There's no release yet with this fix included though...
Thus https://github.com/pymc-devs/pymc/blob/master/pymc/threadpool.py#L346 causes a
SyntaxError
at the time of importing pymc.I suppose there is no plans to do another release here, but if it's a possibility I'm happy to open a PR to rename the method.