Skip to content

fix(build): use an sdist allowlist so the zarr sdist stops shipping subpackages - #4261

Merged
d-v-b merged 3 commits into
zarr-developers:mainfrom
d-v-b:claude/zarr-sdist-allowlist-414698
Aug 13, 2026
Merged

fix(build): use an sdist allowlist so the zarr sdist stops shipping subpackages#4261
d-v-b merged 3 commits into
zarr-developers:mainfrom
d-v-b:claude/zarr-sdist-allowlist-414698

Conversation

@d-v-b

@d-v-b d-v-b commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

This is an AI-written PR that changes our sdist contents from blocklist-defined to allowlist-defined. That keeps new stuff out by default, which is easier when we are adding new subpackages. Without changing something we are bundling the contents of packages/ in the sdist, which is not correct. If we add each subpackage to the blocklist, we have an unsafe default. Better to have the safe default, where new subpackages don't need to be explicitly excluded.

This change does raise the possibility that we add a new file or path that is required for sdist consumers like conda, but we forget to add it to the allowlist. We should consider addressing this in CI with some kind of "conda can consume this" check, and/or normalize release candidate releases (not sure if conda forge picks those up).

This was written by claude, and the original PR is here: d-v-b#289

Author attestation

  • I am a human, these are my changes, and I have reviewed and understood every change and can explain why each is correct.

TODO

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions Bot added the needs release notes Automatically applied to PRs which haven't added release notes label Aug 13, 2026
@d-v-b
d-v-b marked this pull request as ready for review August 13, 2026 10:36
@d-v-b

d-v-b commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

This change does raise the possibility that we add a new file or path that is required for sdist consumers like conda, but we forget to add it to the allowlist. We should consider addressing this in CI with some kind of "conda can consume this" check, and/or normalize release candidate releases (not sure if conda forge picks those up).

I will try to address that concern in this PR with some new CI jobs.

@github-actions github-actions Bot removed the needs release notes Automatically applied to PRs which haven't added release notes label Aug 13, 2026
…ubpackages

The root sdist config was a blocklist naming /.github, /bench and /docs, so
every release shipped whatever else happened to sit in the repository root.
That included the whole packages/ tree — the zarr-indexing, zarr-metadata and
zarr-http-server sources, which are released as their own distributions — plus
ci/, design/, towncrier fragments and other repo furniture. 2.9M of the 1.4M
sdist was other people's packages.

Replace it with an explicit allowlist, matching what packages/zarr-indexing and
packages/zarr-metadata already do.

Including /docs also fixes a second problem: tests/test_docs.py walks docs/ and
testpaths collects docs/user-guide, so with docs/ excluded the shipped test
suite died at collection with 'Not a file or directory'. tests/test_docs.py now
runs green from an unpacked sdist (61 passed, 2 skipped), and full collection
finds 7581 tests with no errors.

Assisted-by: ClaudeCode:claude-opus-5
d-v-b added 2 commits August 13, 2026 15:53
Drop the narration of the blocklist this replaced -- that history lives in
git -- and keep only the durable rationale and the reason each entry is on
the list.

Assisted-by: ClaudeCode:claude-opus-5
@d-v-b

d-v-b commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

I'm self-merging this, because IMO it's a release blocker and we can always revisit the particulars later.

@d-v-b
d-v-b merged commit 9fd669f into zarr-developers:main Aug 13, 2026
30 checks passed
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