GH-83863: Drop support for using `pathlib.Path` objects as context managers (GH-104807)
In Python 3.8 and prior, `pathlib.Path.__exit__()` marked a path as closed; some subsequent attempts to perform I/O would raise an IOError. This functionality was never documented, and had the effect of making `Path` objects mutable, contrary to PEP 428. In Python 3.9 we made `__exit__()` a no-op, and in 3.11 `__enter__()` began raising deprecation warnings. Here we remove both methods.
B
Barney Gale committed
6b1510cf11c16c8e4381810c15ceeda6f89e79f4
Parent: e0b3078
Committed by GitHub <noreply@github.com>
on 5/23/2023, 10:31:59 PM