Skip to content

chore: remove python-pydantic and python-pydantic-core from the factory - #244

Merged
hanthor merged 1 commit into
mainfrom
chore/remove-python-pydantic
Sep 24, 2026
Merged

hanthor merged 1 commit into
mainfrom
chore/remove-python-pydantic

Conversation

@hanthor

@hanthor hanthor commented Sep 24, 2026

Copy link
Copy Markdown
Member

Why

Neither package is in Utah's image closure. Nothing requires python3-pydantic in projectbluefin/utah packages/utah.toml / packages/bluefin.toml, in config/bluefin-packages.toml, or in any factory recipe. In Fedora, the only consumer of python3-pydantic-core is python3-pydantic. Both came in with the first closure wave (48bb840), and neither has ever built here:

  • python-pydantic-core is a Rust extension that BuildRequires crate(ahash/default) and other crates. Fedora 44 and Hummingbird ship no Rust crate RPMs (Utah documents the same limit for fish), so builddep cannot be satisfied (job 107527896049, run 35966980787).
  • python-pydantic then fails builddep because pydantic-core is missing (runs 35966980787, 36032253217).

Publication is atomic, so these two packages that Utah does not use were holding back every package it does use (wpa_supplicant, fprintd, cups-filters, ...).

What

Removed per docs/contributing.md "Removing a package":

  • config/upstream-sources.json entries
  • .packit.yaml blocks
  • packages/python-pydantic/, packages/python-pydantic-core/
  • Count assertions 373 -> 371 (372 -> 370 in test_source_inventory.py, which excludes Hummingbird-supplied mesa), stage count 72 -> 70, and the counts in docs/architecture.md.

The "Removing a package" section now names the four test files that hold a count, because test_source_inventory.py was easy to miss.

python-typing-inspection and python-annotated-types were also imported for pydantic. They build cleanly, so they are left alone.

Coordination: #239 bumps the same counts 373 -> 374. Whichever PR lands second gets rebased.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv

Neither is in Utah's image closure: nothing in projectbluefin/utah
packages/utah.toml or packages/bluefin.toml, config/bluefin-packages.toml,
or any factory recipe requires python3-pydantic, and in Fedora the only
consumer of python3-pydantic-core is python3-pydantic itself. They came in
with the first closure wave (48bb840) and have never built here:

- python-pydantic-core is a Rust extension whose BuildRequires are
  crate(ahash/default) and friends. Fedora 44 and Hummingbird ship no Rust
  crate RPMs (the same reason Utah documents for fish), so builddep cannot
  be satisfied (run 35966980787).
- python-pydantic then fails builddep for want of pydantic-core
  (runs 35966980787, 36032253217).

Because publication is atomic, two packages Utah does not use were holding
back every package it does. Removed per docs/contributing.md "Removing a
package": config/upstream-sources.json, .packit.yaml, packages/<name>/, and
the count assertions (373 -> 371). The contributing guide now names the
four test files that carry a count.

python-typing-inspection and python-annotated-types were imported for
pydantic too, but they build cleanly and are left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv
@hanthor
hanthor merged commit 41f2e88 into main Sep 24, 2026
3 checks passed
hanthor added a commit that referenced this pull request Sep 25, 2026
…ates (#248)

* Revert "chore: remove python-pydantic and python-pydantic-core from the factory (#244)"

This reverts commit 41f2e88.

* fix: restore python-pydantic and build pydantic-core from vendored crates

Reverts #244. input-remapper is in the consumer contract
(config/bluefin-packages.toml) and requires python3dist(pydantic) at
runtime, so publish in run 36073571248 failed on
  nothing provides python3.14dist(pydantic) needed by input-remapper
#244 had checked only BuildRequires and Utah's manifests.

pydantic-core never built because Fedora's recipe takes every Rust crate as
a system RPM through %cargo_generate_buildrequires, and Fedora 44 and
Hummingbird ship none of them. Build it vendored instead:

- tools/generated_sources.py gains a python-pydantic-core generator: the
  sha512-pinned PyPI sdist plus vendor/<crate>-<version> for every crate its
  Cargo.lock pins, each download checked against the Cargo.lock SHA-256,
  with .cargo-checksum.json as cargo vendor writes it. Stdlib only, no
  cargo needed; two runs give identical bytes (sha512 b20f43b5...).
- The lock entry becomes a generate entry; `sources` is repinned.
- The spec uses %cargo_prep -v vendor, drops %cargo_generate_buildrequires,
  writes %cargo_vendor_manifest, and drops Fedora's two Cargo.toml patches
  (jiter range, PyO3 0.29) that only exist to match Fedora's crate RPMs;
  the lockfile's PyO3 0.28.3 supports Python 3.14.

Verified in fedora:44 + Hummingbird (cargo 1.98.1, Python 3.14.7):
`cargo check --offline --locked --release` against the vendored tree
succeeds, and tools/source_pipeline.py accepts the generated source.

docs/contributing.md now says to check the runtime closure of the consumer
contract before removing a package as unneeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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