Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 19:00:24 +0200] rev 40201
py3: sprinkle statprof.py with utf-8 encoding
Trying to chase the long tail of unicode badness in this file due to
frame / code objects holding str everywhere.
Differential Revision: https://phab.mercurial-scm.org/D5016
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 19:17:22 +0200] rev 40200
py3: flush stdout
This avoids buffering due to mixed print() and sys.stdout.write() by
profiling code.
And with this, test-profile.t passes on Python 3 \o/.
Honestly, I'd be shocked if there weren't more Python 3 encoding issues lingering
in the profiling code. That code isn't super high quality and doesn't seem to have
thorough test coverage.
Differential Revision: https://phab.mercurial-scm.org/D5018
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 19:07:12 +0200] rev 40199
py3: use raw strings in statprof.py
This allows main() and argument parsing to work.
Differential Revision: https://phab.mercurial-scm.org/D5017
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:51:10 +0200] rev 40198
py3: switch from print(..., file=) to write()
Because Python 3's print() doesn't like bytes.
Differential Revision: https://phab.mercurial-scm.org/D5015
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:40:32 +0200] rev 40197
py3: use %d in a few places
Differential Revision: https://phab.mercurial-scm.org/D5014
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:37:42 +0200] rev 40196
py3: use raw strings for stack names
These are used for simple compares. We don't need to normalize to bytes.
As part of this, I expanded a set literal so entries are 1 per line.
Differential Revision: https://phab.mercurial-scm.org/D5013
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:30:40 +0200] rev 40195
py3: use sysbytes for converting code attributes
Differential Revision: https://phab.mercurial-scm.org/D5012
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:26:10 +0200] rev 40194
py3: use write() instead of print()
Because print() expects str and we want to write bytes.
There should be no functional changes as part of this.
Differential Revision: https://phab.mercurial-scm.org/D5011