Skip to content

Suppress prompt spawned by subprocess when using pythonw - #1079

Closed
collinbanko wants to merge 3 commits into
getsentry:masterfrom
blurstudio-forks:fix/subprocess-prompt
Closed

collinbanko wants to merge 3 commits into
getsentry:masterfrom
blurstudio-forks:fix/subprocess-prompt

Conversation

@collinbanko

Copy link
Copy Markdown
Contributor

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.

@collinbanko
collinbanko force-pushed the fix/subprocess-prompt branch from 0f82f69 to c7794ad Compare April 9, 2021 22:27
@collinbanko
collinbanko force-pushed the fix/subprocess-prompt branch from c7794ad to d3e0b9f Compare April 9, 2021 23:45
@github-actions

Copy link
Copy Markdown
Contributor

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 🥀

@collinbanko

Copy link
Copy Markdown
Contributor Author

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.)

@getsantry

getsantry Bot commented Oct 18, 2023

Copy link
Copy Markdown

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 🥀

@getsantry getsantry Bot added the Stale label Oct 18, 2023
@antonpirker

Copy link
Copy Markdown
Contributor

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!

@antonpirker

Copy link
Copy Markdown
Contributor

Oh, nevermind @collinbanko , I figured out how to create a PR that has no conflicts and still has your commits in it: #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.

@antonpirker antonpirker closed this Apr 4, 2024
@collinbanko

Copy link
Copy Markdown
Contributor Author

Thank you for getting this merged in @antonpirker! Better late than never 😄

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants