python 3 compatibility for workers