-
Notifications
You must be signed in to change notification settings - Fork 47
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
Avoid triggering the DeprecationWarning on os.fork #429
base: master
Are you sure you want to change the base?
Conversation
Since we dropped Python 3.7 support, there is probably a lot of compat code that can be simplified in the resource tracker and the posix popen modules (and maybe the win32 module as well). |
Some of the last commits above can be reverted to use #435 instead. |
This should be ready for review @jeremiedbb @tomMoral @lesteve @ryandvmartin @sam-s. |
The EDIT: done in joblib/joblib#1683. |
else: | ||
passfds = sorted(passfds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lack of coverage is a false negative. This branch is actually executed when running the resource manager on Windows (to track temporary folders) but we properly do not configure coverage tracking in the resource manager process our our CI.
is_rng = name == "n/dev/urandom" | ||
|
||
# Not sure if this really expected to be open or not... | ||
is_dev_null = name == "n/dev/null" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% sure why this is needed with the new code, and it wasn't before, but keeping an open fd on /dev/null
sounds harmless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, when editing the assertion below, I checked that there was only one open fd to /dev/null
and not thousands.
Fixes #424, #420.
I added some non-regression tests for each problem and checked they failed on
main
with Python 3.13.