# HG changeset patch # User Steve Losh # Date 1603762398 14400 # Node ID 72dc9b82f97dd977b6ed505eb928caf8a1231d36 # Parent 3d27b0ac36f1cd84495394791dc1362c6dbee7cf Update diff -r 3d27b0ac36f1 -r 72dc9b82f97d README.markdown --- a/README.markdown Thu Oct 22 01:04:43 2020 -0400 +++ b/README.markdown Mon Oct 26 21:33:18 2020 -0400 @@ -1528,3 +1528,21 @@ Dropbox on this machine since Dropbox is a pile of garbage now. Maybe it's time to shave that yak and set up some kind of `rsync` based syncing solution for the bulk of my files. + +## 2020-10-26 + +Finally got around to merging some `hg-prompt` patches. They add Python +3 compatibility, but break Python 2 compatibility because it used `bytes(foo, +'utf-8')` which breaks with an inscrutable error in Python 2: + + Python 2.7.17 (default, Sep 30 2020, 13:38:04) + [GCC 7.5.0] on linux2 + Type "help", "copyright", "credits" or "license" for more information. + >>> bytes('foo', 'utf-8') + Traceback (most recent call last): + File "", line 1, in + TypeError: str() takes at most 1 argument (2 given) + +I'm calling `bytes`, not `str`, what the fuck are you talking about, Python? +Eventually I found `bytes(foo.encode('utf-8'))` which will work in both. I'm +glad I don't use this language any more.