kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Upgrade desktop-app cryptography to 50.0.0 and regenerate uv.lock

Open rtibblesbot opened this issue 1 month ago • 5 comments

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Dependabot PR #15030 bumped the cryptography pin in platforms/desktop-app/pyproject.toml's build extra from 45.0.7 to 50.0.0, but its pip updater does not write uv.lock, which still resolves 45.0.7. The upgrade needs the pin bump and a regenerated lock in one PR.

Complexity: Low Target branch: release-v0.20.x

Context

  • uv.lock is shared across the workspace, so the pin decides cryptography on Python ≥ 3.10 for every member, not only kolibri-app.
  • Moving it to 50.0.0 also moves root kolibri (cryptography>=40) and josepy (via django-oidc-provider, used by kolibri-oidc-provider-plugin) to 50.0.0 on Python ≥ 3.10.
  • uv lock --dry-run with the pin at 50.0.0 resolves with no conflicts: cryptography v45.0.7, v47.0.0, v49.0.0 -> v45.0.7, v47.0.0, v49.0.0, v50.0.0.
  • Breaking changes from 46–50 (OpenSSL 1.1.x and SECT* curves dropped in 47, Python 3.8 dropped in 48, FFDH deprecated in 50) do not reach this repo: nothing in platforms/desktop-app imports cryptography, and the extra is gated on Python ≥ 3.10.
  • CI does not install with --locked, so a green run does not prove the lock matches pyproject.toml.

The Change

  • The desktop-app build extra should pin cryptography==50.0.0.
  • uv.lock should be regenerated in the same commit.

Acceptance Criteria

  • [ ] uv lock --check passes.
  • [ ] uv.lock resolves cryptography 50.0.0 for Python ≥ 3.10.
  • [ ] platform-windows-app-build_exe.yml and platform-macos-app-build_dmg.yml produce installers that launch Kolibri.
  • [ ] kolibri-oidc-provider-plugin tests pass against cryptography 50.0.0.

References

  • Changelog: https://cryptography.io/en/latest/changelog/
  • Closed Dependabot PR: #15030

AI usage

Drafted by rtibblesbot (Claude Code) from its review of #15030; it ran uv lock --dry-run to confirm the resolution.

Filed from #15030's review.

rtibblesbot avatar Nov 02 '26 02:11 rtibblesbot

@rtibbles cryptography ≥ 49 publishes no Intel macOS wheel, so on macos-15-intel the DMG job compiles 50.0.0 and bundles the runner's Homebrew OpenSSL — 3.6.3 built for macOS 15.0 in #15030's DMG, inside an app whose deployment target is 12.0 — and the smoke test cannot see it fail to load on macOS 12–14, because Morango falls back to pure-Python RSA. Should the Intel DMG ship that source build as the criteria word it, or hold darwin x86_64 at 48.0.1, the last release with a universal2 wheel, so that 50.0.0 reaches only the Windows installer and dev environments and the second criterion gains that exception? I would hold at 48.0.1.


Written by rtibblesbot, an LLM-based coding agent.

rtibblesbot avatar Nov 25 '26 01:11 rtibblesbot

We need a universal build yes, so let's cap it there.

rtibbles avatar Nov 25 '26 02:11 rtibbles

Plan: The desktop-app build extra pins cryptography==50.0.0, holds macOS at 48.0.1, and uv.lock agrees with it (issue #15722).

  • [ ] Split the cryptography pin and re-lock
  • [ ] Self-review the branch

Assumptions — the issue did not settle these; say so if one is wrong.

  • Read "cap it there" as macOS only, leaving Windows and Linux on 50.0.0 as the question proposed — if every platform was meant, a single ==48.0.1 pin replaces the split.
  • Held arm64 Macs at 48.0.1 too, since the reply's reason is a universal build — if only Intel was meant, the 48.0.1 marker gains platform_machine == 'x86_64'.
  • kolibri-oidc-provider-plugin has no tests, so the fourth criterion is met by .plans/cryptography_probe.py passing on 50.0.0 — if a suite was meant, the PR adds test/ and a tox job after kolibri-opensearch-plugin.
  • Guarded the 48.0.1 hold with the pin's comment only and left .github/dependabot.yml alone, since an ignore is per dependency name and would also stop bumps of the 50.0.0 line — if a machine guard is wanted, the uv entry gains ignore: cryptography >=49. How Dependabot's uv updater treats two marker-split pins of one package was not checkable.

Written by rtibblesbot, an LLM-based coding agent.

rtibblesbot avatar Nov 25 '26 03:11 rtibblesbot

Decided without asking; a reply here changes it.

  • 32-bit Python on Windows is left without a pin exception or a doc note: from this change, uv sync there on Python ≥ 3.10 has no cryptography wheel (upstream publishes no win32 wheel from 49.0.0) and must compile it.
    • The branch causes it, which argues for fixing here; no known user outweighed that.
    • No user found: the EXE job and the Windows unit-test job run 64-bit Python on windows-latest, no doc mentions 32-bit Python, and no open issue or PR covers it.
    • release-v0.20.x is already in this state on Python 3.9: its lock resolves cryptography 49.0.0 there, and the same wheel-only dry-run (uv sync --locked --dry-run --python 3.9 --python-platform i686-pc-windows-msvc --no-build-package cryptography) fails for root kolibri's test group and both OIDC plugins.
    • An exception would be a third marker split and a second carve-out from the 50.0.0 criterion, on the platform the issue asks to move.
    • The installers and the kolibri wheel are unaffected: the EXE bundles the win_amd64 wheel, and uv.lock does not feed the wheel's bundled C extensions.

Written by rtibblesbot, an LLM-based coding agent.

rtibblesbot avatar Nov 25 '26 03:11 rtibblesbot

Fixed in #16028

rtibbles avatar Nov 25 '26 19:11 rtibbles