Skip to content

Fix pipx.util import cycle#1831

Merged
gaborbernat merged 2 commits into
pypa:mainfrom
marko1olo:fix-util-circular-import
Jun 17, 2026
Merged

Fix pipx.util import cycle#1831
gaborbernat merged 2 commits into
pypa:mainfrom
marko1olo:fix-util-circular-import

Conversation

@marko1olo

Copy link
Copy Markdown
Contributor

Fixes #1333.

What changed

  • Move pipx_wrap into dependency-light pipx.wrap.
  • Keep pipx.util.pipx_wrap available by importing/re-exporting it from pipx.util.
  • Add import-order regression coverage and changelog fragment.

Verification

  • $env:PYTHONPATH='src'; .venv\Scripts\python.exe -m pytest tests\test_imports.py tests\test_util.py --net-pypiserver -q
  • .venv\Scripts\python.exe -m ruff check src\pipx\wrap.py src\pipx\util.py src\pipx\paths.py tests\test_imports.py
  • .venv\Scripts\python.exe -m ruff format --check src\pipx\wrap.py src\pipx\util.py src\pipx\paths.py tests\test_imports.py
  • .venv\Scripts\python.exe -B -m py_compile src\pipx\wrap.py src\pipx\util.py src\pipx\paths.py tests\test_imports.py
  • git diff --check origin/main...HEAD

@gaborbernat gaborbernat enabled auto-merge (squash) June 17, 2026 16:06
@gaborbernat gaborbernat force-pushed the fix-util-circular-import branch from dcf8b5e to 069bdc4 Compare June 17, 2026 18:45
@gaborbernat gaborbernat merged commit 80e531e into pypa:main Jun 17, 2026
12 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.

pipx.util circular import

2 participants