Split the test-server framework out into its own distribution?

未关闭
#823 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

Read the test-server framework under caldav.testing, caldav/config.py, and docs/design/TODO.md, then inspect how distributions and package data are built. Decide whether the testing feature can be split cleanly while staying in lockstep with caldav; the issue lists version skew, the config integration, and release upkeep as open design questions. Done means a settled distribution boundary and release plan.

由索引模型根据 Issue 内容生成。

描述

Human-written issue text:

There is a legitimate need for testing other packages (like plann, calendar-cli, calendaring, calendaring-sync) towards a wide range of test servers. I'm currently working on exporting the test server registry logic out as a public part of the caldav package. Arguably it would better belong in a separate package. As for now the costs of spawning Yet Another Package have been considered bigger than the costs of adding some few kilobytes of pure-python-logic that ordinary users of the caldav package do not need, but I still think it's That's the Way.

Text below the line was generated by Claude Opus 5.5.


The fix for https://github.com/python-caldav/caldav/issues/817 moves the test-server framework into the installed package as caldav.testing. That covers the registry, the config loader, the session locks and the embedded, Docker and external server classes. Ordinary users of caldav never need any of it, so it could live in a dev-only distribution instead, say caldav-test-servers.

For a split:

  • The wheel carries only what library users need.
  • A separate wheel could ship tests/docker-test-servers/ as package data. That would remove the CALDAV_DOCKER_TEST_SERVERS_DIR workaround. It would also stop an installed caldav from looking for a checkout's tests/ directory inside site-packages (see docs/design/TODO.md).

Against, or at least things to settle first:

  • The split is not clean. get_davclient() with PYTHON_CALDAV_USE_TEST_SERVER=1 lives in caldav/config.py, and it uses the registry and the embedded servers. One option is to move that feature out too. The other is an optional import of the new package from caldav. config.py already has a TODO that calls this test tooling, not config.
  • Version skew. caldav/testing/docker.py imports caldav.compatibility_hints, and the server classes carry feature hints that change with most releases. A test-server package released on its own schedule would drift out of step, which is the breakage #817 was about.
  • The cost of keeping it is small. It is pure Python and imported lazily: import caldav does not load caldav.testing, and requests/yaml are only imported when it is used.
  • Upkeep. It means another PyPI project, another CI job and another release step.
  • An existing home. caldav-server-tester is already a separate, dev-only caldav package. It is a different tool, but it is a candidate home.

Suggested shape, if done: build a second distribution from this repository, released in lockstep with caldav (caldav-test-servers==X requiring caldav==X). It would hold today's caldav.testing plus the compose files as package data. caldav.testing would remain as a thin import shim with a deprecation warning, for one release cycle.

No rush: the in-package version works, and this can wait until there is a reason to touch it.

主要语言
Python
星标
412
派生
113
平均合并
8 小时 43 分钟
30 天内合并 PR
74

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

python-caldav/caldav 的其他 Issue

查看 python-caldav/caldav 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。