Skip to content

Accept Text in distutils *Version classes #1854

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
Feb 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions stdlib/2and3/distutils/version.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
from abc import abstractmethod
from typing import Any, Optional, TypeVar, Union, Pattern, Tuple
from typing import Any, Optional, TypeVar, Union, Pattern, Text, Tuple

_T = TypeVar('_T', bound='Version')

@@ -15,9 +15,9 @@ class Version:
def __ge__(self: _T, other: Union[_T, str]) -> bool: ...

@abstractmethod
def __init__(self, vstring: Optional[str] = ...) -> None: ...
def __init__(self, vstring: Optional[Text] = ...) -> None: ...
@abstractmethod
def parse(self: _T, vstring: str) -> _T: ...
def parse(self: _T, vstring: Text) -> _T: ...
@abstractmethod
def __str__(self) -> str: ...
if sys.version_info >= (3,):
@@ -30,10 +30,10 @@ class Version:
class StrictVersion(Version):
version_re: Pattern[str]
version: Tuple[int, int, int]
prerelease: Optional[Tuple[str, int]]
prerelease: Optional[Tuple[Text, int]]

def __init__(self, vstring: Optional[str] = ...) -> None: ...
def parse(self: _T, vstring: str) -> _T: ...
def __init__(self, vstring: Optional[Text] = ...) -> None: ...
def parse(self: _T, vstring: Text) -> _T: ...
def __str__(self) -> str: ...
if sys.version_info >= (3,):
def _cmp(self: _T, other: Union[_T, str]) -> bool: ...
@@ -42,11 +42,11 @@ class StrictVersion(Version):

class LooseVersion(Version):
component_re: Pattern[str]
vstring: str
version: Tuple[Union[str, int], ...]
vstring: Text
version: Tuple[Union[Text, int], ...]

def __init__(self, vstring: Optional[str] = ...) -> None: ...
def parse(self: _T, vstring: str) -> _T: ...
def __init__(self, vstring: Optional[Text] = ...) -> None: ...
def parse(self: _T, vstring: Text) -> _T: ...
def __str__(self) -> str: ...
if sys.version_info >= (3,):
def _cmp(self: _T, other: Union[_T, str]) -> bool: ...