Skip to content

fix(python): derive package version from metadata - #3707

Open
voidstack (voidstackloop) wants to merge 1 commit into
microsoft:mainfrom
voidstackloop:fix/python-package-version-1983
Open

fix(python): derive package version from metadata#3707
voidstack (voidstackloop) wants to merge 1 commit into
microsoft:mainfrom
voidstackloop:fix/python-package-version-1983

Conversation

@voidstackloop

@voidstackloop voidstack (voidstackloop) commented Sep 13, 2026

Copy link
Copy Markdown

Closes #1983.

Summary

  • expose the installed qdk distribution version as qdk.__version__
  • use that same value for Python telemetry instead of a build-time-rewritten constant
  • remove the obsolete telemetry rewrite from version.py

qsharp-widgets already uses the same importlib.metadata pattern, so this makes the two Python packages consistent.

Tests

  • pytest source/qdk_package/tests/test_version.py source/qdk_package/tests/test_qasm_telemetry.py -q (6 passed)
  • python build.py --check-py --no-check-prereqs (Pyright: 0 errors, 0 warnings)
  • editable QDK package build on Windows with Rust 1.96.1

@voidstackloop

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

Update version handling in Python packages

1 participant