Skip to content

Commit 9f77765

Browse files
hugovkezio-melotti
andauthored
Document style on naming env vars (#1300)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
1 parent 2308db4 commit 9f77765

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

developer-workflow/stdlib.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ useful.
5252

5353
Adding a new module
5454
-------------------
55+
5556
It must be stated upfront that getting a new module into the stdlib is very
5657
difficult. Adding any significant amount of code to the stdlib increases the
5758
burden placed upon core developers. It also means that the module somewhat
@@ -137,3 +138,17 @@ once the authors of the module sign
137138
:ref:`contributor agreements <contributor_agreement>`.
138139

139140
.. _issue tracker: https://github.com/python/cpython/issues
141+
142+
Adding a new environment variable
143+
---------------------------------
144+
145+
Names of environment variables should be uppercase and, from Python 3.13
146+
onwards, use underscores for readability and accessibility.
147+
148+
For example, use ``PYTHON_CPU_COUNT`` instead of ``PYTHONCPUCOUNT``.
149+
150+
See also:
151+
152+
* :ref:`python:using-on-envvars`
153+
* `"Change environment variable style" Discourse discussion
154+
<https://discuss.python.org/t/change-environment-variable-style/35180>`__

0 commit comments

Comments
 (0)