Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass through LANG environment variable by default #247

Closed
pytoxbot opened this issue Sep 17, 2016 · 6 comments
Closed

Pass through LANG environment variable by default #247

pytoxbot opened this issue Sep 17, 2016 · 6 comments

Comments

@pytoxbot
Copy link

This renders io.open() and py3 open() pretty useless without it on linux at least (as they will use ASCII instead of the platform's default encoding)

@pytoxbot
Copy link
Author

Original comment by @hpk42

tox-2.0.2 adds LANG to the default set (just released).

@pytoxbot
Copy link
Author

Original comment by @msabramo

Along a similar line to @aconrad (we work at the same company), I also took a stab though I did it by adding a --passenv command-line option so that folks can decide on their own what environment variables should be passed, and do so without changing tox.ini.

https://bitbucket.org/hpk42/tox/pull-request/162/add-passenv-cli-option/diff

@pytoxbot
Copy link
Author

Original comment by @aconrad

I submitted a pull request here to get the conversation started. https://bitbucket.org/hpk42/tox/pull-request/161/pass-lang-variable-to-the-test-environment/diff

@pytoxbot
Copy link
Author

Original comment by @aconrad

Yes please! All my tox projects started failing with Python 3 because the LANG environment variable is no longer passed.

Also this makes projects using Click under Python 3 unusable.

https://github.com/mitsuhiko/click/blob/0d9731e97c9af9e5b0f5fd8421aeb0184ad42b70/click/core.py#L577-L589

@pytoxbot
Copy link
Author

Original comment by @homeworkprod

I stumbled across this as well.

A package (Arrow, in my case; see arrow-py/arrow#224 for my bug report against the project) won't install on my CI because tox doesn't pass LANG along to pip.

Explicitly specifying environment variables in the tox configuration file seems to be a workaround, but I'd prefer to be able to change the locale tox (and its subprocesses) uses right from the command line.

@pytoxbot
Copy link
Author

Original comment by @asottile

Hitting this here: ekalinin/nodeenv#123
and here: https://travis-ci.org/asottile/css-explore/builds/62762790

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant