Skip to content

Conversation

@xxbinxx
Copy link

@xxbinxx xxbinxx commented Jan 24, 2020

Tested in python2.7 and 3.6.9
Retry class in urllib does not accept any argument named 'status' thus throwing TypeError.
Here's the snippet of retry class init:

def __init__(self, total=10, connect=None, read=None, redirect=None, method_whitelist=DEFAULT_METHOD_WHITELIST, status_forcelist=None, backoff_factor=0, raise_on_redirect=True, raise_on_status=True, _observed_errors=0): 

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Discussion

  • Read the contribution guidelines (CONTRIBUTING.md).
  • If this has been discussed in an issue, make sure to link to the issue here.
    If not, go file an issue about this before creating a pull request to discuss.

Testing

  • Make sure all existing tests in the repository pass after your change.
  • If you fixed a bug or added a feature, add a new test to cover your code.

API Changes

  • At this time we cannot accept changes that affect the public API. If you'd like to help
    us make Firebase APIs better, please propose your change in an issue so that we
    can discuss it together.
Retry class in `urllib` does not accept any argument named 'status' Here's the snippet of `retry` class init: def __init__(self, total=10, connect=None, read=None, redirect=None, method_whitelist=DEFAULT_METHOD_WHITELIST, status_forcelist=None, backoff_factor=0, raise_on_redirect=True, raise_on_status=True, _observed_errors=0):
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@xxbinxx
Copy link
Author

xxbinxx commented Jan 24, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@xxbinxx xxbinxx closed this Jan 24, 2020
@xxbinxx xxbinxx reopened this Jan 27, 2020
@hiranya911
Copy link
Contributor

status is indeed a valid keyword arg:

https://github.com/urllib3/urllib3/blob/672eaabf3c84f6b6b8fec5f2b4d4f3d30ae84416/src/urllib3/util/retry.py#L90-L96

This parameter has been supported by urllib3 versions as old as 1.21.0, which was released nearly 3 years ago. If you're seeing the above error that's because your runtime contains a very old version of urllib3.

@hiranya911 hiranya911 closed this Jan 29, 2020
@xxbinxx
Copy link
Author

xxbinxx commented Jan 29, 2020

oh boy, silly me. I must have misread some version info in my system.
Thanks @hiranya911

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

Labels

None yet

3 participants