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

Principal.calendar_home_set and get_calendars() disagree on where calendars live without a calendar-home-set

Cerrado
#749 0 comentarios 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Read Principal.calendar_home_set in caldav/collection.py alongside BaseDAVClient._calendar_home_urls() and trace how Principal.calendar(), make_calendar(), and _async_get_calendar_home_set() use the property. Check the iCloud host-switching behavior in the setter and run the GMX-related tests to compare discovery and calendar creation paths. Done means both paths use the same fallback order and synchronous and asynchronous behavior remain consistent.

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

Descripción

Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5 (Claude Code) while reviewing https://github.com/python-caldav/caldav/pull/744, from the prompts:

Look into #744
Rebase and fix issues


On a server that advertises no calendar-home-set, the two discovery paths look in different places:

  • client.get_calendars() / Principal.get_calendars() (BaseDAVClient._calendar_home_urls()) search the principal URL first (the GMX fallback), and since https://github.com/python-caldav/caldav/pull/744 the client URL only when the principal holds no calendars.
  • Principal.calendar_home_set (caldav/collection.py, the setter) falls back to client.url: URL.objectify(None) is None, and client.url.join(None) is the client URL. Principal.calendar(name=..., cal_id=...), Principal.make_calendar() and their async twins go through this property.

So on GMX-like servers principal.get_calendars() can list calendars that principal.calendar(cal_id=...) will not resolve against the same base, and make_calendar() creates below the client URL rather than below the principal where the calendars were found. The inconsistency predates PR 744 - the GMX fallback in get_calendars() was added without touching the property.

Possible fix: have Principal.calendar_home_set use the same fallback order as _calendar_home_urls() (principal URL, then client URL), sharing the logic rather than duplicating it. Needs care for the async lazy path (_async_get_calendar_home_set()) and the icloud host-switching side effect in the setter.

(It's needed to get tests working under GMX again to see how it behaves)

Lenguaje dominante
Python
Estrellas
412
Forks
113
Merge medio
10 h 29 min
PR fusionados (30 d)
57

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.