Skip to content

Conversation

@tiran
Copy link
Member

@tirantiran commented Aug 15, 2022

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

- 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`.
Copy link
Member

@zoobazooba left a comment

Choose a reason for hiding this comment

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

LGTM

@tirantiran marked this pull request as ready for review August 15, 2022 19:48
@tirantiran requested a review from pablogsalAugust 16, 2022 13:29
@tiran
Copy link
MemberAuthor

@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?

@pablogsal
Copy link
Member

pablogsal commented Aug 16, 2022

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

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.

@tirantiran changed the title gh-96005: Handle WASI ENOTCAPABLE in getpathgh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006)Aug 16, 2022
@tirantiran merged commit 48174fa into python:mainAug 16, 2022
@tirantiran deleted the gh-96005-wasi-enotcapable branch August 16, 2022 18:20
@tirantiran added the needs backport to 3.11 only security fixes label Aug 16, 2022
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 16, 2022
- 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-botbedevere-bot removed the needs backport to 3.11 only security fixes label Aug 16, 2022
@bedevere-bot
Copy link

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

@bedevere-bot
Copy link

⚠️⚠️⚠️ 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_mappingself.assertIs(type(e), OSError) AssertionError: <class 'PermissionError'> is not <class 'OSError'>

@pablogsal
Copy link
Member

@tiran That looks like a genuine failure

@tiran
Copy link
MemberAuthor

Will investigate later

tiran added a commit that referenced this pull request Sep 13, 2022
) (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 freeto 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.

5 participants

@tiran@pablogsal@miss-islington@bedevere-bot@zooba