Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Use the shared calendaring-config parser for the configuration file

Abierto
#786 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, yaml
Área
backend

Línea de trabajo

Start with caldav/config.py and the read_config, expand_config_section, config_section, expand_env_vars, get_connection_params, and get_all_file_connection_params entry points; compare the shared parser’s behavior with docs/format.md in calendaring-config. Decide how to handle each listed behavior change, then route CalDAV sections through the shared parser while retaining test-server handling, features resolution, and CONNKEYS filtering. Done means caldav supports the agreed format and existing configuration behavior changes have explicit decisions; the issue names no tests to run.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Human-written summary

The configuration file is to be used by the new calendaring package - it's aiming to be a general API for any calendar and task system, even including locally stored ics-files. The format will be expanded to support this, and caldav will no longer be the natural home for this logic. It would also break as caldav is supposed to be an optional dependency of calendaring. Moving the logic to calendaring would also be difficult, then the caldav library would depend on calendaring, which could cause a circular dependency.

Details written by Claude Opus 5.5

caldav's configuration file (caldav/config.py) is shared with plann, and is now meant to be shared with calendaring and calendaring-jmap as well: one file describing a CalDAV server, a JMAP account, a directory of .ics files and a GitHub repository. The format was agreed in https://github.com/pycalendar/calendaring/pull/6 and is now specified, and parsed, in a package of its own: https://github.com/pycalendar/calendaring-config (docs/format.md). calendaring reads the file through it.

Until caldav reads the file through that package too, plann and caldav users don't get the new parts of the format:

  • kind: sections with unprefixed keys (kind: caldav, url:, username:). caldav ignores them today, so a user who wants plann to see a server keeps that section in the old caldav_* style.
  • secrets from a command or the system keyring: password_command: [pass, show, dav/work], password_keyring: work, and their caldav_ spellings. caldav keeps only the keys in CONNKEYS, so today caldav_password_command is dropped silently, and caldav connects without a password.
  • ~/.config/pycal/calendar.yaml as the first place searched, with caldav's current paths as fallbacks.
  • the environment applied key by key. Today any one CALDAV_* connection variable replaces the whole file: a user who sets only CALDAV_PASSWORD, to keep the password out of the file, gets {'password': …} and no URL. That is a bug either way.
  • refusing inherits across kinds.

The YAML loader is fixed separately, in https://github.com/python-caldav/caldav/pull/785.

What adopting it would mean
  • caldav depends on calendaring-config. It is small: PyYAML, plus keyring as an extra.
  • read_config, expand_config_section, config_section and expand_env_vars become thin wrappers, or deprecated aliases, around the package. plann imports some of them.
  • get_connection_params and get_all_file_connection_params take the CalDAV sections from calendaring_config.load(), and skip the other kinds.
  • Test-server handling, features resolution and CONNKEYS filtering stay in caldav.
Behaviour that changes for existing files

calendaring-config's docs/format.md lists these differences:

  • an empty file found first is used, and no longer skipped in favour of the next path;
  • a name in contains that matches nothing gives a warning;
  • a glob that matches nothing is an error, and so is a section named directly that is missing or disabled (an implicit default that is missing still means "no configuration");
  • a disabled meta-section is left out together with its members;
  • * expands to the leaf sections only;
  • the environment variables listed in the spec are fewer than every CALDAV_<CONNKEY>.

Each of these needs a decision: accept it, or change the spec. For a 3.x release, possibly behind a deprecation period.

Lenguaje dominante
Python
Estrellas
412
Forks
113
Merge medio
11 h 37 min
PR fusionados (30 d)
50

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python-caldav/caldav

Todos los issues de python-caldav/caldav

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.