Skip to content

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

Merged
vstinner merged 1 commit intopython:masterfrom
vstinner:grp_pwd
Mar 23, 2021
Merged

bpo-41718: subprocess imports grp and pwd on demand#24987
vstinner merged 1 commit intopython:masterfrom
vstinner:grp_pwd

Conversation

@vstinner
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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