pypa / pypa/packaging.python.org
Document real compatibility tag interpretation
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 1.7k
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 4
説明
Issue Description
The compatibility tag section of the documentation is lifted directly from PEP-425 and covers how compatibility tags are constructed.
However, it is incomplete and inaccurate regarding how those tags are matched by pip. The described algorithm is:
This example list is for an installer running under CPython 3.3 on a linux_x86_64 system. It is in order from most-preferred (a distribution with a compiled extension module, built for the current version of Python) to least-preferred (a pure-Python distribution built with an older version of Python):
- cp33-cp33m-linux_x86_64
- cp33-abi3-linux_x86_64
- cp3-abi3-linux_x86_64
- cp33-none-linux_x86_64*
- cp3-none-linux_x86_64*
- py33-none-linux_x86_64*
- py3-none-linux_x86_64*
- cp33-none-any
- cp3-none-any
- py33-none-any
- py3-none-any
- py32-none-any
- py31-none-any
- py30-none-any
This is modified by "Compressed Tag Sets" but that's not relevant to this issue.
From this we can surmise, for a CPython version X.Y:
- It can match if
pythoniscpXYandabiiscpXY*. - It can match if
pythonis incpXY, cpXandabiisabi3 - It can match if
pythonis incpXY,cpX,pyXY,pyXandabiisnone - It can also match any
pyXZ-none-anyfor Z < Y
This is not the actual algorithm used by pip.
In particular I'm aware of these rules obeyed by pip in practice (but I haven't found a spec):
- It can also match any
cpXZ-abi3for Z < Y - It can also match any
pyXZ-none-manylinux*for Z < Y
Given these are valid, they must be in the ordering somewhere, and it should be documented where.
Some examples illustrating these rules (pip 24.3.1, python 3.13):
$ .venv/bin/pip --version
pip 24.3.1 from /home/mauve/dev/demo/.venv/lib/python3.13/site-packages/pip (python 3.13)
$ .venv/bin/pip install --dry-run solace_pubsubplus --no-deps --no-cache
Looking in indexes: https://artifactory/pypi/simple/
Collecting solace_pubsubplus
Downloading https://artifactory/pypi/packages/packages/5e/33/e5923f962b89b5a63eac2c0f7493abb53e7a1054a1da580c0037fd51713f/solace_pubsubplus-1.9.0-py36-none-manylinux_2_12_x86_64.whl (4.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 549.6 MB/s eta 0:00:00
Would install solace-pubsubplus-1.9.0
$ .venv/bin/pip install --dry-run argon2_cffi_bindings --no-deps --no-cache
Looking in indexes: https://artifactory/pypi/simple/
Collecting argon2_cffi_bindings
Downloading https://artifactory/pypi/packages/packages/ec/f7/378254e6dd7ae6f31fe40c8649eea7d4832a42243acaf0f1fff9083b2bed/argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
Would install argon2-cffi-bindings-21.2.0
Given also that Compressed Tag Sets modify the whole algorithm, making it about set intersection, it would also be better to incorporate them into a description of the algorithm too.
Code of Conduct
- I am aware that participants in this repository must follow the PSF Code of Conduct.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
プラットフォーム互換性タグのドキュメントにある互換性タグのセクションから始め、その PEP-425 の順序を、issue 内の pip 24.3.1 の例と比較してください。Compressed Tag Sets と古い cp/py manylinux のマッチを含む実際の順序を調査し、説明されているアルゴリズムが pip の動作と一致し、例が説明されるように文書化してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100