Using `__del__` often closes the database on a different thread, which
is not supported by the sqlite module and produces a different warning.
Explicitly close the status database everywhere it is used.
Raise an error when parsing a vobject that has mismatched `BEGIN` and
`END` lines (e.g., `BEGIN:FOO` followed by `END:BAR`) or missing `END`
lines (e.g., `BEGIN:FOO` with no subsequent `END:FOO`).
Fixes#1102.
The current [experimental] implementation is stale, and hasn't been
maintained for a long time. Regrettably, not even its tests still work,
and there nobody interested in maintaining it.
If anyone is interested in re-implementing this in a third-party
package, I can consider adding support for pluggable storages.
Not sure why we didn't do this initially, but this ensures that we
always close all connectors properly, and also gives much clearer scope
regarding their life-cycles.
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)
- No need to empty collections, they're generated with a UUID and should
always be empty (the code to empty them does not actually run in CI
right now).
- Move deletion code to _after_ the yield, since that's the order in
which things happen.
- Delete all collections asynchronously.
The fix that disabled VTODO tests accidentally ran all other tests twice
for this storage.
This wasn't picked up earlier since Fastmail is not currently running on
CI.