Skip to content

Commit 4c15e7f

Browse files
committed
more bugfix
1 parent 6a8d8d0 commit 4c15e7f

6 files changed

Lines changed: 32 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ Python 3.7 is no longer tested - but it should work. Please file a bug report i
2121
### Changed
2222

2323
* Some exotic servers may return object URLs on search, but it does not work out to fetch the calendar data. Now it will log an error instead of raising an error in such cases.
24+
* The `tests/compatibility_issues.py` has been moved to `caldav/compatibility_hints.py`, this to make it available for a caldav-server-tester-tool that I'm splitting off to a separate project/repository, and also to make https://github.com/python-caldav/caldav/issues/402 possible.
2425

2526
#### Refactoring
2627

2728
* Minor code cleanups by github user @ArtemIsmagilov in https://github.com/python-caldav/caldav/pull/456
29+
* The very much overgrown `objects.py`-file has been split into three.
2830

2931
#### Test framework
3032

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
# fmt: off
2+
"""This text was updated 2025-05-17. The plan is to reorganize this
3+
file a lot over the next few months, see
4+
https://github.com/python-caldav/caldav/issues/402
5+
6+
This file serves as a database of different compatibility issues we've
7+
encountered while working on the caldav library, and descriptions on
8+
how the well-known servers behave.
9+
10+
As for now, this is a list of binary "flags" that could be turned on
11+
or off. My experience is that there are often neuances, so the
12+
compatibility matrix will be changed from being a list of flags to a
13+
key=value store in the near future (at least, that's the plan).
14+
15+
The issues may be grouped together, maybe even organized
16+
hierarchically. I did consider organizing the compatibility issues in
17+
some more advanced way, but I don't want to overcomplicate things - I
18+
will try out the key-value-approach first.
19+
"""
20+
221
## The lists below are specifying what tests should be skipped or
322
## modified to accept non-conforming resultsets from the different
423
## calendar servers. In addition there are some hacks in the library

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Compatibility
307307
tend to be a moving target, and I rarely recheck if things works in
308308
newer versions of the software after I find an incompatibility)
309309

310-
The test suite is regularly run against several calendar servers, see https://github.com/python-caldav/caldav/issues/45 for the latest updates. See ``tests/compatibility_issues.py`` for the most up-to-date list of compatibility issues. In early versions of this library test breakages was often an indication that the library did not conform well enough to the standards, but as of today it mostly indicates that the servers does not support the standard well enough. It may be an option to add tweaks to the library code to cover some of the missing functionality.
310+
The test suite is regularly run against several calendar servers, see https://github.com/python-caldav/caldav/issues/45 for the latest updates. See ``compatibility_hints.py`` for the most up-to-date list of compatibility issues. In early versions of this library test breakages was often an indication that the library did not conform well enough to the standards, but as of today it mostly indicates that the servers does not support the standard well enough. It may be an option to add tweaks to the library code to cover some of the missing functionality.
311311

312312
Here are some known issues:
313313

tests/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import niquests
1212

13-
from . import compatibility_issues
13+
from caldav import compatibility_hints
1414
from caldav.davclient import DAVClient
1515

1616
####################################
@@ -140,7 +140,7 @@ def teardown_radicale(self):
140140
"username": "user1",
141141
"password": "",
142142
"backwards_compatibility_url": url + "user1",
143-
"incompatibilities": compatibility_issues.radicale,
143+
"incompatibilities": compatibility_hints.radicale,
144144
"setup": setup_radicale,
145145
"teardown": teardown_radicale,
146146
}
@@ -225,7 +225,7 @@ def silly_request():
225225
"name": "LocalXandikos",
226226
"url": url,
227227
"backwards_compatibility_url": url + "sometestuser",
228-
"incompatibilities": compatibility_issues.xandikos,
228+
"incompatibilities": compatibility_hints.xandikos,
229229
"setup": setup_xandikos,
230230
"teardown": teardown_xandikos,
231231
}

tests/conf_private.py.EXAMPLE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from tests import compatibility_issues
1+
from caldav import compatibility_hints
22

33
## PRIVATE CALDAV SERVER(S) TO RUN TESTS TOWARDS
44
## Make a list of your own servers/accounts that you'd like to run the
@@ -29,8 +29,8 @@ caldav_servers = [
2929

3030
## incompatibilities is a list of flags that can be set for
3131
## skipping (parts) of certain tests. See
32-
## tests/compatibility_issues.py for premade lists
33-
#'incompatibilities': compatibility_issues.nextcloud
32+
## compatibility_hints.py for premade lists
33+
#'incompatibilities': compatibility_hints.nextcloud
3434
'incompatibilities': [],
3535

3636
## You may even add setup and teardown methods to set up

tests/test_caldav.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import pytest
2626
import vobject
2727

28-
from . import compatibility_issues
28+
from caldav import compatibility_hints
2929
from .conf import caldav_servers
3030
from .conf import client
3131
from .conf import proxy
@@ -581,12 +581,12 @@ class RepeatedFunctionalTestsBaseClass:
581581

582582
def check_compatibility_flag(self, flag):
583583
## yield an assertion error if checking for the wrong thig
584-
assert flag in compatibility_issues.incompatibility_description
584+
assert flag in compatibility_hints.incompatibility_description
585585
return flag in self.incompatibilities
586586

587587
def skip_on_compatibility_flag(self, flag):
588588
if self.check_compatibility_flag(flag):
589-
msg = compatibility_issues.incompatibility_description[flag]
589+
msg = compatibility_hints.incompatibility_description[flag]
590590
pytest.skip("Test skipped due to server incompatibility issue: " + msg)
591591

592592
def setup_method(self):
@@ -596,7 +596,7 @@ def setup_method(self):
596596
self.calendars_used = []
597597

598598
for flag in self.server_params.get("incompatibilities", []):
599-
assert flag in compatibility_issues.incompatibility_description
599+
assert flag in compatibility_hints.incompatibility_description
600600
self.incompatibilities.add(flag)
601601

602602
if self.check_compatibility_flag("unique_calendar_ids"):

0 commit comments

Comments
 (0)