aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorAlex Willmer <alex@moreati.org.uk>2025-01-26 19:00:28 +0000
committerGitHub <noreply@github.com>2025-01-26 19:00:28 +0000
commita8dc6d6d44a141a8f839deb248a02148dcfb509e (patch)
tree4a343bb77494d85a5fc7f969ed0d8b8cd248d0de /Python/generated_cases.c.h
parent914c232e9391e8e5014b089ba12c75d4a3b0cc7f (diff)
downloadcpython-a8dc6d6d44a141a8f839deb248a02148dcfb509e.tar.gz
cpython-a8dc6d6d44a141a8f839deb248a02148dcfb509e.zip
gh-115911: Ignore PermissionError during import from cwd (#116131)
Ignore PermissionError when checking cwd during import On macOS `getcwd(3)` can return EACCES if a path component isn't readable, resulting in PermissionError. `PathFinder.find_spec()` now catches these and ignores them - the same treatment as a missing/deleted cwd. Introduces `test.support.os_helper.save_mode(path, ...)`, a context manager that restores the mode of a path on exit. This is allows finer control of exception handling and robust environment restoration across platforms in `FinderTests.test_permission_error_cwd()`. Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Brett Cannon <brett@python.org>
Diffstat (limited to 'Python/generated_cases.c.h')
0 files changed, 0 insertions, 0 deletions