8000 check Python version with sys.version_info by minrk · Pull Request #227 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

check Python version with sys.version_info #227

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

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

minrk
Copy link
Contributor
@minrk minrk commented Dec 19, 2017

sys.version_info is a parsed tuple of numbers, so not vulnerable to incorrect string version comparison (e.g. '10' < '3') or parse errors on sys.version.

Discovered because prometheus-client cannot be imported on development versions of Python which have version strings like 3.7.0a0.

sys.version_info is a parsed tuple of numbers,
so not vulnerable to incorrect string version comparison (e.g. '10' < '3')

Discovered because prometheus-client cannot be imported on development versions of Python
which have version strings like `'3.7.0a0'`
@brian-brazil brian-brazil merged commit d3562a1 into prometheus:master Dec 19, 2017
@brian-brazil
Copy link
Contributor

Thanks!

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
0