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 — GH-100479: Fix pathlib test failure on WASI by barneygale · Pull Request #104215 · python/cpython

Conversation

@barneygale

@barneygale barneygale commented May 5, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Support for sharing state between pathlib subclasses #100479

Sorry, something went wrong.

Uh oh!

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

All reactions
@barneygale
pythonGH-100479: Fix pathlib test failure on WASI
3c74650
@barneygale barneygale added skip issue skip news topic-pathlib labels May 5, 2023
@barneygale
barneygale requested a review from ericsnowcurrently May 5, 2023 21:23
@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting core review labels May 5, 2023
@barneygale barneygale removed the skip issue label May 5, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 5, 2023
Support for sharing state between pathlib subclasses #100479
Closed
ericsnowcurrently
ericsnowcurrently reviewed May 5, 2023
View reviewed changes
Comment thread Lib/test/test_pathlib.py
self.assertEqual(42, p.absolute().session_id)
self.assertEqual(42, p.resolve().session_id)
self.assertEqual(42, p.with_segments('~').expanduser().session_id)
if not is_wasi: # WASI has no user accounts.

@ericsnowcurrently ericsnowcurrently May 5, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I know very little about this module or how the tests are usually done. That said, it looks like all the other uses of is_wasi in this file relate to skipping the whole test, rather than a part of it. Personally, I have no relevant opinion on if your change is okay. 😄 (My irrelevant opinion is that, generally, the behavior of a test should not change based on some environmental condition.)

(Also, FYI, I pointed out the failing buildbot earlier because the first failure happened when a change of mine was merged. That's when I noticed it was probably the pathlib change. Otherwise I don't have any particular interest and probably would not have noticed. 😄)

Sorry, something went wrong.

Uh oh!

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

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

@AlexWaygood AlexWaygood May 7, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Eric -- if it's just a specific part of this test that fails on WASI, best to separate it out into a separate test method that's decorated with @skipIf(is_wasi, "WASI has no user accounts")

Sorry, something went wrong.

Uh oh!

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

All reactions

@barneygale barneygale May 7, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree in principle, but this style of tweaking test behaviour slightly based on what the system supports is pervasive throughout test_pathlib.py. For example, a few lines below we have:

        if os_helper.can_symlink():
            self.assertEqual(42, (p / 'linkA').readlink().session_id)

Is there something to be said for using a consistent approach, even if it's imperfect?

(I don't feel strongly about this, just thought I'd point it out!)

Sorry, something went wrong.

Uh oh!

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

All reactions

@AlexWaygood AlexWaygood May 7, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I don't like it, and I'd love to see a PR cleaning all those up ;)

But I guess consistency wins the day for now!

Sorry, something went wrong.

Uh oh!

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

ericsnowcurrently reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@AlexWaygood

AlexWaygood commented May 7, 2023

Copy link
Copy Markdown
Member

!buildbot .wasm.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented May 7, 2023

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @AlexWaygood for commit 3c74650 🤖

The command will test the builders whose names match following regular expression: .*wasm.*

The builders matched are:

  • wasm32-wasi PR
  • wasm32-emscripten browser (dynamic linking, no tests) PR
  • wasm32-emscripten node (dynamic linking) PR
  • wasm32-emscripten node (pthreads) PR
All reactions

Sorry, something went wrong.

Uh oh!

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

AlexWaygood
AlexWaygood approved these changes May 7, 2023
View reviewed changes

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, providing the buildbots pass!

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 7, 2023
@AlexWaygood
AlexWaygood merged commit 60f5884 into python:main May 7, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 7, 2023
jbower-fb pushed a commit to jbower-fb/cpython that referenced this pull request May 8, 2023
@barneygale @jbower-fb
pythonGH-100479: Fix pathlib test failure on WASI (python#104215)
f06a11c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently ericsnowcurrently left review comments
@AlexWaygood AlexWaygood AlexWaygood approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir topic-pathlib

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.

4 participants

@barneygale @AlexWaygood @bedevere-bot @ericsnowcurrently
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.