Skip to content

Commit 54139ad

Browse files
committed
conftest - auto-debug
The conftest.py file has been missing - this is an old project, and almost all the scaffolding is done by setup and teardown methods. This commit does not do anything with that, but if pytest is run with the --pdb flag, then enable some debug-on-assert hook in the code
1 parent 5e48678 commit 54139ad

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,19 @@ This project should adhere to [Semantic Versioning](https://semver.org/spec/v2.0
1414

1515
## [Unreleased]
1616

17+
### Added
18+
19+
* **OX App Suite** compatibility hints added; the library is now tested against OX App Suite via a new Docker test server (`tests/docker-test-servers/ox/`).
20+
* New `search.unlimited-time-range` feature flag with a workaround in `search.py` that injects a broad time range (1970–2126) for servers that return an empty result set when no time range is specified.
21+
1722
### Fixed
1823

1924
* `AsyncDAVClient` failed to initialize when using httpx < 0.23.0 because `proxy=None` was unconditionally passed to `httpx.AsyncClient` which did not accept a `proxy` keyword argument in older releases. Fixes https://github.com/python-caldav/caldav/issues/632
2025

26+
### Potentially Breaking Changes
27+
28+
* The compatibility-hint key `search.comp-type-optional` has been renamed to `search.comp-type.optional` for consistency with the dotted-key naming convention used elsewhere. If you have this key set in a local server configuration, update it accordingly.
29+
2130
## [3.0.0] - 2026-03-03
2231

2332
Version 3.0 should be fully backward-compatible with version 2.x - but there are massive code changes in version 3.0, so if you're using the Python CalDAV client library in some sharp production environment, I would recommend to wait for two months before upgrading.

docs/design/RELEASE-HOWTO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ I have no clue on the proper procedures for doing releases, and I keep on doing
88

99
* Go through changes since last release and compare it with the `CHANGELOG.md`. Any change should be logged.
1010
* Run tests towards as many servers as possible
11-
* Use the `PYTHON_CALDAV_DEBUGMODE=pdb` environment variable! Should do some research if we hit any "soft asserts" or "weirdness".
11+
* Use the `PYTHON_CALDAV_DEBUGMODE=DEBUG_PDB` environment variable (or simply pass `--pdb` to pytest, which sets this automatically)! Should do some research if we hit any "soft asserts" or "weirdness".
1212
* Do research on breakages. If the test breaks also for the previous release of the caldav library, then it's likely to be due to some regression on the server side. For patch-level releases we don't care about such breakages, for minor-level releases we should try to work around problems
1313
* It's proper to document somewhere (TODO: where? how?) what servers have been tested
1414
* Does any of the changes require documentation to be rewritten? The documentation should ideally be in sync with the code upon release time.

tests/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import os
2+
3+
4+
def pytest_configure(config):
5+
"""Set PYTHON_CALDAV_DEBUGMODE=DEBUG_PDB automatically when --pdb is passed.
6+
7+
This must happen in pytest_configure (before test collection) because
8+
caldav.lib.error reads the env var at module import time.
9+
"""
10+
if config.option.usepdb and "PYTHON_CALDAV_DEBUGMODE" not in os.environ:
11+
os.environ["PYTHON_CALDAV_DEBUGMODE"] = "DEBUG_PDB"

0 commit comments

Comments
 (0)