Skip to content

gh-112186: Improve test case test_loop_is_closed_resource_warnings #112187

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dpr-0
Copy link
Contributor

@dpr-0 dpr-0 commented Nov 17, 2023

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a semantic change. The old code allows an exception; the replacement requires one and will fail if something is improved to avoid it. Do you really want this. If not, I would add a note that it would be OK to prevent the exception and remove the assert.

Minor nit: I think the comment fits better under the assert, after the object 'this' points to.

@dpr-0
Copy link
Contributor Author

dpr-0 commented Nov 17, 2023

Do you really want this.

No. I just currently can not prevent RuntimeError while producing this test case scenario.

I would add a note that it would be OK to prevent the exception and remove the assert.

Thanks. It can be removed if there is no RuntimeError occur in the future.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, but I like to indent the comment.

@gvanrossum gvanrossum enabled auto-merge (squash) November 19, 2023 03:06
@gvanrossum gvanrossum added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Nov 19, 2023
@gvanrossum gvanrossum merged commit 18c6929 into python:main Nov 19, 2023
@miss-islington-app
Copy link

Thanks @dpr-0 for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app
Copy link

Sorry, @dpr-0 and @gvanrossum, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 18c692946953e586db432fd06c856531a2b05127 3.11

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 19, 2023
…ings` (pythonGH-112187)

(cherry picked from commit 18c6929)

Co-authored-by: DPR <dpr-0xff@pm.me>
@bedevere-app
Copy link

bedevere-app bot commented Nov 19, 2023

GH-112255 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Nov 19, 2023
dpr-0 added a commit to dpr-0/cpython that referenced this pull request Nov 19, 2023
@bedevere-app
Copy link

bedevere-app bot commented Nov 19, 2023

GH-112261 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Nov 19, 2023
@dpr-0 dpr-0 deleted the Improve-test-case-test_loop_is_closed_resource_warnings branch November 19, 2023 09:20
gvanrossum pushed a commit that referenced this pull request Nov 19, 2023
…nings` (GH-112187) (#112255)

(cherry picked from commit 18c6929)

Co-authored-by: DPR <dpr-0xff@pm.me>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants