python/devguide

Document env var style

Closed this issue · 3 comments

In https://discuss.python.org/t/change-environment-variable-style/35180 we decided to use underscores in new environment variable names introduced in Python 3.13+.

For example, PYTHON_CPU_COUNT instead of PYTHONCPUCOUNT.

Let's document it somewhere in the devguide.

Please see PR #1300.

Are there any mechanisms in place to e.g. ignore the _s so that both PYTHON_CPU_COUNT and PYTHONCPUCOUNT work?

Inside Python? Maybe, but we'd need to decide what to do when both exist, with different values, which could be set by different groups. Who wins? See https://discuss.python.org/t/change-environment-variable-style/35180/7, and the Discourse thread is the place to discuss this :)