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
Using deprecated method_whitelist breaks upon actual retry #2092
Comments
Thanks for reporting this, will investigate and get a fix out asap. |
I investigate the problem and here is my understanding: You pass A possible workaround for the test could be to avoid adding def __init__(self, *args, **kwargs):
if 'allowed_methods' not in kwargs:
kwargs['method_whitelist'] = self.TEST_ALLOWED_METHODS
kwargs['status_forcelist'] = self.TEST_STATUS_FORCELIST
super().__init__(*args, **kwargs) |
Thanks for looking at this @hramezani , However, the biggest concern is a breaking change for existing code / deployed services which are not pinning |
We discussed this a bit on Discord, the decision was at least for now we'll wait to see if this problem is more widespread before taking action. Preferably we'd like to keep things as they are to push the ecosystem towards removing the deprecated options since these code paths will continue to fail in v2. Leaving this issue open in case others have this same issue. |
This comment has been minimized.
This comment has been minimized.
Since this hasn't had any hits in over 2 years I'm going to close this as not a widespread issue. If this comes up again we can open a separate issue to handle it. |
@vytas7 Thanks for sharing this. I downgraded the urllib3 to 1.26.2 in a separate virtual environment. Now it works fine for me. |
You're welcome @Mustafahubs. If I were to perform this change myself, I would have only added a deprecation warning, and made the actual breaking change in |
Subject
method_whitelist
parameter was apparently replaced by a racially-neutral (and actually easier to understand in this case)allowed_methods
. The old parameter was deprecated.However, it seems that continuing to use
method_whitelist
breaks the machinery upon actual retry, at least in some usage patterns.It is easy for me to change to
allowed_methods
for new use, but I would love to support some older installations requiringurllib3==1.25.10
. The new parameter name is not supported on1.25.10
.There is also risk that existing code would break if
urllib3
was upgraded in an existing environment.Environment
Steps to Reproduce
Consider the following test case, named
test.py
:The ubiquitous
pytest
is needed to run it:Expected Behavior
Test attached test case is expected to pass.
Actual Behavior
💥
The text was updated successfully, but these errors were encountered: