]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-104898: Revert pathlib os.PathLike registration change. (GH-105073)
authorBarney Gale <barney.gale@gmail.com>
Mon, 29 May 2023 21:44:51 +0000 (22:44 +0100)
committerGitHub <noreply@github.com>
Mon, 29 May 2023 21:44:51 +0000 (21:44 +0000)
commitd593074494b39a3d51e67a4e57189c530867a7ff
treec0eb0b5053fe6d9cd630029f6287853eeb152ecf
parent39f6a0489fcc815a578d27dfee2feea003c896f8
GH-104898: Revert pathlib os.PathLike registration change. (GH-105073)

Subclassing `os.PathLike` rather than using `register()` makes
initialisation slower, due to the additional `__isinstance__` work.

This partially reverts commit bd1b6228d132b8e9836fe352cd8dca2b6c1bd98c.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Lib/pathlib.py