Skip to content
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

urllib3 sub-dependency: got an unexpected keyword argument 'allowed_methods' #1

Closed
ilias-ant opened this issue Jan 11, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@ilias-ant
Copy link
Owner

ilias-ant commented Jan 11, 2021

The following dependency-bug was brought to my attention by @sp1thas (much obliged!)

Describe the bug
pydatagovgr==0.1.3 uses the newly introduced param allowed methods instead of the soon-to-be-deprecated method_whitelist in the urllib3.util.retry.Retry class. However, at the same time it allows, through its poetry.lock configuration urllib3 versions < 1.26.0 which do not have the new param available.

To Reproduce

from pydatagovgr import DataGovClient
import urllib3


urllib3.__version__
#  '1.25.10'

gov = DataGovClient(token='xoxb-1234-1243')

yields:

Traceback (most recent call last):
  File "/home/.../.../lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3418, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-4-a9f7822d9844>", line 1, in <module>
    gov = DataGovClient(token='xoxb-1234-1243')
  File "/home/.../.../lib/python3.7/site-packages/pydatagovgr/base_client.py", line 38, in __init__
    self.session = self._init_session()
  File "/home/.../.../lib/python3.7/site-packages/pydatagovgr/base_client.py", line 72, in _init_session
    allowed_methods=["GET"],
TypeError: __init__() got an unexpected keyword argument 'allowed_methods'

Expected behavior
Initialization of the DataGovClient should not raise any exceptions.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.5 LTS x86_64
  • Python: 3.7.9
@ilias-ant ilias-ant added the bug Something isn't working label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant