Skip to content

[pull] main from python:main#248

Merged
pull[bot] merged 3 commits into
tj-python:mainfrom
python:main
Sep 12, 2025
Merged

[pull] main from python:main#248
pull[bot] merged 3 commits into
tj-python:mainfrom
python:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Sep 12, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )


📚 Documentation preview 📚: https://cpython-previews--248.org.readthedocs.build/

wiomoc and others added 3 commits September 12, 2025 14:26
* Only keep > 1 kb savings
…4101)

Rename `pathlib._os.magic_open()` to `vfsopen()`. The new name is a bit
less abstract, and it aligns with the `vfspath()` method added in 5dbd27d.

Per discussion on discourse[^1], adjust `vfsopen()` so that the following
methods may be called:

- `__open_reader__()`
- `__open_writer__(mode)`
- `__open_updater__(mode)`

These three methods return readable, writable, and full duplex file objects
respectively. In the 'writer' method, *mode* is either 'a', 'w' or 'x'. In
the 'updater' method, *mode* is either 'r' or 'w'.

In the pathlib ABCs, replace `ReadablePath.__open_rb__()` with
`__open_reader__()`, and replace `WritablePath.__open_wb__()` with
`__open_writer__()`.

[^1]: https://discuss.python.org/t/open-able-objects/90238

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@pull pull Bot locked and limited conversation to collaborators Sep 12, 2025
@pull pull Bot added the ⤵️ pull label Sep 12, 2025
@pull pull Bot merged commit 805e336 into tj-python:main Sep 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants