Skip to content

Conversation

@VangLung
Copy link
Contributor

@VangLung VangLung commented Oct 13, 2025

Problem

The previous implementation compared Python versions as strings, which could lead to incorrect behavior. For example, '3.11.0' < '3.8.0' evaluates to True due to lexicographical ordering.

Solution

This commit modifies the version comparison to use sys.version_info[:3], which provides a tuple of the major, minor, and micro components of the Python version. This ensures a correct numeric comparison.

Testing

Tested the change on Python versions 3.8 to verify correct behavior.

Previously, the version was compared as a string,
but that could lead to an error  (e.g. '3.11.0' < '3.8.0'),
which could cause incorrect behaviour. Now it compares sys.version_info[:3] tuples
to ensure correct numeric comparison and prevent false warnings.
@deniszh deniszh merged commit 697bc3b into graphite-project:master Oct 13, 2025
8 of 10 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