from abc import abstractmethod
from re import Pattern
from typing_extensions import Self, deprecated

@deprecated("The `Version` class is deprecated. Use `packaging.version` instead.")
class Version:
    def __eq__(self, other: object) -> bool: ...
    def __lt__(self, other: Self | str) -> bool: ...
    def __le__(self, other: Self | str) -> bool: ...
    def __gt__(self, other: Self | str) -> bool: ...
    def __ge__(self, other: Self | str) -> bool: ...
    @abstractmethod
    def __init__(self, vstring: str | None = None) -> None: ...
    @abstractmethod
    def parse(self, vstring: str) -> Self: ...
    @abstractmethod
    def _cmp(self, other: Self | str) -> bool: ...

@deprecated("The `StrictVersion` class is deprecated. Use `packaging.version` instead.")
class StrictVersion(Version):
    version_re: Pattern[str]
    version: tuple[int, int, int]
    prerelease: tuple[str, int] | None
    def __init__(self, vstring: str | None = None) -> None: ...
    def parse(self, vstring: str) -> Self: ...
    def _cmp(self, other: Self | str) -> bool: ...

@deprecated("The `LooseVersion` class is deprecated. Use `packaging.version` instead.")
class LooseVersion(Version):
    component_re: Pattern[str]
    vstring: str
    version: tuple[str | int, ...]
    def __init__(self, vstring: str | None = None) -> None: ...
    def parse(self, vstring: str) -> Self: ...
    def _cmp(self, other: Self | str) -> bool: ...
