Support utf8 mode
Closed this issue · 4 comments
Our code requires utf8 mode, as desribed in https://www.python.org/dev/peps/pep-0540/
I tried to benchmark it with pyperf, but pyperf causes that utf8 mode is not set.
I tried to add PYTHONUTF8
env var, but it still did not help.
Then I found env vars are srtripped, so I added --inherit-environ=PYTHONUTF8
.
It would be much easier if PYTHONUTF8
env var was inherited by default. What do you think about it?
pyperf removes most env vars to make benchmarks more reproducible between two machines. If you want to opt-in for the Python UTF-8 Mode on purpose, IMO it's good that pyperf forces you to declare it. Otherwise, you may get a different performance on two machines without knowning it.
But @corona10, @pablogsal or @sir-sigurd may have a different opinion ;-)
Maybe pyperf could get a more generic command line option to blindly copy all env vars, like "--copy-env-vars".
But @corona10, @pablogsal or @sir-sigurd may have a different opinion ;-)
I am of the same opinion :)
I am of the same opinion too ;)
If someone wants a new "--copy-env-vars" option, feel free to write a PR for that, I will review it.