From fc105d091793c5eccdd215ffa4938b572389c237 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 08:33:26 +0000 Subject: [PATCH 1/3] Initial plan From befb9f7cbfc4b1edbc4cfdccaed1ded2e726fd27 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 08:39:06 +0000 Subject: [PATCH 2/3] Refine VCS URL install error wording Agent-Logs-Url: https://github.com/pyodide/micropip/sessions/7f9aac28-3469-452c-8eed-1637470589ce Co-authored-by: ryanking13 <24893111+ryanking13@users.noreply.github.com> --- micropip/transaction.py | 4 ++-- tests/test_transaction.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/micropip/transaction.py b/micropip/transaction.py index d59a725..2fec542 100644 --- a/micropip/transaction.py +++ b/micropip/transaction.py @@ -87,8 +87,8 @@ async def add_requirement(self, req: str | Requirement) -> None: raise ValueError( f"Cannot install {req!r}: micropip only installs prebuilt wheels " "and does not support installing from a VCS URL " - "(git+, hg+, svn+, bzr+). Provide a wheel URL or a package name " - "available on a configured index." + "(git+, hg+, svn+, bzr+). Provide a URL pointing to a wheel " + "or a package name available on a configured index." ) try: diff --git a/tests/test_transaction.py b/tests/test_transaction.py index e6ba581..431ddb5 100644 --- a/tests/test_transaction.py +++ b/tests/test_transaction.py @@ -169,8 +169,12 @@ async def test_add_requirement_vcs_url_helpful_error(url, host_compat_layer): from micropip.transaction import Transaction transaction = create_transaction(Transaction, host_compat_layer) - with pytest.raises(ValueError, match="does not support installing from a VCS URL"): + with pytest.raises(ValueError) as exc_info: await transaction.add_requirement(url) + assert ( + "Provide a URL pointing to a wheel or a package name available on a configured index." + in str(exc_info.value) + ) def _pypi_metadata(package, versions_to_tags): From 3c8073c55f1fea246386913fa78965f19eedf37f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 08:56:46 +0000 Subject: [PATCH 3/3] Fix changelog PR reference for VCS URL entry Agent-Logs-Url: https://github.com/pyodide/micropip/sessions/105b7d74-8c93-40c1-88b2-4b092d0fc14d Co-authored-by: ryanking13 <24893111+ryanking13@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c83e466..5bf962d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `install` now raises a helpful `ValueError` when given a VCS URL (`git+`, `hg+`, `svn+`, `bzr+`) instead of an opaque parser error, explaining that micropip only installs prebuilt wheels. - [#77](https://github.com/pyodide/micropip/issues/77) + [#277](https://github.com/pyodide/micropip/pull/277) ## [0.11.1] - 2026/04/02