Skip to content

GH-78988: Document pathlib.Path.glob() exception propagation.#114036

Merged
barneygale merged 2 commits into
python:mainfrom
barneygale:gh-78988
Jan 16, 2024
Merged

GH-78988: Document pathlib.Path.glob() exception propagation.#114036
barneygale merged 2 commits into
python:mainfrom
barneygale:gh-78988

Conversation

@barneygale

@barneygale barneygale commented Jan 13, 2024

Copy link
Copy Markdown
Contributor

We propagate any OSError from the is_dir() call on the top-level directory, and suppress all others.

We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably doesn't need a NEWS, though it also doesn't hurt!

A

@barneygale

Copy link
Copy Markdown
Contributor Author

Thank you Adam

@barneygale
barneygale merged commit 7092b3f into python:main Jan 16, 2024
@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

Sorry, @barneygale, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 7092b3f1319269accf4c02f08256d51f111b9ca3 3.12

barneygale added a commit to barneygale/cpython that referenced this pull request Jan 16, 2024
…python#114036)

We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.

(cherry picked from commit 7092b3f)
barneygale added a commit to barneygale/cpython that referenced this pull request Jan 16, 2024
…gation. (pythonGH-114036)

We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others..
(cherry picked from commit 7092b3f)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
@bedevere-app

bedevere-app Bot commented Jan 16, 2024

Copy link
Copy Markdown

GH-114154 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jan 16, 2024
barneygale added a commit that referenced this pull request Jan 16, 2024
GH-114036) (#114154)

We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.

(cherry picked from commit 7092b3f)
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
…python#114036)

We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…python#114036)

We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…python#114036)

We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news topic-pathlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants