civisanalytics / civis-python

Civis API Python Client
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

fix futures for python 3.8 and enable python 3.8 builds #391

Closed mheilman closed 4 years ago

mheilman commented 4 years ago

closes #370

mheilman commented 4 years ago

I'm still not sure why some of the tests pass in 3.6 but not 3.8 (e.g., this one) without explicitly setting daemon=True so that polling threads don't keep the Python (or pytest) process from quitting.

From the threading.Thread docs:

Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created in the main thread default to daemon = False. The entire Python program exits when no alive non-daemon threads are left.

mheilman commented 4 years ago

After further consideration, I think it probably makes the most sense to just override set_result and set_exception. It might be annoying to keep those in sync, but the workarounds seem ugly.