Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress prompt spawned by subprocess when using pythonw #1079

Closed

Conversation

collinbanko
Copy link
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

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
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
Copy link

getsantry bot commented Oct 18, 2023

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
Member

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
Member

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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants