Closed
Description
As of GH-118793, the warnings
module is used only once in pathlib, by PurePath.is_reserved()
. We should be able to move the import warnings
line into that method. But beware! Doing so seems to cause a failure in test_io
, which needs further investigation.
Linked PRs
- gh-119049: Fix incorrect usage of
GET_WARNINGS_ATTR
#119063 - [3.13] gh-119049: Fix incorrect display of warning which is constructed by C API (GH-119063) #119106
- gh-119049: Defer
import warnings
inpathlib._locals
#119111 - [3.12] gh-119049: Fix incorrect display of warning which is constructed by C API (GH-119063) #119119