Skip to content

Rename package from httpcore to httpcore2 - #138

Merged
Kludex merged 1 commit into
masterfrom
rename-httpcore-to-httpcore2
May 11, 2026
Merged

Rename package from httpcore to httpcore2#138
Kludex merged 1 commit into
masterfrom
rename-httpcore-to-httpcore2

Conversation

@Kludex

@Kludex Kludex commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

Renames the workspace-vendored httpcore to httpcore2, mirroring the earlier httpx -> httpx2 rename.

Changes:

  • src/httpcore/ -> src/httpcore2/, and the inner httpcore/ package -> httpcore2/.
  • All import httpcore / from httpcore / httpcore.X references rewritten to httpcore2 in workspace source, tests, and httpx2 callers.
  • src/httpcore2/pyproject.toml: name = "httpcore2", version path, sdist include, coverage include, ruff exclude.
  • Root pyproject.toml: dependencies and dev group now reference httpcore2; workspace member + source point to src/httpcore2.

Upstream docs/URLs/README/CHANGELOG branding left as-is (import-name-only rename).

Test plan

  • uv lock resolves clean (httpcore removed, httpcore2 added).
  • uv sync builds both editables.
  • import httpcore -> ModuleNotFoundError; import httpcore2 works.
  • scripts/lint, scripts/check pass.
  • uv run pytest -> 1417 passed, 1 skipped, 0 failed.
  • CI green on all Python versions.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.

@Kludex
Kludex enabled auto-merge (squash) May 11, 2026 09:17
@Kludex
Kludex merged commit ce6ebe2 into master May 11, 2026
9 checks passed
@Kludex
Kludex deleted the rename-httpcore-to-httpcore2 branch May 11, 2026 09:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃挕 Codex Review

unasync_dir("httpcore/_async", "httpcore/_sync", check_only=check_only)

P1 Badge Point unasync at the renamed package directory

After moving the package to httpcore2/, this still walks httpcore/_async, which no longer exists under src/httpcore2. As a result, the script stops validating/regenerating the package sync code and (in --check mode) exits non-zero because substitutions remain unused; this breaks the scripts/check step used by src/httpcore2/.github/workflows/test-suite.yml.


export SOURCE_FILES="httpcore tests"

P1 Badge Run lint/check against the renamed source package

SOURCE_FILES still references httpcore, but the repository now contains httpcore2 in this subtree. That means scripts/check and scripts/lint no longer target the actual package code (and can fail on missing paths), which breaks the quality gate invoked by src/httpcore2/.github/workflows/test-suite.yml.


VERSION_FILE="httpcore/__init__.py"

P1 Badge Read version from the renamed package path in publish

The publish script still reads httpcore/__init__.py for the version, but that file no longer exists after the rename. In tagged CI runs, scripts/publish (called by src/httpcore2/.github/workflows/publish.yml) will fail before upload because the version grep targets a missing file.

鈩癸笍 About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 馃憤.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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