Skip to content

GH-128520: pathlib ABCs: reject empty pattern in ReadablePath.glob() - #127343

Merged
barneygale merged 2 commits into
python:mainfrom
barneygale:pathlib-abc-glob-empty-pattern
Mar 24, 2025
Merged

GH-128520: pathlib ABCs: reject empty pattern in ReadablePath.glob()#127343
barneygale merged 2 commits into
python:mainfrom
barneygale:pathlib-abc-glob-empty-pattern

Conversation

@barneygale

@barneygalebarneygale commented Nov 27, 2024

Copy link
Copy Markdown
Contributor

For compatibility with Path.glob(), raise ValueError if an empty pattern is given to ReadablePath.glob().

No user-facing changes.

For compatibility with `Path.glob()`, raise `ValueError` if an empty
pattern is given to `PathBase.glob()`.
@barneygalebarneygale changed the title pathlib ABCs: reject empty pattern in PathBase.glob()pathlib ABCs: reject empty pattern in ReadablePath.glob()Mar 23, 2025
@barneygalebarneygale changed the title pathlib ABCs: reject empty pattern in ReadablePath.glob()GH-128520: pathlib ABCs: reject empty pattern in ReadablePath.glob()Mar 23, 2025
@barneygale
barneygale merged commit fbfb0e1 into python:mainMar 24, 2025
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 1, 2025
…glob()` (python#127343)
For compatibility with `Path.glob()`, raise `ValueError` if an empty
pattern is given to `ReadablePath.glob()`.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@barneygale