absurdfarce commented on code in PR #1273:
URL: 
https://github.com/apache/cassandra-python-driver/pull/1273#discussion_r2908237820


##########
cassandra/util.py:
##########
@@ -1692,57 +1692,53 @@ def __repr__(self):
             self.lower_bound, self.upper_bound, self.value
         )
 
+VERSION_REGEX = 
re.compile("^(\\d+)\\.(\\d+)(\\.\\d+)?(\\.\\d+)?([~\\-]\\w[.\\w]*(?:-\\w[.\\w]*)*)?(\\+[.\\w]+)?$")
 
 @total_ordering
 class Version(object):
     """
-    Internal minimalist class to compare versions.
-    A valid version is: <int>.<int>.<int>.<int or str>.
-
-    TODO: when python2 support is removed, use packaging.version.
+    Representation of a Cassandra version.  Mostly follows the implementation 
of the same logic in the Java driver;
+    see 
https://github.com/apache/cassandra-java-driver/blob/4.19.2/core/src/main/java/com/datastax/oss/driver/api/core/Version.java
     """

Review Comment:
   I don't know that I really want us to be in the business of describing what 
Cassandra versions look like.  I suppose I can add a sentence explaining what 
we expect the format to look like but I don't want to do more than that... and 
even such a sentence should be pretty easily derivable from the regex.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to