Yelp / bravado-core

Other
109 stars 98 forks source link

Python requests library missing requirement #271

Closed andresriancho closed 6 years ago

andresriancho commented 6 years ago

https://github.com/andresriancho/w3af uses bravado core for parsing open api. One of our users reported an issue while running:

from bravado.requests_client import RequestsClient

The traceback:

  File "/home/stalk/tools/w3af/w3af/core/data/parsers/doc/open_api/main.py", line 34, in <module>
    from w3af.core.data.parsers.doc.open_api.requests import RequestFactory
  File "/home/stalk/tools/w3af/w3af/core/data/parsers/doc/open_api/requests.py", line 23, in <module>
    from bravado.client import construct_request
  File "/usr/local/lib/python2.7/dist-packages/bravado/client.py", line 59, in <module>
    from bravado.requests_client import RequestsClient
  File "/usr/local/lib/python2.7/dist-packages/bravado/requests_client.py", line 214, in <module>
    class RequestsFutureAdapter(FutureAdapter):
  File "/usr/local/lib/python2.7/dist-packages/bravado/requests_client.py", line 219, in RequestsFutureAdapter
    timeout_errors = [requests.exceptions.ReadTimeout]
AttributeError: 'module' object has no attribute 'ReadTimeout'

The user has requests==2.2.1 installed and the import fails. I have requests==2.18.4 and the import works.

This seems to be an issue with bravado-core not requiring a version of requests > X.

macisamuele commented 6 years ago

@andresriancho I think that this issue should be opened into bravado project as the linked stacktrace does refer to it. I've checked requests changelog and you're correct, bravado does not specify requests 2.4.0 as min library version.

andresriancho commented 6 years ago

You just did that, thanks :+1: