Skip to content

bpo-41718: subprocess imports grp and pwd on demand #24987

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

Merged
merged 1 commit into from
Mar 23, 2021
Merged

bpo-41718: subprocess imports grp and pwd on demand #24987

merged 1 commit into from
Mar 23, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 23, 2021

The shutil and subprocess modules now only import the grp and pwd
modules when they are needed, which is not the case by default in
subprocess.

https://bugs.python.org/issue41718

The shutil and subprocess modules now only import the grp and pwd
modules when they are needed, which is not the case by default in
subprocess.
@vstinner
Copy link
Member Author

@gpshead: Would you mind to review this change? Does it sound worth it to you?

I have no idea if this change has an impact on subprocess.Popen performance when the user/group options are used. An import should be efficient if it's already in sys.modules.

@vstinner vstinner merged commit d72e8d4 into python:master Mar 23, 2021
@vstinner vstinner deleted the grp_pwd branch March 23, 2021 16:42
@vstinner
Copy link
Member Author

Thanks for the review @gpshead ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants