Skip to content

feat(standards): cut python-tooling 1.18 for the three adoption reports - #225

Merged
chrisdpurcell merged 1 commit into
testingfrom
pt118
Sep 1, 2026
Merged

chrisdpurcell merged 1 commit into
testingfrom
pt118

Conversation

@chrisdpurcell

Copy link
Copy Markdown
Collaborator

Summary

python-tooling 1.18 (1.17 retained, byte-immutable) for the three adoption reports:

  • [adoption] python-tooling build_backend="none" still requires a [project] table for the required uv lock/gate #204adopt.md no longer claims build_backend = "none" needs no [project] table (uv refuses any pyproject.toml without one; [project] without [build-system] is source = { virtual = "." }). _metadata_findings drops the build_backend == "none" short-circuit so PT-PROJECT-METADATA fires for every adoption; the hint no longer tells the blocked adopter to select the very option that used to skip the check. Migration note in the family README, adopt.md, and the CHANGELOG Changed entry: affected repositories were already failing at uv lock, the finding now names it up front.
  • [adoption] explicit source_layout provides no import-path wiring guidance for subproject packages #205 — the source_layout = "explicit" troubleshooting row states that declared roots feed checker/Ruff/coverage/pytest scopes without making a subproject importable, and gives both fixes (pythonpath in [tool.pytest.ini_options] for pytest only; uv workspace member + additional_dev_dependencies for every uv run). additional_dev_dependencies gains explanatory prose.
  • [adoption] managed pytest config has no pass-through for pytest-asyncio ini settings, breaking subproject async tests #206 — any [tool.pytest.ini_options] key outside the package-owned minversion/testpaths/addopts/markers is consumer-owned and may be written straight into the managed table; install its plugin via additional_dev_dependencies first, or --strict-config reports ERROR: Unknown config option: asyncio_mode. Confirmed end-to-end in a live consumer repro (keys survive reconcile --apply, validate, and an option change that rewrites the same table).
  • Provider contract hygiene: a non-string additional_dev_dependencies entry now raises the bounded ValueError naming the option instead of a raw TypeError (PEP 508 bounds like >=1.0,<2 still render).

Wiring: standard.toml, catalogs/5.toml (1.18 default), standards/catalog.md, projection, family-root and README pins, _BASELINE_REFv5.27.0, CHANGELOG [Unreleased]. Tests: test_python_tooling_1_18.py (17 rows, including a permanent control row that reproduces #204 against 1.17), retained flip in _1_17.py.

Rebased onto testing after markdown-tooling 1.16 landed; the two textual conflicts (CHANGELOG sections, README pin table) were resolved keep-both by the orchestrator and re-verified.

Governing work

Final: #204

#205 and #206 ship in the same cut and are closed separately with this PR as their evidence.

Acceptance coverage

Verification

  • check-release --baseline v5.27.0 --json → only PC-RELEASE-PROJECTION (mid-train by design); classify_catalog_diff(v5.27.0 → tree, 5.27.0→5.28.0)minor, no findings.
  • validate-packages, validate-graph, render-catalog --check, sync-payload-projection --check → OK; ruff format/check → 0; rexec -- uv run basedpyright → 0.
  • Remote 5-file pytest → 138 passed, 4 failed → 2 fixed in-leg, 2 are the .standards/catalog.toml staleness class; full tests/package_contract → 1755 passed, 21 failed = those 2 + 19 worker npm ci provisioning.
  • Orchestrator, after the rebase, rebuilt the candidate wheel in the leg worktree and ran test_python_tooling_1_18.py, _1_17.py, test_python_tooling_reconstruction.py, test_repository_hygiene.py, test_catalog_roles.py → 133 passed; render-catalog / projection / validate-packages OK on the rebased tree.

Three adopters hit python-tooling 1.17 in the same week. All three fixes land in
1.18; 1.17's bytes are frozen at the v5.27.0 tag.

  1.17's adopt.md said a deliberately non-installable repository "needs no
  [project] table" two lines above the PT-PROJECT-METADATA block that exists
  because the required `uv lock` cannot read such a file, and _metadata_findings
  short-circuited to no findings whenever that backend was selected. uv refuses
  any pyproject.toml with no [project] table whatever the backend, and classifies
  [project] without [build-system] as source = { virtual = "." }. The
  short-circuit is gone, the guide is corrected, and the finding's own hint no
  longer offers `build_backend = "none"` as a way out — from 1.18 it is not one.
  The message drops its "installable adoption" framing for uv-resolvability,
  which is what the guard has always actually enforced.

  This tightens behavior for an existing `none` consumer with no [project]. That
  repository was already failing at `uv lock`, so the finding surfaces an
  existing failure at reconcile --check rather than breaking a working adoption.
  The migration note is in the family README, the versioned README, adopt.md, and
  the CHANGELOG.

  Declared roots feed checker, Ruff, coverage, and pytest scopes; none of them
  makes a package under a subproject importable, so conftest still fails with
  ModuleNotFoundError. A new troubleshooting row gives both fixes and what each
  covers: pythonpath written into [tool.pytest.ini_options] (pytest only), or a
  uv workspace member plus additional_dev_dependencies (every uv run). That
  option also gained the explanatory prose it never had.

  Only minversion, testpaths, addopts, and markers are package-owned in
  [tool.pytest.ini_options]; every other key there is consumer-owned and survives
  reconcile, apply, validate, and an option change that rewrites an owned key in
  the same table. The new row says so and quotes the ordering trap verbatim:
  while the plugin is absent, the package-owned --strict-config aborts with
  `ERROR: Unknown config option: asyncio_mode`, collected 0 items, exit 4 — a
  message naming neither the flag nor the plugin. Core keys like pythonpath are
  exempt. No generic passthrough and no per-plugin option, per the rejected
  alternatives on record.

Also bounded: additional_dev_dependencies entries are checked for stringness
before _dependency_name's re.split reaches them, so a bad entry raises the
provider's ValueError rather than a raw TypeError. It cannot route through
_string_list like its siblings, because that helper rejects `<` and `>` and both
are ordinary characters in a PEP 508 requirement.

No option, unit identity, or rendered byte moves, so no migration edge is
declared. test_python_tooling_1_17.py keeps only what a retired version can still
prove; its family-root navigation row is dropped for the same reason the 1.16 and
1.15 rows were at the previous cut. _BASELINE_REF advances to v5.27.0, which its
own comment requires of the activation commit.

Refs #204, #205, #206
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