Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

barneygale
Copy link
Contributor

@barneygalebarneygale commentedJan 27, 2022
edited by brettcannon
Loading

In Python 3.9,Path.__exit__() was made a no-op.

https://bugs.python.org/issue46556

Automerge-Triggered-By: GH:brettcannon

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.
@brettcannonbrettcannon self-requested a reviewJanuary 28, 2022 18:26
Copy link
Member

@tirkarthitirkarthi left a 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

barneygale reacted with thumbs up emoji
@brettcannon
Copy link
Member

I'm ready to merge this, but there was a CI hiccup; just trying to work passed that.

barneygale reacted with thumbs up emojibarneygale reacted with hooray emoji

@miss-islington
Copy link
Contributor

@barneygale: Status check is done, and it's a failure ❌ .

@miss-islington
Copy link
Contributor

@barneygale: Status check is done, and it's a failure ❌ .

@brettcannonbrettcannon merged commit06e1701 intopython:mainFeb 8, 2022
@brettcannon
Copy link
Member

@barneygale thanks!

barneygale reacted with thumbs up emojibarneygale reacted with heart emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@brettcannonbrettcannonbrettcannon approved these changes

@tirkarthitirkarthitirkarthi left review comments

@sobolevnsobolevnsobolevn left review comments

Assignees

@brettcannonbrettcannon

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@barneygale@brettcannon@miss-islington@tirkarthi@sobolevn@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp