Skip to content

chore(deps): update Python dependencies - #1461

Open
viiccwen wants to merge 1 commit into
apache:mainfrom
viiccwen:uv-dependencies
Open

chore(deps): update Python dependencies#1461
viiccwen wants to merge 1 commit into
apache:mainfrom
viiccwen:uv-dependencies

Conversation

@viiccwen

@viiccwen viiccwen commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Related Issues

Closes #1460

Supersedes #1444, #1445, #1446, #1452, and #1453 with one compatibility-safe refresh.

Changes

  • Pin the root and QDP development/benchmark environments to PyTorch 2.11.0.
  • Update Rust tch from 0.22 to 0.24 to match the PyTorch 2.11.0 libtorch ABI.
  • Refresh the root and QDP uv lockfiles with all compatible dependency updates.
  • Include the pending Pillow 12.3.0, pyasn1 0.6.4, and setuptools 83.0.0 updates.
  • Preserve the intentional NumPy, Cirq, and Qiskit Aer upper bounds.
  • Update ty suppression comments for the refreshed diagnostic names.

Why

The open Python dependency PRs modify overlapping lockfiles. Consolidating them avoids repeated lockfile churn and ensures the root and QDP environments are updated and validated together.

How

Both projects were regenerated with uv lock --upgrade after aligning PyTorch 2.11.0 with tch 0.24. PyTorch 2.13 is intentionally deferred because no released tch version targets that libtorch ABI; bypassing the version check would not establish binary compatibility. No tests or CI workflows were added.

The refreshed ty release renamed or tightened several attribute diagnostics, so the existing targeted suppressions were updated without changing runtime behavior.

Checklist

  • uv lock --check
  • uv lock --project qdp/qdp-python --check
  • uv sync --frozen --group dev
  • uv sync --project qdp/qdp-python --frozen --group dev
  • Python 3.10, 3.11, and 3.12: build the QDP native extension and run the full root test suite (721 passed, 156 skipped on each version)
  • Python 3.10, 3.11, and 3.12: build from the QDP lockfile and run qdp/qdp-python/tests (7 passed, 22 skipped on each version)
  • uv run pre-commit run --all-files
  • Cargo clippy with LIBTORCH_USE_PYTORCH=1 and PyTorch 2.11.0
  • No new tests or CI workflows added

@viiccwen
viiccwen requested a review from 400Ping as a code owner August 1, 2026 06:45
Signed-off-by: viiccwen <vicwen@apache.org>

@rich7420 rich7420 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 63 of qumat/amazon_braket_backend.py (circuit.i(i) # type: ignore[unresolved-attribute]) was not updated to # ty: ignore like lines 137/158 in the same file. This PR bumps ty 0.0.16 -> 0.0.65 (transitively via the loosened torch pin), and ty >= 0.0.65 does not honor # type: ignore at all, only # ty: ignore. Verified by running both ty versions against a minimal repro: 0.0.16 passes on the old syntax, 0.0.69 (representative of 0.0.65) fails on it. .pre-commit-config.yaml runs ty check . repo-wide, so line 63 will start failing. Please update it to # ty: ignore[unresolved-attribute].

Comment thread pyproject.toml
"maturin>=1.10.2",
"patchelf>=0.17.2.4",
"torch>=2.2,<=2.9.0",
"torch==2.11.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch moved from a version range (>=2.2,<=2.9.0 / >=2.2,<=2.12.0 in qdp-python) to an exact pin torch==2.11.0. Stricter than the rest of the file's range-based convention and not explained in the PR. Consider a range instead, or state the reason for pinning.

@rich7420

rich7420 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

One more note beyond the inline comment above: this branch is now behind main (which has merged #1454/#1456/#1457 since this PR was opened) and will need a rebase before merging.

I verified the fix itself works once rebased: tch = "0.24" + torch==2.11.0 builds and passes cargo test -p qdp-core --features pytorch --lib (100/100) and cargo clippy --features pytorch -- -D warnings cleanly on top of latest main. Also relevant: #1445 (Dependabot, torch->2.13.0) can't be merged -- tch-rs's latest crates.io release (0.24.0) only supports up to PyTorch 2.11, so once this PR lands, #1445 should be closed as superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Consolidate Python uv dependency updates

2 participants