Repository navigation
Read the config file through calendaring-config - #804
Merged
Merged
Conversation
Programs sharing the caldav config file (like calendaring) drop keys starting with test_, so the test-server selection now reads test_allowed and test_priority. testing_allowed and priority still work with a DeprecationWarning, which pytest shows but does not fail on. A priority set in the main config file was silently ignored before; it is now honoured. #786 Prompt: Fix issue #786 [#786] Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
The config file is shared with plann and calendaring, and its format now lives in calendaring-config, so caldav reads it through that package. kind: sections, password_command/keyring and the pycal path come for free, and CALDAV_* variables override keys one by one, fixing #780. plann's helper extract_conn_params_from_section and the test-server lookup read the new format too. Unknown keys are warned about; expand_config_section now raises for a missing or disabled section named explicitly. #786 Prompt: Wasn't the main thing in issue #786 [#786] to drop the configuration parsing from the caldav library and take in the new calendaring-config as a dependency? Followup-Prompt: The changes a, b, c, d, e listed above is minor and/or to be regarded as bugfixed, isn't it? The difference f needs to be explained better. This will be 3.6, not 3.5.x. [a-e: empty file used, unmatched contains warns, unmatched glob or missing/disabled named section is an error, disabled meta-section drops its members, * means leaf sections; f: fewer CALDAV_* variables read] Followup-Prompt: go for A [drop the CALDAV_* variables the spec does not list]. Why not browse through the environment for CALDAV_* and populate the configuration with it? All of those are valid configuration settings and it should be possible to override them through the environment. Except CALDAV_AUTH, since auth is an object and not a string. Followup-Prompt: Releasing calendaring-config v0.2 is cheap. Scanning the environment for CALDAV_*-parameters is a cheap operation, isn't it? Passing CALDAV_PASWORD should be equivalent of setting pasword in the configuration file, and the caldav library should probably give an error if there are things in the config it doesn't understand? Even if calendaring-config reads and parses the configuration file, I think it's up to the backend to validate it? Followup-Prompt: Warn is better than error indeed, and allowing x_* to pass is a good idea. Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
test_get_davclient_missing_url cleared the environment to get "no configuration", which worked while caldav's own parser fell back to / without HOME. calendaring-config finds the home directory through Path.home(), which does not need HOME, so the test read the developer's own config file and failed. A shared no_config_files fixture now points HOME and the system paths at an empty directory and clears the config variables; the issue 786 unit tests use it too. Prompt: Please fix the test_get_davclient_missing_url, it reads my personal calendar config file and fails because of it Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
Merging the switch to calendaring-config with the async factory rework left the two modes apart: a named section that is missing, a glob that matches nothing, or a section with bad headers raised in sync get_calendars() but was logged and skipped by the async one under raise_errors=False. Resolving the targets does not connect, so what fails there is the configuration, not a server: async now lets it through, as sync always did. Prompt: [fix issues found during the review process of merging #804] Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
tobixen
force-pushed
the
test-key-prefix-786
branch
from
October 20, 2026 00:28
3098a6c to
0956619
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer: AI-generated code and text below the line, generated by Claude Opus 5.5, from the prompts:
For caldav 3.6. The config file is shared with plann and calendaring, and its format now lives in calendaring-config; caldav reads it through that package instead of its own parser. Users get
kind: caldavsections,password_command/password_keyring,~/.config/pycal/calendar.yaml, andCALDAV_*variables that override the file key by key (which also fixes #780). Keys starting withtest_are reserved for test tooling, sotesting_allowedandprioritybecometest_allowedandtest_priority, with the old names deprecated. The behaviour changes for existing files are listed inchanges/+calendaring-config.changed.md.Closes #786
Closes #780
Closes #704