This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pathlib.Path.__enter__() should emit DeprecationWarning
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barneygale, brett.cannon
Priority: normal Keywords: patch

Created on 2022-01-27 23:07 by barneygale, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30971 merged barneygale, 2022-01-27 23:22
Messages (2)
msg411936 - (view) Author: Barney Gale (barneygale) * Date: 2022-01-27 23:07
In Python 3.9 / issue39682 we made Path.__exit__() a no-op, and added a comment in the code mentioning that it should be deprecated in future. The future is here, so let's deprecate it.
msg412870 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2022-02-08 21:01
New changeset 06e1701ad3956352bc0f42b8f51c2f8cc85bf378 by Barney Gale in branch 'main':
bpo-46556: emit `DeprecationWarning` from `pathlib.Path.__enter__()` (GH-30971)
https://github.com/python/cpython/commit/06e1701ad3956352bc0f42b8f51c2f8cc85bf378
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90714
2022-02-08 21:02:04brett.cannonsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-02-08 21:01:45brett.cannonsetnosy: + brett.cannon
messages: + msg412870
2022-01-27 23:22:28barneygalesetkeywords: + patch
stage: patch review
pull_requests: + pull_request29149
2022-01-27 23:07:21barneygalecreate