Skip to content

Commit 83983da

Browse files
authored
Fix regression when deps=False is set (#187)
* Fix regression when deps=False is set * lint [integration] * [integration] * fix error type [integration] * changelog * versino [integration] * Use other package * [integration]
1 parent 27791c1 commit 83983da

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
(the ones that starts with `../` or `./`)
1313
[#174](https://github.com/pyodide/micropip/pull/174)
1414

15+
- Fixed an error when calling `micropip.install` with `deps=False` is set.
16+
[#187](https://github.com/pyodide/micropip/pull/187)
17+
1518
### Added
1619

1720
- `micropip` now vendors `pypa/packaging` for better reliability.

micropip/transaction.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ async def add_wheel(
268268
else:
269269
await wheel_download_task
270270
await self.gather_requirements(wheel.requires(extras))
271+
else:
272+
await wheel_download_task
271273

272274
self.wheels.append(wheel)
273275

tests/integration/test_integration.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,25 @@ async def _run(selenium):
3333
_run(selenium_standalone_micropip)
3434

3535

36+
@integration_test_only
37+
def test_integration_install_no_deps(selenium_standalone_micropip, pytestconfig):
38+
@run_in_pyodide
39+
async def _run(selenium):
40+
import micropip
41+
42+
await micropip.install("pyodide-micropip-test", deps=False)
43+
44+
try:
45+
# pyodide-micropip-test depends on snowballstemmer
46+
import snowballstemmer # noqa: F401
47+
except ModuleNotFoundError:
48+
pass
49+
else:
50+
raise Exception("Should raise!")
51+
52+
_run(selenium_standalone_micropip)
53+
54+
3655
@integration_test_only
3756
def test_integration_list_basic(selenium_standalone_micropip, pytestconfig):
3857
@run_in_pyodide

0 commit comments

Comments
 (0)