
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2018-07-04 14:55 byxflr6, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 8090 | merged | vstinner,2018-07-04 15:16 | |
| PR 8120 | closed | miss-islington,2018-07-05 20:54 | |
| PR 8121 | merged | vstinner,2018-07-05 20:59 | |
| Messages (5) | |||
|---|---|---|---|
| msg321047 -(view) | Author: Sebastian Bank (xflr6) | Date: 2018-07-04 14:55 | |
AFAIU, the change forhttps://bugs.python.org/issue19764 broke the following usage of subprocess on Windows (re-using a subprocess.STARTUPINFO instance to hide the command window): import os, subprocess STARTUPINFO = subprocess.STARTUPINFO() STARTUPINFO.dwFlags |= subprocess.STARTF_USESHOWWINDOW STARTUPINFO.wShowWindow = subprocess.SW_HIDE # raises OSError: [WinError 87] # in the second loop iteration starting with Python 3.7 for i in range(2): print(i) with open(os.devnull, 'w') as stderr: subprocess.check_call(['attrib'], stderr=stderr, startupinfo=STARTUPINFO)AFAICT, this works on Python 2.7, 3.4, 3.5, and 3.6I think the documentation inhttps://docs.python.org/3/library/subprocess.html#windows-popen-helpersdoes not mention that every Popen call should be done with a fresh instance, so either the documentation needs to be changed, or the implementation (e.g. by deep-copying the instance).See alsohttps://bugs.python.org/issue19764#msg320784 | |||
| msg321131 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2018-07-05 20:54 | |
New changeset483422f57e5d8c8bf8820fec29fc9b96bb15d4ef by Victor Stinner in branch 'master':bpo-34044: subprocess.Popen copies startupinfo (GH-8090)https://github.com/python/cpython/commit/483422f57e5d8c8bf8820fec29fc9b96bb15d4ef | |||
| msg321132 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2018-07-05 21:15 | |
New changeset29be3bd3c9aed0190e60096a603120cacda82375 by Victor Stinner in branch '3.7':bpo-34044: subprocess.Popen copies startupinfo (GH-8090) (GH-8121)https://github.com/python/cpython/commit/29be3bd3c9aed0190e60096a603120cacda82375 | |||
| msg321133 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2018-07-05 21:20 | |
Sebastian Bank: Thank you for your bug report and your example! I used your example to write an unit test. I fixed the bug in 3.7 and master branches. The fix will be part of the future 3.7.1 release. | |||
| msg321138 -(view) | Author: Sebastian Bank (xflr6) | Date: 2018-07-05 22:27 | |
Perfect, thanks for the quick fix. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:02 | admin | set | github: 78225 |
| 2018-07-05 22:27:55 | xflr6 | set | messages: +msg321138 |
| 2018-07-05 21:20:00 | vstinner | set | status: open -> closed resolution: fixed messages: +msg321133 stage: patch review -> resolved |
| 2018-07-05 21:15:37 | vstinner | set | messages: +msg321132 |
| 2018-07-05 20:59:20 | vstinner | set | pull_requests: +pull_request7706 |
| 2018-07-05 20:54:47 | miss-islington | set | pull_requests: +pull_request7705 |
| 2018-07-05 20:54:22 | vstinner | set | messages: +msg321131 |
| 2018-07-04 15:17:05 | vstinner | set | versions: + Python 3.8 |
| 2018-07-04 15:16:56 | vstinner | set | keywords: +patch stage: patch review pull_requests: +pull_request7691 |
| 2018-07-04 14:55:46 | xflr6 | create | |