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
add **connection_pool_kw to Request() constructor #2560
Conversation
Hey @ed738 , thanks for the approval. Seems like a test is failing but I don't quite see how it is connected to the change in this PR. Do you have an idea?
|
Maybe the other one was a flake, latest run resulted in
Fixed in latest commit |
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. Thanks for the PR and sorry for getting back to it late.
test_clean_deprecation_warning_polling
is indeed sometimes flaky.- pre-commit seems to be happy now
- It would be good to have a test for this. I know that we don't test
Request
too much (test_request.py
is not long …), but it's probably possible to at least make sure that the new kwargs are properly passed to the pool manager. If you haven't worked with pytest before, let me know.
@Bibo-Joshi , I addressed your comments. Please take another look |
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. The code itself looks okay now, but I'll still need some unit test for this before merging ;)
@ed738 please stop producing noise on this PR (or other threads). If you don't, you will be reported to GitHub and blocked from our organization. |
Hey @Bibo-Joshi , only picking this up again now. How would you like to test this? We could try passing in a parameter that is expected to be forwarded to the connection pool, then assert that the parameter is set as expected. |
Yes, that sounds reasonable. Please make sure to cover all cases, where the kwargs would be used (IISC it's 3 cases). BTW I rebased to the v14 branch, as we've started developing for v14 and all PRs will go into that branch now. |
@8136800738 please stop producing noise on this PR (or other threads). If you don't, you will be reported to GitHub and blocked from our organization. |
c2f8ac0
to
a7c7c82
Compare
Closing due to inactivity and also because this is likely to be irrelevant after #2731 |
Adds
**connection_pool_kw
to theRequest()
class that can be used to override the default values picked in theRequest
class or pass additional parameters.Original use case #2557
Checklist for PRs
.. versionadded:: version
,.. versionchanged:: version
or.. deprecated:: version
to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)AUTHORS.rst
(optional)If the PR contains API changes (otherwise, you can delete this passage)
Request.__init__
now accepts**connection_pool_kw