Revert "REF: simplifies SemanticVersion comparison protocol implementation."

This reverts commit 831313cd703881f050c53f77314746aace0e48ba.
BUG: fix python 3 compatibility for comparison.