Skip to content

Read the config file as caldav 3.6 does - #81

Open
tobixen wants to merge 2 commits into
masterfrom
config-file-path
Open

tobixen wants to merge 2 commits into
masterfrom
config-file-path

Conversation

@tobixen

@tobixen tobixen commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Disclaimer: AI-generated code and text below the line, generated by Claude Opus 5.5, from the prompts:

fix (the issue found in) plann, lift the cladav (sic) floor to 3.6, open a PR
The shared search path defined in calendaring-config should be used, we should have no hard-coded search path in the plann library. Open the PR.
(...) I think it should be safe to go ahead and fix calendaring-config


caldav 3.6 reads its config file through calendaring-config, and plann now follows it all the way (python-caldav/caldav#786):

  • Sections may use kind: caldav with plain keys, password_command and password_keyring. plann passes its config file to caldav, which runs a command only from a file nobody else can write to. A failing command skips that section with an error, unless --raise-errors.
  • No hard-coded ~/.config/calendar.conf any more: without -c, plann uses the first file on the shared search path (~/.config/pycal/calendar.yaml first), and CALENDARING_CONFIG_FILE / CALDAV_CONFIG_FILE apply. plann configure creates ~/.config/pycal/calendar.yaml when there is none, or when the file it found is not writable, readable by its owner only.
  • Config errors name the section they come from.

Requires caldav 3.6 and calendaring-config 0.4, neither released yet, so CI stays red until then; the section names also need caldav's section-name-in-errors change.

caldav 3.6 reads the config file through calendaring-config, so a plann
section can use kind: caldav with plain keys, password_command and
password_keyring.  caldav runs a password_command only after checking
the file it came from, so plann now passes its config file along to
extract_conn_params_from_section(), with ~ expanded.  A failing
password_command skips the section with an error message, unless
--raise-errors.  caldav 3.6 is required for that parameter.

python-caldav/caldav#786

Prompt: fix (the issue found in) plann, lift the cladav (sic) floor to 3.6, open a PR

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
plann no longer hard-codes ~/.config/calendar.conf: without -c it uses
the first file on the search path shared with caldav and other tools
(calendaring-config decides it, ~/.config/pycal/calendar.yaml first),
and configure saves at the head of that path when the file it read is
not writable (/etc), creating it readable by its owner only.  The file
is looked up only when it is read, so --help and --skip-config work
whatever CALDAV_CONFIG_FILE says.  Config errors name their section.

python-caldav/caldav#786

Prompt: The shared search path defined in calendaring-config should be used, we should have no hard-coded search path in the plann library.  Open the PR.
Followup-Prompt: (...) I think it should be safe to go ahead and fix calendaring-config [the section names in errors were added by a parallel session, from a review finding]

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
@tobixen tobixen changed the title feat: password_command in config, caldav 3.6 Read the config file as caldav 3.6 does Oct 20, 2026
tobixen added a commit to python-caldav/caldav that referenced this pull request Oct 20, 2026
#809 gave
extract_conn_params_from_section() its section_name, and plann passes
it in PyCalendar/plann#81, so nothing is left
of the entry.

Prompt: [fix issues found during the review process of merging #808]

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant