Closed yahonda closed 1 day ago
This pull request updates to Use compatible release clause ~= defined at PEP 440. I prefer this syntax to the current one.
~=
% python -V Python 3.12.3 % pip -V pip 24.2 from /Users/yahonda@pingcap.com/Desktop/my-project/.venv/lib/python3.12/site-packages/pip (python 3.12)
pip install 'django-tidb~=5.0.0'
% pip install 'django-tidb~=5.0.0' Collecting django-tidb~=5.0.0 Downloading django_tidb-5.0.0-py3-none-any.whl.metadata (9.1 kB) Downloading django_tidb-5.0.0-py3-none-any.whl (24 kB) Installing collected packages: django-tidb Successfully installed django-tidb-5.0.0
pip install 'django-tidb~=4.2.0'
% pip install 'django-tidb~=4.2.0' Collecting django-tidb~=4.2.0 Downloading django_tidb-4.2.4-py3-none-any.whl.metadata (9.0 kB) Downloading django_tidb-4.2.4-py3-none-any.whl (23 kB) Installing collected packages: django-tidb Attempting uninstall: django-tidb Found existing installation: django-tidb 5.0.0 Uninstalling django-tidb-5.0.0: Successfully uninstalled django-tidb-5.0.0 Successfully installed django-tidb-4.2.4
pip install 'django-tidb~=4.1.0'
% pip install 'django-tidb~=4.1.0'
Collecting django-tidb~=4.1.0 Downloading django_tidb-4.1.3-py3-none-any.whl.metadata (7.5 kB) Downloading django_tidb-4.1.3-py3-none-any.whl (24 kB) Installing collected packages: django-tidb Attempting uninstall: django-tidb Found existing installation: django-tidb 4.2.4 Uninstalling django-tidb-4.2.4: Successfully uninstalled django-tidb-4.2.4 Successfully installed django-tidb-4.1.3 %
- `pip install 'django-tidb~=3.2.0'` installs the latest patch version of django-tidb 4.1.z that is [3.2.3](https://github.com/pingcap/django-tidb/releases/tag/3.2.3) ```python % pip install 'django-tidb~=3.2.0' Collecting django-tidb~=3.2.0 Downloading django_tidb-3.2.3-py3-none-any.whl.metadata (7.6 kB) Downloading django_tidb-3.2.3-py3-none-any.whl (24 kB) Installing collected packages: django-tidb Attempting uninstall: django-tidb Found existing installation: django-tidb 4.1.3 Uninstalling django-tidb-4.1.3: Successfully uninstalled django-tidb-4.1.3 Successfully installed django-tidb-3.2.3 %
https://peps.python.org/pep-0440/#compatible-release
This pull request updates to Use compatible release clause
~=
defined at PEP 440. I prefer this syntax to the current one.How it works
pip install 'django-tidb~=5.0.0'
installs the latest patch version of django-tidb 5.0.z that is 5.0.0.pip install 'django-tidb~=4.2.0'
installs the latest patch version of django-tidb 4.2.z that is 4.2.4pip install 'django-tidb~=4.1.0'
installs the latest patch version of django-tidb 4.1.z that is 4.1.3Collecting django-tidb~=4.1.0 Downloading django_tidb-4.1.3-py3-none-any.whl.metadata (7.5 kB) Downloading django_tidb-4.1.3-py3-none-any.whl (24 kB) Installing collected packages: django-tidb Attempting uninstall: django-tidb Found existing installation: django-tidb 4.2.4 Uninstalling django-tidb-4.2.4: Successfully uninstalled django-tidb-4.2.4 Successfully installed django-tidb-4.1.3 %
References
https://peps.python.org/pep-0440/#compatible-release