Configure mypy as a pre-commit hook and add all type hints necessary for
mypy to pass.
There's still more work to be done here typing a lot more code, but this
provides a clear starting point.
- change the interface of Storage.get_meta() and .set_meta()
to use '' as the empty value and None as missing value.
- When a property is missing (e.g calendar-color was removed)
in the filesystem storage delete the 'color' file, and
in the WebDAV storage issue propertyupdate/remove call.
- remove the property from [status]/[pair]/[collection].metadata
I have adjusted, but not run the test suite. On the other side
I tested on real system: source is CalDAV - destination is filesystem;
and source is CalDAV, destination is CalDAV (another account)
Add asyncio to the storage backends and most of the codebase. A lot of
it merely uses asyncio APIs, but still doesn't actually run several
things concurrently internally. Further improvements will be added on
top of these changes
Thanks to Thomas Grainger (@graingert) for a few useful pointers
related to asyncio.
I installed mwic, so you don't have to.
`unperformant` doesn't seem to be an often used english word either and
`addressbook` is probably `address book`.
nextCloud now returns no etag on upload, which is why we're forced to
adapt the tests accordingly. So now we need to specify a fixed value for
"no etag returned" such that the tests can act accordingly. We also need
to test that the sync algorithm works properly with None.
- Using `info.idents` as new status, this saves a few operations where
no storage actions have to be taken, but the status has to be updated.
- Rename StorageSyncer to _StorageInfo and make it a private API again.
- Ability to pass custom functions for conflict resolution. This part is
a preparation for #127.
Fix#132
Passing the collections parameter used to mean that the storage should
append its value to the URL or path. This was a leaky abstraction for
the reasons explained in #132.
The new behavior removes this meaning from this parameter. Vdirsyncer
now maintains a cache of discovered collections.
- Fix#49 -- The old fix caused problems with other servers. The new
behavior only decodes ``@`` characters.
- ``@`` is now not used when generating a new href, as some servers seem
to have problems with it (http://sabre.io/dav/character-encoding/).
This behavior is configurable via the ``unsafe_href_chars`` parameters
for DAV storages, and is disabled in the testsuite for Radicale and
ownCloud.
- Decoding of hrefs is also done twice for CarddavStorage.list because
of owncloud/contacts#581. Vdirsyncer has behaved like that before, but
not intentionally.
- Storages now don't share their ``_get_href`` methods anymore.