Skip to content

Commit

Permalink
Fix regression in loading package from local filesystem in Node (#155)
Browse files Browse the repository at this point in the history
* Allow file protocol

* Run node in ci

* Update CHANGELOG.md
  • Loading branch information
ryanking13 authored Nov 11, 2024
1 parent 88669c8 commit 1fa0b52
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
test-config: [
# FIXME: recent version of chrome gets timeout
{runner: selenium, runtime: chrome, runtime-version: "125" },
{runner: selenium, runtime: node, runtime-version: "22" },
]

steps:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.1] - 2024/11/11

### Fixed

- Fixed bug that prevented package installation from `file:` path in Node.js environment.
[#155](https://github.com/pyodide/micropip/pull/155)

## [0.7.0] - 2024/11/09

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion micropip/wheelinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def requires(self, extras: set[str]) -> list[Requirement]:
return requires

async def _fetch_bytes(self, fetch_kwargs: dict[str, Any]):
if self.parsed_url.scheme not in ("https", "http", "emfs"):
if self.parsed_url.scheme not in ("https", "http", "emfs", "file"):
# Don't raise ValueError it gets swallowed
raise TypeError(
f"Cannot download from a non-remote location: {self.url!r} ({self.parsed_url!r})"
Expand Down

0 comments on commit 1fa0b52

Please sign in to comment.