-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix several ResourceWarnings in test_requests.py #4766
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4766 +/- ##
=======================================
Coverage 66.89% 66.89%
=======================================
Files 15 15
Lines 1577 1577
=======================================
Hits 1055 1055
Misses 522 522 Continue to review full report at Codecov.
|
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.
Hi @BoboTiG, thanks for looking into this. I don't have an issue adding the context handlers, but we should probably avoid dumping all of the logic inside of them.
If we want to encourage best practices, let's make sure anything not relevant to the file handler stays at its original indentation. Once that's done, if you can rebase onto master, I think I'm happy with this.
@nateprewitt, thanks for the review. You are totally right and I applied changes + rebase on master :) We only need to keep |
What is the status of the PR? Would you mind trigger the request-CI job? |
Ping :) |
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.
Hi @BoboTiG, I've rebased your change onto the top of our main branch and resolved some conflicts. This seems like a reasonable fix still and I think we're happy with its current state. Thanks again for the contribution!
Hello,
I do not know if you are interested in fixing
ResourceWarning
s in tests, but I will take my chance :)There was 10 unclosed files in
test_requests.py
.