cpython/Misc/NEWS.d/next/Library/2024-05-08-19-47-34.gh-issu...

6 lines
322 B
ReStructuredText

Suppress all :exc:`OSError` exceptions from :meth:`pathlib.Path.exists` and
``is_*()`` methods, rather than a selection of more common errors. The new
behaviour is consistent with :func:`os.path.exists`, :func:`os.path.isdir`,
etc. Use :meth:`pathlib.Path.stat` to retrieve the file status without
suppressing exceptions.