[PATCH 1 of 7] py3: have bytes version of os.getenv
yuya at tcha.org
Thu Dec 29 08:02:52 EST 2016
On Wed, 28 Dec 2016 17:55:08 -0500, Augie Fackler wrote:
> > On Dec 28, 2016, at 4:54 PM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
> > On 12/25/2016 09:01 AM, Yuya Nishihara wrote:
> >> On Thu, 22 Dec 2016 03:33:46 +0530, Pulkit Goyal wrote:
> >>> # HG changeset patch
> >>> # User Pulkit Goyal <7895pulkit at gmail.com>
> >>> # Date 1482095138 -19800
> >>> # Mon Dec 19 02:35:38 2016 +0530
> >>> # Node ID eee84d7c0647a50d4e9828b324e1e37214abd169
> >>> # Parent e995f00a9e9afda3734e7880df0fc90fd2197a88
> >>> py3: have bytes version of os.getenv
> >>> os.getenv() on python 3 deals with unicodes. If we want to pass bytes. we have
> >>> os.getenvb() which deals with bytes. This patch adds up a pycompat.osgetenv
> >>> which deals with bytes on both python 2 and 3.
> >> You know, os.getenvb() does not exist on Windows. I'd rather replace getenv()
> >> with environ.get() and ban the use of os.getenv() and .setenv().
> > So, that patch seems broken on windows, should we drop it?
> It’s only broken for windows-using-python3, so I’d rather we keep it in for now and revisit the problem once we have more things working with unix-using-python3.
I'm okay for either ways. Python3 stuff is far from production level, I guess
the python3 test wouldn't pass on Windows anyway.
More information about the Mercurial-devel