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

Please provide python 3.9 support #847

Closed
alvitg opened this issue Oct 12, 2020 · 6 comments · Fixed by #851
Closed

Please provide python 3.9 support #847

alvitg opened this issue Oct 12, 2020 · 6 comments · Fixed by #851

Comments

@alvitg
Copy link

alvitg commented Oct 12, 2020

Vdirsyncer emits error on MacOS Catalina as well as on Void Linux being compiled against Python 3.9.

Example -vdebug output on Linux:

debug: PROPFIND https://carddav.yandex.ru/addressbook/myname%40yandex.ru/addressbook/
debug: {'User-Agent': 'vdirsyncer/0.16.8', 'Content-Type': 'application/xml; charset=UTF-8', 'Depth': '1'}
debug: b'\n <D:propfind xmlns:D="DAV:">\n <D:prop>\n <D:resourcetype/>\n <D:getcontenttype/>\n <D:getetag/>\n
...
<D:propstat><D:prop><D:getetag>"2495-2727"</D:getetag><D:getcontenttype>text/x-vcard</D:getcontenttype><D:resourcetype/></D:prop>HTTP/1.1 200 OK</D:propstat></D:response></D:multistatus>'
debug: Normalized URL from '/addressbook/myname%40yandex.ru/addressbook/' to '/addressbook/myname@yandex.ru/addressbook/'
error: Unknown error occurred for avg_contacts/addressbook: 'xml.etree.ElementTree.Element' object has no attribute 'getiterator'
error: Use -vdebug to see the full traceback.
debug: File "/usr/lib/python3.9/site-packages/vdirsyncer/cli/tasks.py", line 62, in sync_collection
debug: sync.sync(
debug: File "/usr/lib/python3.9/site-packages/vdirsyncer/sync/init.py", line 135, in sync
debug: b_nonempty = b_info.prepare_new_status()
debug: File "/usr/lib/python3.9/site-packages/vdirsyncer/sync/init.py", line 44, in prepare_new_status
debug: for href, etag in self.storage.list():
debug: File "/usr/lib/python3.9/site-packages/vdirsyncer/storage/dav.py", line 635, in list
debug: for href, etag, _prop in rv:
debug: File "/usr/lib/python3.9/site-packages/vdirsyncer/storage/dav.py", line 591, in _parse_prop_responses
debug: props = _merge_xml(props)
debug: File "/usr/lib/python3.9/site-packages/vdirsyncer/storage/dav.py", line 123, in _merge_xml
debug: rv.extend(item.getiterator())
error: 1 out of 2 tasks failed.

My config:

[general]
status_path = "~/.vdirsyncer/status/"

[pair avg_contacts]
a = "avg_contacts_local"
b = "avg_contacts_yandex"
collections = ["from a", "from b"]
metadata = ["displayname"]
conflict_resolution = "a wins"

[storage avg_contacts_local]
type = "filesystem"
path = "~/Documents/Contacts/"
fileext = ".vcf"

[storage avg_contacts_yandex]
type = "carddav"
url = "https://carddav.yandex.ru/"
username = "myname@yandex.ru"
password.fetch = ["command", "keyring", "get", "yandex", "myname@yandex.ru"]

@WhyNotHugo
Copy link
Member

WhyNotHugo commented Oct 12, 2020 via email

@tirkarthi
Copy link

This seems to have been fixed in 7577fa2

@alvitg
Copy link
Author

alvitg commented Oct 14, 2020

This seems to have been fixed in 7577fa2

Indeed, I've checked out the latest version [b5d4d3f] and the problem is not observed.

Thanks a lot!

Thus, the problem sources are outdated versions in Homebrew, pip and Void Linux repositories.

@bitmeise
Copy link

Thus, the problem sources are outdated versions in Homebrew, pip and Void Linux repositories.

And for this to change we need an official vdirsyncer release. The last one is from June 9th.

@WhyNotHugo
Copy link
Member

I'll try to push a new release next week.
I want to address Python 3.9 support first.

@dtrodrigues
Copy link

Homebrew's vdirsyncer now supports Python 3.9 by pulling in the needed commit: Homebrew/homebrew-core#63467

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants