-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ResourceWarning on env's setup #2472
Comments
PR welcome. |
Seems no longer an issue as no one reported it in 1.5 years. |
I just reproduced this issue with OP's command. Python 3.10.6 virtualenv 20.24.2 Ubuntu 22.04
|
Thanks for reopening. This is caused directly by the periodic update feature, as the process that is being opened is never stopped (?) It is not a problem if setting |
From my (user's) perspective this feature should be opt-in, not opt-out. But that's probably difficult to change at this point. What would be the best way to go about fixing this? This is the relevant code. virtualenv/src/virtualenv/seed/wheels/periodic_update.py Lines 202 to 232 in 119c63e
|
https://discuss.python.org/t/how-should-virtualenv-behave-respective-of-seed-packages-e-g-pip-by-default/4146/18 this was a widely contested topic, with no clear winner, so this was the compromise.
Up to whoever creates the PR 😊 as long as does the same outcome and fixes the warning I'm happy. |
I believe this should be as simple as calling The fact that setting "Note that most subprocess code examples don't do this, because they tend to use Popen.communicate(), which closes the file handles for you." |
I think this can be closed. |
Issue
There are
ResourceWarning
s on virtual env creation.Environment
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
The text was updated successfully, but these errors were encountered: