Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/changelog/2629.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Pass through ``NUMBER_OF_PROCESSORS`` on Windows as is needed for ``multiprocessing.cpu_count`` -
by :user:`gaborbernat`.
1 change: 1 addition & 0 deletions src/tox/tox_env/python/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def _default_pass_env(self) -> list[str]:
"SYSTEMROOT", # needed for python's crypto module
"COMSPEC", # needed for distutils cygwin compiler
"PROCESSOR_ARCHITECTURE", # platform.machine()
"NUMBER_OF_PROCESSORS", # multiprocessing.cpu_count()
],
)
env.extend(["REQUESTS_CA_BUNDLE"])
Expand Down
2 changes: 1 addition & 1 deletion tests/session/cmd/test_show_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_pass_env_config_default(tox_project: ToxProjectCreator, stdout_is_atty:
expected = (
(["COMSPEC"] if is_win else [])
+ ["CURL_CA_BUNDLE", "LANG", "LANGUAGE", "LD_LIBRARY_PATH"]
+ (["MSYSTEM", "PATHEXT"] if is_win else [])
+ (["MSYSTEM", "NUMBER_OF_PROCESSORS", "PATHEXT"] if is_win else [])
+ ["PIP_*"]
+ (["PROCESSOR_ARCHITECTURE"] if is_win else [])
+ (["PROGRAMDATA"] if is_win else [])
Expand Down