Skip to content

Add architecture (ISA) awareness to Python discovery#3058

Merged
gaborbernat merged 18 commits into
pypa:mainfrom
rahuldevikar:feature/architecture-aware-discovery
Feb 23, 2026
Merged

Add architecture (ISA) awareness to Python discovery#3058
gaborbernat merged 18 commits into
pypa:mainfrom
rahuldevikar:feature/architecture-aware-discovery

Conversation

@rahuldevikar

@rahuldevikar rahuldevikar commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Use sysconfig.get_platform() to determine each interpreter's CPU architecture (arm64, x86_64, etc.) and expose it via a new 'machine' property on PythonInfo and an optional machine suffix on PythonSpec.

This allows users to distinguish between interpreters that share the same version and bitness but target different architectures, e.g.: virtualenv --python cpython3.12-64-arm64 .venv

Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)

Refs: #3069"

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

Comment thread src/virtualenv/discovery/py_info.py Outdated
@rahuldevikar rahuldevikar marked this pull request as ready for review February 21, 2026 06:30

@gaborbernat gaborbernat 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.

we should bump the version key for the py info cache.

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.

2 participants