D7550: chg: fix chg to work with py3.7+ "coercing" the locale

2019-12-12 Thread spectral (Kyle Lippincott)
Closed by commit rHG5e0f6451e2d2: chg: fix chg to work with py3.7+ coercing the locale (authored by spectral). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". CHANGED PRIOR TO COMMIT

D7550: chg: fix chg to work with py3.7+ "coercing" the locale

2019-12-12 Thread yuja (Yuya Nishihara)
yuja added a comment. > > Sigh. Can we work around this weird behavior by making chg do > > `putenv("PYTHONCOERCECLOCALE=0")`? I think it's simple and more desired > > behavior than the default of Python 3. > I had considered that and was concerned it would create an observable,

Re: D7550: chg: fix chg to work with py3.7+ "coercing" the locale

2019-12-12 Thread Yuya Nishihara
> > Sigh. Can we work around this weird behavior by making chg do > > `putenv("PYTHONCOERCECLOCALE=0")`? I think it's simple and more desired > > behavior than the default of Python 3. > > I had considered that and was concerned it would create an observable, > surprising/confusing

D7550: chg: fix chg to work with py3.7+ "coercing" the locale

2019-12-11 Thread spectral (Kyle Lippincott)
spectral added a comment. In D7550#111235 , @yuja wrote: >> When the environment is empty (specifically: it doesn't contain LC_ALL, >> LC_CTYPE, or LANG), Python will "coerce" the locale environment variables to be >> a UTF-8 capable

D7550: chg: fix chg to work with py3.7+ "coercing" the locale

2019-12-06 Thread yuja (Yuya Nishihara)
yuja added a comment. > When the environment is empty (specifically: it doesn't contain LC_ALL, > LC_CTYPE, or LANG), Python will "coerce" the locale environment variables to be > a UTF-8 capable one. It sets LC_CTYPE in the environment, and this breaks chg, > since chg

Re: D7550: chg: fix chg to work with py3.7+ "coercing" the locale

2019-12-06 Thread Yuya Nishihara
> When the environment is empty (specifically: it doesn't contain LC_ALL, > LC_CTYPE, or LANG), Python will "coerce" the locale environment variables > to be > a UTF-8 capable one. It sets LC_CTYPE in the environment, and this breaks > chg, > since chg operates by: > > - start hg,

D7550: chg: fix chg to work with py3.7+ "coercing" the locale

2019-12-05 Thread spectral (Kyle Lippincott)
spectral created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY When the environment is empty (specifically: it doesn't contain LC_ALL, LC_CTYPE, or LANG), Python will "coerce" the locale environment variables to