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-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006) by tiran · Pull Request #96006 · python/cpython

Conversation

@tiran

@tiran tiran commented Aug 15, 2022 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • On WASI ENOTCAPABLE is now mapped to PermissionError.
  • The errno modules exposes the new error number.
  • getpath.py now ignores PermissionError when it cannot open landmark
    files pybuilddir.txt and pyenv.cfg.
  • Issue: [WASI] getpath.py does not handle "Capabilities insufficient" (ENOTCAPABLE) #96005

Sorry, something went wrong.

Uh oh!

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

All reactions
@tiran
pythongh-96005: Handle WASI ENOTCAPABLE in getpath
86c6042
- On WASI `ENOTCAPABLE` is now mapped to `PermissionError`.
- The `errno` modules exposes the new error number.
- `getpath.py` now ignores `PermissionError` when it cannot open landmark
  files `pybuilddir.txt` and `pyenv.cfg`.
@bedevere-bot bedevere-bot added the awaiting core review label Aug 15, 2022
zooba
zooba approved these changes Aug 15, 2022
View reviewed changes

@zooba zooba 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.

LGTM

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 Aug 15, 2022
@tiran
tiran marked this pull request as ready for review August 15, 2022 19:48
@tiran
tiran requested a review from iritkatriel as a code owner August 15, 2022 19:48
@tiran
tiran requested a review from pablogsal August 16, 2022 13:29
@tiran

tiran commented Aug 16, 2022

Copy link
Copy Markdown
Member Author

@pablogsal RM, is this an acceptable change for 3.11.0, should I delay it for 3.11.1, or only apply it to 3.12?

All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal

pablogsal commented Aug 16, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

@pablogsal RM, is this an acceptable change for 3.11.0, should I delay it for 3.11.1, or only apply it to 3.12?

This is likely too big for 3.11.0 :( are you ok delaying this to 3.11.1?

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

@tiran

tiran commented Aug 16, 2022

Copy link
Copy Markdown
Member Author

This is likely too big for 3.11.0 :( are you ok delaying this to 3.11.1?

Sure, no problem! I'll update the docs.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tiran
Defer ENOTCAPABLE to 3.11.1
894399b
@tiran tiran changed the title gh-96005: Handle WASI ENOTCAPABLE in getpath gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006) Aug 16, 2022
@tiran
tiran merged commit 48174fa into python:main Aug 16, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Aug 16, 2022
@tiran
tiran deleted the gh-96005-wasi-enotcapable branch August 16, 2022 18:20
@tiran tiran added the needs backport to 3.11 only security fixes label Aug 16, 2022
@miss-islington

miss-islington commented Aug 16, 2022

Copy link
Copy Markdown
Contributor

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 16, 2022
@tiran @miss-islington
pythongh-96005: Handle WASI ENOTCAPABLE in getpath (pythonGH-96006)
d4ff6ff
- On WASI `ENOTCAPABLE` is now mapped to `PermissionError`.
- The `errno` modules exposes the new error number.
- `getpath.py` now ignores `PermissionError` when it cannot open landmark
  files `pybuilddir.txt` and `pyenv.cfg`.
(cherry picked from commit 48174fa)

Co-authored-by: Christian Heimes <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 16, 2022
@bedevere-bot

bedevere-bot commented Aug 16, 2022

Copy link
Copy Markdown

GH-96032 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Aug 16, 2022

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD Non-Debug 3.x has failed when building commit 48174fa.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/172/builds/2715) and take a look at the build logs.
  4. Check if the failure is related to this commit (48174fa) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/172/builds/2715

Failed tests:

  • test_exception_hierarchy

Failed subtests:

  • test_errno_mapping - test.test_exception_hierarchy.HierarchyTest.test_errno_mapping

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

415 tests OK.

10 slowest tests:

  • test_multiprocessing_spawn: 4 min 27 sec
  • test_concurrent_futures: 3 min 15 sec
  • test_asyncio: 2 min 49 sec
  • test_unparse: 2 min 24 sec
  • test_tokenize: 1 min 58 sec
  • test_multiprocessing_forkserver: 1 min 53 sec
  • test_venv: 1 min 48 sec
  • test_multiprocessing_fork: 1 min 43 sec
  • test_capi: 1 min 36 sec
  • test_gdb: 1 min 21 sec

1 test failed:
test_exception_hierarchy

19 tests skipped:
test_dbm_gnu test_devpoll test_epoll test_idle test_ioctl
test_launcher test_msilib test_spwd test_startfile test_tcl
test_tix test_tkinter test_ttk test_ttk_textonly test_turtle
test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
test_exception_hierarchy

Total duration: 15 min 56 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/test/test_exception_hierarchy.py", line 94, in test_errno_mapping
    self.assertIs(type(e), OSError)
AssertionError: <class 'PermissionError'> is not <class 'OSError'>
All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal

pablogsal commented Aug 16, 2022

Copy link
Copy Markdown
Member

@tiran That looks like a genuine failure

All reactions

Sorry, something went wrong.

Uh oh!

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

@tiran

tiran commented Aug 16, 2022

Copy link
Copy Markdown
Member Author

Will investigate later

All reactions

Sorry, something went wrong.

Uh oh!

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

@encukou encukou mentioned this pull request Aug 17, 2022
gh-95991: Add some infrastructure for testing Limited API in _testcapi #95992
Merged
tiran added a commit that referenced this pull request Sep 13, 2022
@tiran
[3.11] gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006) (GH-96034
bc337a7
) (GH-96038)

- On WASI `ENOTCAPABLE` is now mapped to `PermissionError`.
- The `errno` modules exposes the new error number.
- `getpath.py` now ignores `PermissionError` when it cannot open landmark
  files `pybuilddir.txt` and `pyenv.cfg`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zooba zooba zooba approved these changes
@iritkatriel iritkatriel Awaiting requested review from iritkatriel iritkatriel is a code owner
@pablogsal pablogsal Awaiting requested review from pablogsal

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.

5 participants

@tiran @pablogsal @miss-islington @bedevere-bot @zooba
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.