Tarballs of 3.3.2 (and all previous versions tested by me) do not contain any *.py[co] files. Tarballs of 3.3.3 contain 1 .pyc file, which is even generated for wrong Python version: $ find -name "*.py[co]" ./Tools/hg/hgtouch.pyc $ file Tools/hg/hgtouch.pycTools/hg/hgtouch.pyc: python 2.7 byte-compiled Please ensure that this problem will not occur with future tarballs.
Your fix won't work, because release managers call hgtouch from a different spot, from a private tool called "release.py". You'll notice that all the 3.4 releases have that hgtouch.pyc file--up until 3.4b2. I already found that bug. I added "Tools/hg/hgtouch.pyc" to the tuple of "files we don't want in tarballs" in export() in release.py. Didn't push it because I was doing other hacking and it wasn't ready, but I could push just that change.
When Mercurial is ported to Python 3 somewhen in the future, then e.g. Tools/hg/__pycache__/hgtouch.cpython-34.pyc could be generated, so PYTHONDONTWRITEBYTECODE=1 might still be useful in release.py.
The construction of release.py would make it easy to just always pass it in when running Python (and hg, and any program). Maybe that's a better choice.