Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 600258 - dev-python/vdirsyncer-0.11.2 breaks with current stable dev-python/requests
Summary: dev-python/vdirsyncer-0.11.2 breaks with current stable dev-python/requests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-20 02:31 UTC by hfk22
Modified: 2017-01-05 09:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hfk22 2016-11-20 02:31:23 UTC
The current unstable dev-python/vdirsyncer-0.11.2 (no stable version available) breaks with the current stable dev-python/requests-2.11.1.  At the moment, there are no more current versions of requests in portage.  Anyway, I currently get the error in vdirsyncer:

error: Unknown error occured for my_contacts: Header value 1 must be of type str or bytes, not <class 'int'>
error: Use `-vdebug` to see the full traceback.
error: Unknown error occured for friends_calendar: Header value 1 must be of type str or bytes, not <class 'int'>
error: Use `-vdebug` to see the full traceback.
error: Unknown error occured for work_calendar: Header value 1 must be of type str or bytes, not <class 'int'>
error: Use `-vdebug` to see the full traceback.
error: Unknown error occured for home_calendar: Header value 1 must be of type str or bytes, not <class 'int'>
error: Use `-vdebug` to see the full traceback.
error: 4 out of 8 tasks failed.

Running with -vdebug gives

error: Unknown error occured for my_contacts: Header value 1 must be of type str or bytes, not <class 'int'>
error: Use `-vdebug` to see the full traceback.
debug:   File "/usr/lib64/python3.4/site-packages/vdirsyncer/cli/tasks.py", line 66, in sync_collection
debug:     force_delete=force_delete
debug:   File "/usr/lib64/python3.4/site-packages/vdirsyncer/sync.py", line 216, in sync
debug:     b_info.prepare_idents()
debug:   File "/usr/lib64/python3.4/site-packages/vdirsyncer/sync.py", line 111, in prepare_idents
debug:     for href, etag in self.storage.list():
debug:   File "/usr/lib64/python3.4/site-packages/vdirsyncer/storage/dav.py", line 568, in list
debug:     headers=headers)
debug:   File "/usr/lib64/python3.4/site-packages/vdirsyncer/storage/dav.py", line 325, in request
debug:     return utils.http.request(method, url, session=self._session, **more)
debug:   File "/usr/lib64/python3.4/site-packages/vdirsyncer/utils/http.py", line 55, in request
debug:     r = func(method, url, **kwargs)
debug:   File "/usr/lib64/python3.4/site-packages/requests/sessions.py", line 461, in request
debug:     prep = self.prepare_request(req)
debug:   File "/usr/lib64/python3.4/site-packages/requests/sessions.py", line 394, in prepare_request
debug:     hooks=merge_hooks(request.hooks, self.hooks),
debug:   File "/usr/lib64/python3.4/site-packages/requests/models.py", line 295, in prepare
debug:     self.prepare_headers(headers)
debug:   File "/usr/lib64/python3.4/site-packages/requests/models.py", line 409, in prepare_headers
debug:     check_header_validity(header)
debug:   File "/usr/lib64/python3.4/site-packages/requests/utils.py", line 800, in check_header_validity
debug:     "not %s" % (value, type(value)))

I did some checking and it looks like requests changed how some of their validation was done:

https://github.com/kennethreitz/requests/issues/3559
 
I'm not sure if newer versions of vdirsyncer have adjusted for this change in the code, as portage does not have newer versions available, but it's possible that a version bump would fix things.  In the short term, downgrading to dev-python/requests-2.8.1 fixes the issue.
Comment 1 Amy Liffey gentoo-dev 2016-11-25 11:34:33 UTC
Hello,
can you please update to vdirsyncer 0.14.0 and confirm if it solves the problem?

Thanks
Comment 2 Amy Liffey gentoo-dev 2016-11-26 08:51:31 UTC
Solved in 0.14.0 version.
Comment 3 hfk22 2017-01-05 04:05:27 UTC
Late to the party, but I can confirmed it's fixed as well.
Comment 4 Amy Liffey gentoo-dev 2017-01-05 09:04:40 UTC
(In reply to hfk22 from comment #3)
> Late to the party, but I can confirmed it's fixed as well.

Thank you ! :)