Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ 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)

- Upgraded Python version constraint from 3.10 to 3.12.
[#41](https://github.com/pyodide/pyodide-lock/pull/41)

## [0.1.2] - 2026-02-27

- Added `UvPipCompile` compile class for experimental support for constructing
lock files using `uv pip compile`.
[#40](https://github.com/pyodide/pyodide-lock/pull/40)

## [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
7 changes: 1 addition & 6 deletions pyodide_lock/uv_pip_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import os
import shutil
import sys
import sysconfig
import tomllib
from logging import DEBUG
from pathlib import Path
from pprint import pformat
Expand All @@ -23,11 +23,6 @@
from .spec import PackageSpec, PyodideLockSpec
from .utils import add_wheels_to_spec, logger

if sys.version_info >= (3, 11): # pragma: no cover
import tomllib
else: # pragma: no cover
import tomli as tomllib

if TYPE_CHECKING:
from collections.abc import Iterator

Expand Down
3 changes: 2 additions & 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 Expand Up @@ -39,6 +39,7 @@ wheel = [
]
dev = [
"build",
"setuptools",
"click",
"pytest-cov",
"pytest",
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