bpo-41718: subprocess imports grp and pwd on demand by vstinner · Pull Request #24987 · python/cpython
Conversation
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.
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.
@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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters