botocore API missmatch with python3-requests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-botocore (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The upstream package integrates a newer version of the requests python library. In the debian package it is modified to use the debian packages python3-requests. However it's not modified to use the older requests API fully.
At least the bucket.upload_file method is broken in the debian packaging. I ticketed it upstream https:/
Here's my script failing with the call to requests.
```
$ python3 run_test.py
Uploading results for test: test_upload_
Uploading /tmp/output/ros.bag to test_upload_
Uploading /tmp/output/
Traceback (most recent call last):
File "run_test.py", line 47, in <module>
upload_to_s3(b, test_name, results_dir)
File "run_test.py", line 14, in upload_to_s3
bucket.
File "/usr/lib/
ExtraArgs=
File "/usr/lib/
extra_
File "/usr/lib/
self.
File "/usr/lib/
**extra_args)
File "/usr/lib/
return self._make_
File "/usr/lib/
operation_
File "/usr/lib/
return self._send_
File "/usr/lib/
request = self.create_
File "/usr/lib/
prepared_
File "/usr/lib/
return request.prepare()
File "/usr/lib/
p.prepare_
File "/usr/lib/
data.seek(0, 2)
TypeError: seek() takes 2 positional arguments but 3 were given
```
I have a local workaround that doesn't call `upload_file` but just calls `put_object` instead that avoids the problem.
```
if os.stat(
else:
)
```
And here's it passing with the workaround above.
```
$ python3 run_test.py
Uploading results for test: test_upload_
Uploading /tmp/output/ros.bag to test_upload_
Uploading /tmp/output/
Empty file fallback behavior
Uploading /tmp/output/
Empty file fallback behavior
Uploading /tmp/output/
Empty file fallback behavior
```
Status changed to 'Confirmed' because the bug affects multiple users.