[issue39682] pathlib.Path objects can be used as context managers

Brett Cannon report at bugs.python.org
Tue Mar 3 13:08:24 EST 2020


Brett Cannon <brett at python.org> added the comment:

> Can I ask what sort of backwards-compatibility guarantees Python provides for these cases?

A deprecation warning for two releases (i.e. two years). Then it can be removed. So if people want to move forward with removing this then a DeprecationWarning would need to be raised in all places where _closed is set with a message stating the functionality is deprecated in 3.9 and slated for removal in 3.11 (along with appropriate doc updates, both for the module and What's New).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39682>
_______________________________________


More information about the Python-bugs-list mailing list