Consolidate scripts at the repo root#936
Merged
Kludex merged 3 commits intoMay 14, 2026
Merged
Conversation
`scripts/unasync.py` still referenced upstream `encode/httpcore`'s
paths (`httpcore/_async`, `httpcore/_sync` and `tests/_async`,
`tests/_sync`). In this fork the package directories are
`httpcore2/_async` and `httpcore2/_sync`, and the test trees live
at the repo root in `tests/httpcore2/_{async,sync}/` rather than
under `src/httpcore2/tests/`.
With the stale paths, `os.walk` finds nothing, no substitutions
ever fire, and `scripts/unasync.py --check` exits 1 with "These
patterns were not used" — meaning `src/httpcore2/scripts/check`
has been silently failing on `main` since the fork, but nothing
in top-level CI invokes it so the breakage went unnoticed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move unasync.py and benchmark from src/httpcore2/scripts/ to the
top-level scripts/ directory and drop the rest of the inner scripts.
- scripts/unasync.py: paths repointed to repo-root-relative
(src/httpcore2/httpcore2/_{async,sync} and tests/httpcore2/_{async,sync}).
- scripts/check: now runs `python scripts/unasync.py --check`.
- scripts/lint: now runs `python scripts/unasync.py` after ruff.
- scripts/benchmark: switched to `uv run python` and the
tests/httpcore2/benchmark/ paths used in this fork.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/httpcore2/scripts/unasync.pystill references upstreamencode/httpcore's directory paths (httpcore/_async,httpcore/_sync,tests/_async,tests/_sync). In this fork the package ishttpcore2/and the test tree lives attests/httpcore2/_{async,sync}/(relative to the repo root, i.e.../../tests/httpcore2/_{async,sync}/fromsrc/httpcore2/).os.walkfinds nothing, no substitutions ever fire, andpython scripts/unasync.py --checkexits 1 with "These patterns were not used" — meaningsrc/httpcore2/scripts/checkhas been silently broken onmainsince the fork. Top-level CI didn't catch this becausescripts/checkat the repo root doesn't invoke the per-package check.main()inunasync.pypointing it at the correct trees.Test plan
cd src/httpcore2 && python scripts/unasync.py --checkexits 0 onmainafter this change (was exit 1 before).cd src/httpcore2 && python scripts/unasync.py(regen) produces zero file diffs againstmain, confirming the existing_sync/trees are already consistent with their_async/sources — this is purely fixing the tooling, no code drift to clean up.🤖 Generated with Claude Code