Suppress prompt spawned by subprocess when using pythonw
On Windows, using pythonw.exe for GUI applications, while determining the release using Git via subprocess a command prompt window is temporarily visible.
This fix updates the subprocess STARTUPINFO dwFlags to use the wShowWindow attribute, which defaults to SW_HIDE hiding the prompt.
This pull request has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Here's a one-liner to invoke the subprocess call with pythonw to test for the prompt popup:
pythonw -c 'import sentry_sdk; sentry_sdk.utils.get_default_release()'
Tested on Windows 11, in Windows Terminal, with Git Bash and Command Prompt. (The subprocess popup emitted within a Bash shell is persistent and easier to verify.)
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
I know it has been years @collinbanko but if you bring your branch up to date with our new master and resolve the conflict, than I will merge it immediately! promised!
Oh, nevermind @collinbanko , I figured out how to create a PR that has no conflicts and still has your commits in it: https://github.com/getsentry/sentry-python/pull/2936 Will merge the other one in favor of this one.
Thanks again for the contribution and sorry for the long time it took. Will close this PR and merge the other one.
Thank you for getting this merged in @antonpirker! Better late than never 😄