From a8bc00d286e3188214bfe613eccd2b8b08656130 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Tue, 21 Apr 2026 14:19:20 +0900 Subject: [PATCH 01/12] Remove version field from lockfile --- pyodide_lock/spec.py | 3 ++- tests/test_spec.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyodide_lock/spec.py b/pyodide_lock/spec.py index 81092d1..a4f6a0e 100644 --- a/pyodide_lock/spec.py +++ b/pyodide_lock/spec.py @@ -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") diff --git a/tests/test_spec.py b/tests/test_spec.py index b16167f..13017e8 100644 --- a/tests/test_spec.py +++ b/tests/test_spec.py @@ -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"] From c2cb5ccc39bc1c037a2eb35932bf791dcebd58ba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 05:20:33 +0000 Subject: [PATCH 02/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_spec.py b/tests/test_spec.py index 13017e8..c35b74f 100644 --- a/tests/test_spec.py +++ b/tests/test_spec.py @@ -113,6 +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"] From a9a362d2716b6421990a61e70b2bfe080221faa6 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Tue, 21 Apr 2026 14:22:01 +0900 Subject: [PATCH 03/12] changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bab48f..1377e24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 + +### 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. From ad1c92074f6d5265557aa011dc75a697b1b99025 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Tue, 21 Apr 2026 14:32:10 +0900 Subject: [PATCH 04/12] Fix tests --- pyodide_lock/utils.py | 2 +- pyproject.toml | 2 +- tests/test_spec.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyodide_lock/utils.py b/pyodide_lock/utils.py index 1cc3c54..cb23013 100644 --- a/pyodide_lock/utils.py +++ b/pyodide_lock/utils.py @@ -103,7 +103,7 @@ 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 diff --git a/pyproject.toml b/pyproject.toml index 78ff34d..306112c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/tests/test_spec.py b/tests/test_spec.py index c35b74f..d89a7eb 100644 --- a/tests/test_spec.py +++ b/tests/test_spec.py @@ -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] From 46a5829251284a76d0d942509875a01b6d06774d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 05:32:51 +0000 Subject: [PATCH 05/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyodide_lock/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyodide_lock/utils.py b/pyodide_lock/utils.py index cb23013..4e9851e 100644 --- a/pyodide_lock/utils.py +++ b/pyodide_lock/utils.py @@ -103,7 +103,10 @@ def _generate_package_hash(full_path: Path) -> str: def _get_marker_environment( - platform: str, arch: str, python: str, **kwargs, + platform: str, + arch: str, + python: str, + **kwargs, ) -> dict[str, str]: """ Get the marker environment for this pyodide-lock file. If running From 68d97f9dba059607d875887e52c67c79bf2504f8 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Tue, 21 Apr 2026 14:40:27 +0900 Subject: [PATCH 06/12] Update changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1377e24..4737603 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 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. From 584135c43735b6f2d0c820773c67107823f5cf65 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Tue, 21 Apr 2026 14:40:41 +0900 Subject: [PATCH 07/12] lint --- pyodide_lock/utils.py | 5 ++++- pyodide_lock/uv_pip_compile.py | 6 +----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pyodide_lock/utils.py b/pyodide_lock/utils.py index cb23013..4e9851e 100644 --- a/pyodide_lock/utils.py +++ b/pyodide_lock/utils.py @@ -103,7 +103,10 @@ def _generate_package_hash(full_path: Path) -> str: def _get_marker_environment( - platform: str, arch: str, python: str, **kwargs, + platform: str, + arch: str, + python: str, + **kwargs, ) -> dict[str, str]: """ Get the marker environment for this pyodide-lock file. If running diff --git a/pyodide_lock/uv_pip_compile.py b/pyodide_lock/uv_pip_compile.py index 091335d..5aaf604 100644 --- a/pyodide_lock/uv_pip_compile.py +++ b/pyodide_lock/uv_pip_compile.py @@ -22,11 +22,7 @@ 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 +import tomli as tomllib if TYPE_CHECKING: from collections.abc import Iterator From 24e32f259a82ba71b00cdb2560fc4e45c12e66f4 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Tue, 21 Apr 2026 14:41:23 +0900 Subject: [PATCH 08/12] Use newer python in ci --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f80b79d..9412b7f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 From dbd869c97119d7842c609b3a0a45ce0f65a4cb49 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 08:04:14 +0000 Subject: [PATCH 09/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyodide_lock/uv_pip_compile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyodide_lock/uv_pip_compile.py b/pyodide_lock/uv_pip_compile.py index 5aaf604..37ede01 100644 --- a/pyodide_lock/uv_pip_compile.py +++ b/pyodide_lock/uv_pip_compile.py @@ -4,7 +4,6 @@ import os import shutil -import sys import sysconfig from logging import DEBUG from pathlib import Path @@ -16,13 +15,13 @@ from urllib import parse, request import pkginfo +import tomli as tomllib from packaging.requirements import Requirement from packaging.utils import NormalizedName, canonicalize_name from pydantic import BaseModel, Field from .spec import PackageSpec, PyodideLockSpec from .utils import add_wheels_to_spec, logger -import tomli as tomllib if TYPE_CHECKING: from collections.abc import Iterator From a04b41e19ddd235bc6d9f377a2333a11466ae9b9 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Fri, 24 Apr 2026 17:53:10 +0900 Subject: [PATCH 10/12] tomllib --- pyodide_lock/uv_pip_compile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyodide_lock/uv_pip_compile.py b/pyodide_lock/uv_pip_compile.py index 37ede01..da9964b 100644 --- a/pyodide_lock/uv_pip_compile.py +++ b/pyodide_lock/uv_pip_compile.py @@ -15,7 +15,7 @@ from urllib import parse, request import pkginfo -import tomli as tomllib +import tomllib from packaging.requirements import Requirement from packaging.utils import NormalizedName, canonicalize_name from pydantic import BaseModel, Field From 5312f466c5518ace848cf3335c07eb51dec7c36b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 08:53:33 +0000 Subject: [PATCH 11/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyodide_lock/uv_pip_compile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyodide_lock/uv_pip_compile.py b/pyodide_lock/uv_pip_compile.py index da9964b..749a44d 100644 --- a/pyodide_lock/uv_pip_compile.py +++ b/pyodide_lock/uv_pip_compile.py @@ -5,6 +5,7 @@ import os import shutil import sysconfig +import tomllib from logging import DEBUG from pathlib import Path from pprint import pformat @@ -15,7 +16,6 @@ from urllib import parse, request import pkginfo -import tomllib from packaging.requirements import Requirement from packaging.utils import NormalizedName, canonicalize_name from pydantic import BaseModel, Field From 994694b14c159171716682196607b2769134ab6a Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Fri, 24 Apr 2026 18:00:14 +0900 Subject: [PATCH 12/12] include setuptools as test dep --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 306112c..4d49c77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ wheel = [ ] dev = [ "build", + "setuptools", "click", "pytest-cov", "pytest",