Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [0.1.3] - 2026-04-21
Comment thread
ryanking13 marked this conversation as resolved.

### Changed

- Removed `version` field from `info` section in lock file.
This field have been used to specify the Pyodide version used to create the lockfile,
but lockfile does not need to be bound to a specific Pyodide version.
If you need to check the compatibility between the lockfile and Pyodide,
you can use the `abi_version` field in the `info` section instead.
[#41](https://github.com/pyodide/pyodide-lock/pull/41)

## [0.1.1] - 2026-01-02

Dropped `typer` dependency for CLI.
Expand Down
3 changes: 2 additions & 1 deletion pyodide_lock/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
class InfoSpec(BaseModel):
arch: Literal["wasm32", "wasm64"] = "wasm32"
platform: str
version: str
# This field is deprecated and will not be included in the output
version: str = Field(default="0.0.0", exclude=True)
python: str
abi_version: str | None = None
model_config = ConfigDict(extra="forbid")
Expand Down
5 changes: 4 additions & 1 deletion pyodide_lock/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ def _generate_package_hash(full_path: Path) -> str:


def _get_marker_environment(
platform: str, version: str, arch: str, python: str, abi_version: str | None = None
platform: str,
arch: str,
python: str,
**kwargs,
) -> dict[str, str]:
"""
Get the marker environment for this pyodide-lock file. If running
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
]
description = "Tooling to manage the `pyodide-lock.json` file"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.12"
dependencies = [
# compatible with pyodide-build and the as-shipped wheel in the pyodide distribution
"pydantic>=2",
Expand Down
5 changes: 4 additions & 1 deletion tests/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_lock_spec_parsing(pyodide_version, tmp_path):

spec2 = PyodideLockSpec.from_json(target2_path)

assert spec.info == spec2.info
assert spec.info.model_dump() == spec2.info.model_dump()
assert set(spec.packages.keys()) == set(spec2.packages.keys())
for key in spec.packages:
pkg1 = spec.packages[key]
Expand Down Expand Up @@ -113,3 +113,6 @@ def test_exclude_key(example_lock_data):
assert "packages" in dump
for pkg in dump["packages"].values():
assert "shared_library" not in pkg

assert "info" in dump
assert "version" not in dump["info"]
Loading