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

Tox 4.0 - py2.7 env - 'cannot determine number of cpus' (os.environ['NUMBER_OF_PROCESSORS'] missing) #2629

Closed
matthuisman opened this issue Dec 8, 2022 · 3 comments
Labels
bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.

Comments

@matthuisman
Copy link

matthuisman commented Dec 8, 2022

Python 3.7.9 on Windows x64
Running unittests in py3.5, 3.7 and 2.7

2.7 fails when using multiprocessing.cpu_count()
Due to os.environ['NUMBER_OF_PROCESSORS'] missing from environment

If I run directly in the python2.7 in Windows, above works fine so seems related to new tox 4.0 as was working on 3.X

@gaborbernat gaborbernat added this to the 4.0.x milestone Dec 8, 2022
@gaborbernat
Copy link
Member

Please put in a PR with a passing CI where we pass through this env-var here https://github.com/tox-dev/tox/blob/main/src/tox/tox_env/python/api.py#L99 note you'll need to amend the test here https://github.com/tox-dev/tox/blob/main/tests/session/cmd/test_show_config.py#L101

@gaborbernat gaborbernat added bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. labels Dec 8, 2022
@gaborbernat
Copy link
Member

Resolved by #2647

@matthuisman
Copy link
Author

Thanks for the quick fix and release!
Much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Projects
None yet
Development

No branches or pull requests

2 participants