Skip to content

GH-128520: pathlib ABCs: validate magic_open() arguments - #131617

Merged
barneygale merged 1 commit into
python:mainfrom
barneygale:magic-open-errors
Mar 24, 2025
Merged

GH-128520: pathlib ABCs: validate magic_open() arguments#131617
barneygale merged 1 commit into
python:mainfrom
barneygale:magic-open-errors

Conversation

@barneygale

@barneygalebarneygale commented Mar 23, 2025

Copy link
Copy Markdown
Contributor

When pathlib._os.magic_open() is called to open a path in binary mode, raise ValueError if any of the encoding, errors or newline arguments are given. This matches the open() built-in.

When `pathlib._os.magic_open()` is called to open a path in binary mode,
raise `ValueError` if any of the *encoding*, *errors* or *newline*
arguments are given. This matches the `open()` built-in.
@barneygale
barneygale merged commit d716ea3 into python:mainMar 24, 2025
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 1, 2025
…hon#131617)
When `pathlib._os.magic_open()` is called to open a path in binary mode,
raise `ValueError` if any of the *encoding*, *errors* or *newline*
arguments are given. This matches the `open()` built-in.
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