Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use compatible release clause ~= defined at PEP 440 #65

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Aug 13, 2024

This pull request updates to Use compatible release clause ~= defined at PEP 440. I prefer this syntax to the current one.

How it works

% 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' installs the latest patch version of django-tidb 5.0.z that is 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' installs the latest patch version of django-tidb 4.2.z that is 4.2.4
% 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' installs the latest patch version of django-tidb 4.1.z that is 4.1.3
% 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
% 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
%

References

https://peps.python.org/pep-0440/#compatible-release

@wd0517 wd0517 merged commit acfacf7 into pingcap:main Nov 5, 2024
10 of 11 checks passed
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