I have just started trying Disco with Python 3 and also found that the persistent_hash definition seems wrong.
It broke for the examples/util/estimate_pi because it was trying to use str_to_bytes on an int and found it had not "encode" attribute.
It seems to me the correct fix is to simply use the built in 'hash' function in the same way that the Python 2 version does.
I'm not clear why it was switched to using an md5 hash?