Skip to content

fix(conda): pin cryptography 48.0.1 on Intel macOS, which has no newer wheel (#1827) - #1828

Merged
JarryShaw merged 1 commit into
mainfrom
fix/1827-cryptography-intel-pin
Oct 16, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/1827-cryptography-intel-pin

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

Description

Closes #1827. This implements option B from the ruling on #1822.

cryptography has shipped no Intel macOS wheel since 49.0.0, so the native osx-64 leg from #1825 would build 50.0.2 from source. That build probably links the runner's Homebrew OpenSSL.

  • Requirements: conda/requirements.txt now pins cryptography==48.0.1, the universal2 wheel, with a PEP 508 marker for sys_platform == "darwin" and platform_machine == "x86_64". Every other build keeps 50.0.2. The markers take effect in each leg's own pip download -r conda/requirements.txt step, which runs on its native runner.
  • Writer: util/conda_vendor.py keeps the exception in a PLATFORM_PINS table, with the reason as a comment, and the writer emits the marked lines.
  • --check: it now also fails when a fixed pin moves, and when the table names a package or platform no build uses. The next Conda Update cannot silently drop the pin.

Verified:

  • packaging.markers selects 48.0.1 only on osx-64.
  • pip download --only-binary=:all: with each platform's tags resolves the universal2 48.0.1 wheel on Intel macOS and 50.0.2 wheels on linux-64 and osx-arm64, for 3.11–3.15.
  • The new tests/project/test_conda_cryptography_pin_1827.py fails on main (8 failed). tests/project gives 981 passed, 1 skipped.

Not verified: no Actions run.

…r wheel (#1827)

- conda/requirements.txt: cryptography gets a line per platform pin.
  osx-64 takes 48.0.1, the newest release with an Intel macOS wheel
  (universal2), since 49.0.0 dropped them; every other build takes the
  installed release. Each conda leg's pip download evaluates the markers
  on its own runner, and build.sh installs what it fetched.
- util/conda_vendor.py: PLATFORM_PINS holds that pin and its reason. The
  writer emits a line per pin; --check accepts them, and flags a pin that
  moved or went and a table entry no build can use.
- tests/project/test_conda_cryptography_pin_1827.py pins the committed
  lines per build and covers the writer and --check, offline; the #1814
  tests read the new parse shape.
- cron-conda.yml: the comments say where the markers are evaluated.

tests/project passes and --check passes on the committed file. pip
resolves 48.0.1's universal2 wheel for osx-64 and 50.0.2 elsewhere, on
each supported Python.

Closes #1827
@JarryShaw JarryShaw added fix Pull requests that fix a defect (fix: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 16, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 16, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at b033843a4. A Sonnet cross-review (author: Opus) checked:

  • Platform selection: the markers select exactly one cryptography line for every conda target on 3.11–3.15. pip's own download -r with darwin/x86_64 markers saves the 48.0.1 universal2 wheel, and 48.0.1 is the newest release with any Intel macOS wheel.
  • Download and build: the download and the build run in the same native job in both conda workflows.
  • --check: it fails on ten different mutations of the pin, table or markers, and still flags missing, stale and dead packages.
  • Tests: the new tests catch nine further code mutations.
  • Dependencies: 48.0.1 and 50.0.2 declare the same dependencies.

Non-blocking: the Intel leg's own pip install -e .[all] into the runner still builds cryptography 50.0.2 from source. That copy is not what gets packaged. The image has Rust and OpenSSL, but no Actions run has confirmed it yet.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 90.05% (unit tier, Python 3.15, b033843a4, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 2 20 2 96.77%
pcapkit/const 19595 881 2618 867 92.11%
pcapkit/corekit 2462 69 780 35 96.55%
pcapkit/dumpkit 276 3 100 3 98.40%
pcapkit/foundation 2915 164 1016 34 93.59%
pcapkit/interface 138 7 52 5 93.68%
pcapkit/protocols 17408 224 4580 189 98.10%
pcapkit/toolkit 872 177 298 8 77.18%
pcapkit/utilities 512 2 158 4 99.10%
pcapkit/vendor 4407 2342 1010 157 43.27%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit d07be2c into main Oct 16, 2026
60 checks passed
@JarryShaw
JarryShaw deleted the fix/1827-cryptography-intel-pin branch October 16, 2026 19:14
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 16, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull requests that fix a defect (fix: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(conda): pin cryptography 48.0.1 on Intel macOS, which has no newer wheel

1 participant