Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
bpo-46556: emitDeprecationWarning
frompathlib.Path.__enter__()
#30971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
bpo-46556: emitDeprecationWarning
frompathlib.Path.__enter__()
#30971
Conversation
In Python 3.9 / bpo-39682 we made `Path.__exit__()` a no-op, and added acomment in the code mentioning that it should be deprecated in future. Thefuture is here, so let's deprecate it.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There are deprecation warnings emitted by other tests too :
./python -Wall -m test test_pathlib 0:00:00 load avg: 0.37 Run tests sequentially0:00:00 load avg: 0.37 [1/1] test_pathlib/home/karthikeyan/stuff/python/cpython/Lib/test/test_pathlib.py:1833: DeprecationWarning: pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13. Path objects should not be used as context managers. with p:/home/karthikeyan/stuff/python/cpython/Lib/test/test_pathlib.py:1842: DeprecationWarning: pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13. Path objects should not be used as context managers. with p:/home/karthikeyan/stuff/python/cpython/Lib/test/test_pathlib.py:1833: DeprecationWarning: pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13. Path objects should not be used as context managers. with p:/home/karthikeyan/stuff/python/cpython/Lib/test/test_pathlib.py:1842: DeprecationWarning: pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13. Path objects should not be used as context managers. with p:== Tests result: SUCCESS ==1 test OK.Total duration: 586 msTests result: SUCCESS
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I'm ready to merge this, but there was a CI hiccup; just trying to work passed that. |
@barneygale: Status check is done, and it's a failure ❌ . |
@barneygale: Status check is done, and it's a failure ❌ . |
@barneygale thanks! |
Uh oh!
There was an error while loading.Please reload this page.
In Python 3.9,
Path.__exit__()
was made a no-op.https://bugs.python.org/issue46556
Automerge-Triggered-By: GH:brettcannon