GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-40280: Change subprocess imports for cleaner error on wasm32 (GH-30620) by tiran · Pull Request #30620 · python/cpython

Conversation

@tiran

@tiran tiran commented Jan 16, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

https://bugs.python.org/issue40280

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tiran
bpo-40280: Change subprocess imports for cleaner error on wasm32-emsc…
ac634d9
…ripten
@tiran
tiran requested a review from gpshead as a code owner January 16, 2022 13:09
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jan 16, 2022
@bedevere-bot bedevere-bot added the awaiting core review label Jan 16, 2022
@tiran
Reformat blurb
a11e6d8
gpshead
gpshead approved these changes Jan 17, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jan 17, 2022
@tiran tiran changed the title bpo-40280: Change subprocess imports for cleaner error on wasm32 bpo-40280: Change subprocess imports for cleaner error on wasm32 (GH-30620) Jan 17, 2022
@tiran
tiran merged commit 7f4b69b into python:main Jan 17, 2022
@tiran
tiran deleted the bpo-40280-subprocess-import branch January 17, 2022 06:23
@bedevere-bot bedevere-bot removed the awaiting merge label Jan 17, 2022
@markshannon

markshannon commented Jan 17, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Why was this merged with a failing check?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran

tiran commented Jan 17, 2022

Copy link
Copy Markdown
Member Author

Why was this merged with a failing check?

The failing test it unrelated to my PR. Victor reverted the commit that caused the test regression in GH-30632.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon

markshannon commented Jan 17, 2022

Copy link
Copy Markdown
Member

The failing test it unrelated to my PR. Victor reverted the commit that caused the test regression in GH-30632.

I'd recommend always saying why you are merging if a check is failing, it helps narrow down the failure when looking at the merge history.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zware

zware commented Jan 17, 2022

Copy link
Copy Markdown
Member

I'll note that the last change here (GH-9053) specifically moved away from doing imports based on sys.platform == 'win32', so it's a bit disappointing to see that come back :)

gpshead reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gpshead

gpshead commented Jan 17, 2022

Copy link
Copy Markdown
Member

Yeah, based on Zach's older PR and issue that resolved this should probably be reworked to a different approach.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran

tiran commented Jan 17, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Yeah, based on Zach's older PR and issue that resolved this should probably be reworked to a different approach.

The old approach gave a confusing exception when neither msvcrt nor _posixsubprocess is available. Should I revert my change until we have a better solution?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zware

zware commented Jan 26, 2022

Copy link
Copy Markdown
Member

I won't push for a revert yet, but I also wouldn't like to see this version in a final release.

I'm afraid there's not a perfect solution here: the behavior should be based on what can be imported, which means at least one platform is going to have to raise and handle a ModuleNotFoundError. We could go a little crazy and guess at which imports should be tried first based on sys.platform (or 'msvcrt' in sys.builtin_module_names?), but I'm not sure how much effort it's worth to avoid the exception.

What was the exception when both are missing, and how was it confusing?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran

tiran commented Jan 26, 2022

Copy link
Copy Markdown
Member Author

The exception was confusing because it was a nested exception that referred to msvcrt as primary cause of an import error.

How do you like #30930 ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zware zware mentioned this pull request Jan 26, 2022
bpo-40280: Use presence of msvcrt module to detect Windows #30930
Merged
@SimonBiggs SimonBiggs mannequin mentioned this pull request Jun 7, 2022
Consider supporting emscripten/webassembly as a build target #84461
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead gpshead approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@tiran @markshannon @zware @gpshead @the-knights-who-say-ni @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.