Merge ~philroche/simplestreams/+git/simplestreams:feature/restore-older-python-requests-support into simplestreams:master
Proposed by
Philip Roche
Status: | Merged |
---|---|
Approved by: | Philip Roche |
Approved revision: | fb7e4fd3741521160c79588610d89d417489b6a8 |
Merge reported by: | Server Team CI bot |
Merged at revision: | not available |
Proposed branch: | ~philroche/simplestreams/+git/simplestreams:feature/restore-older-python-requests-support |
Merge into: | simplestreams:master |
Diff against target: |
28 lines (+8/-2) 1 file modified
simplestreams/contentsource.py (+8/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paride Legovini | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Adam Collard (community) | Approve | ||
Review via email:
|
Commit message
Restores support for older versions of python-requests
If simplestreams is being used with a version of
python-requests < 2.4.1 then any calls to request.get
will result in
```
ValueError: Timeout value connect was (TIMEOUT, None), but it must
be an int or float.
```
The option to use a tuple of (content timeout,read timeout) was
in troduced in requests 2.4.1. Making this chance restores support
for systems with python-requests < 2.4.1 while still retaining the
support for the timeout feature which now will continue to behave
like the non requests Urllib2UrlReader class.
To post a comment you must log in.
You can see the change in requests timeout api from float to tuple|float @ https:/ /docs.python- requests. org/en/ v2.3.0/ api/ and https:/ /docs.python- requests. org/en/ v2.4.3/ api/