Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
435dc32
hatch: cli: application: Switch to uv
vpetrigo Jan 9, 2025
fc37df4
tests: Update asserts after switching to uv
vpetrigo Jan 9, 2025
f32f360
hatch: tests: Update uv command search
vpetrigo Jan 11, 2025
376784d
hatch: Update to use find_uv_bin()
vpetrigo Jan 11, 2025
c1f2e75
hatch: Update the implementation to use --python switch
vpetrigo Jan 14, 2025
704f1a2
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Sep 27, 2025
0bafeb0
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Oct 8, 2025
f92ca4d
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Oct 20, 2025
4b05ffe
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 10, 2025
860409b
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 13, 2025
a589528
misc: Remove unused pathlib imports and switch to consistent string q…
vpetrigo Nov 14, 2025
a2898f8
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 15, 2025
8c6ca18
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 16, 2025
a07e787
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 16, 2025
f0f5d75
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 26, 2025
27e9218
tests: Use consistent double-quoted strings in conftest.py
vpetrigo Nov 26, 2025
be65450
tests: Handle commands with "hatchling" in conftest.py mock
vpetrigo Nov 26, 2025
b8296f4
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 26, 2025
cdc789b
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 27, 2025
c4c309d
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Nov 28, 2025
c6f369b
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Dec 2, 2025
eb006d3
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Dec 8, 2025
45b5f7b
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Dec 10, 2025
754c42e
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Dec 10, 2025
126cfe9
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Dec 12, 2025
a746b4f
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Dec 22, 2025
5b81f97
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jan 13, 2026
be4e953
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jan 21, 2026
1a442a1
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jan 26, 2026
4ce8193
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Feb 5, 2026
fadd9ad
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Mar 6, 2026
c815f4e
fix: Make find_uv_bin import lazy
vpetrigo Mar 6, 2026
5d8f927
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Apr 1, 2026
75029a6
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Apr 26, 2026
0e5029f
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo May 7, 2026
db71415
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo May 9, 2026
c7f4f17
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo May 15, 2026
c85ee12
Merge branch 'master' into fix/hardcoded-reliance-on-pip
cjames23 May 19, 2026
bf9b674
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo May 30, 2026
7a2d217
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo May 31, 2026
457c779
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jun 2, 2026
2161e24
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jun 7, 2026
48364dc
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jun 9, 2026
90c99b0
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jun 14, 2026
12e6b1b
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jun 19, 2026
8dde94e
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jun 29, 2026
163be9f
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jul 2, 2026
4311378
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jul 8, 2026
3ba415e
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jul 15, 2026
d905da8
Merge branch 'master' into fix/hardcoded-reliance-on-pip
vpetrigo Jul 18, 2026
a92ce37
Merge branch 'master' into fix/hardcoded-reliance-on-pip
cjames23 Jul 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/hatch/cli/application.py
Comment thread
vpetrigo marked this conversation as resolved.
Comment thread
vpetrigo marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def ensure_plugin_dependencies(self, dependencies: list[Dependency], *, wait_mes
if not dependencies:
return

from uv import find_uv_bin

from hatch.dep.sync import InstalledDistributions
from hatch.env.utils import add_verbosity_flag

Expand All @@ -178,9 +180,10 @@ def ensure_plugin_dependencies(self, dependencies: list[Dependency], *, wait_mes
if distributions.dependencies_in_sync(dependencies):
return

pip_command = [sys.executable, "-u", "-m", "pip"]
uv_bin = find_uv_bin()
pip_command = [uv_bin, "pip"]

pip_command.extend(["install", "--disable-pip-version-check"])
pip_command.extend(["install", "--disable-pip-version-check", "--python", sys.executable])

# Default to -1 verbosity
add_verbosity_flag(pip_command, self.verbosity, adjustment=-1)
Expand Down
10 changes: 10 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,25 @@ def mock_process(command, **kwargs):

@pytest.fixture
def mock_plugin_installation(mocker):
from uv import find_uv_bin

subprocess_run = subprocess.run
mocked_subprocess_run = mocker.MagicMock(returncode=0)

def _mock(command, **kwargs):
if isinstance(command, list):
if any(arg.startswith("hatchling") for arg in command):
return subprocess_run(command, **kwargs)

if command[:5] == [sys.executable, "-u", "-m", "pip", "install"]:
mocked_subprocess_run(command, **kwargs)
return mocked_subprocess_run

uv_bin = find_uv_bin()
if command[:3] == [uv_bin, "pip", "install"]:
mocked_subprocess_run(command, **kwargs)
return mocked_subprocess_run

if command[:3] == [sys.executable, "self", "python-path"]:
return mocker.MagicMock(returncode=0, stdout=sys.executable.encode())

Expand Down
9 changes: 6 additions & 3 deletions tests/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ def get_current_timestamp():


def assert_plugin_installation(subprocess_run, dependencies: list[str], *, verbosity=0, count=1):
from uv import find_uv_bin

uv_bin = find_uv_bin()
command = [
sys.executable,
"-u",
"-m",
uv_bin,
"pip",
"install",
"--disable-pip-version-check",
"--python",
sys.executable,
]
add_verbosity_flag(command, verbosity, adjustment=-1)
command.extend(dependencies)
Expand Down
Loading