Drop support for Python 3.5 (#4675)

Python 3.5 EOL was on 2020-09-30.
This commit is contained in:
Sebastian Rittau
2020-11-02 16:18:20 +01:00
committed by GitHub
parent 57b86e0e71
commit d2a7889fe0
64 changed files with 546 additions and 1174 deletions

View File

@@ -108,45 +108,44 @@ _ScreenUnits = Union[str, float] # manual page: Tk_GetPixels
_XYScrollCommand = Union[str, Callable[[float, float], Any]] # -xscrollcommand and -yscrollcommand in 'options' manual page
_TakeFocusValue = Union[bool, Literal[""], Callable[[str], Optional[bool]]] # -takefocus in manual page named 'options'
if sys.version_info >= (3, 6):
class EventType(str, Enum):
Activate: str = ...
ButtonPress: str = ...
ButtonRelease: str = ...
Circulate: str = ...
CirculateRequest: str = ...
ClientMessage: str = ...
Colormap: str = ...
Configure: str = ...
ConfigureRequest: str = ...
Create: str = ...
Deactivate: str = ...
Destroy: str = ...
Enter: str = ...
Expose: str = ...
FocusIn: str = ...
FocusOut: str = ...
GraphicsExpose: str = ...
Gravity: str = ...
KeyPress: str = ...
KeyRelease: str = ...
Keymap: str = ...
Leave: str = ...
Map: str = ...
MapRequest: str = ...
Mapping: str = ...
Motion: str = ...
MouseWheel: str = ...
NoExpose: str = ...
Property: str = ...
Reparent: str = ...
ResizeRequest: str = ...
Selection: str = ...
SelectionClear: str = ...
SelectionRequest: str = ...
Unmap: str = ...
VirtualEvent: str = ...
Visibility: str = ...
class EventType(str, Enum):
Activate: str = ...
ButtonPress: str = ...
ButtonRelease: str = ...
Circulate: str = ...
CirculateRequest: str = ...
ClientMessage: str = ...
Colormap: str = ...
Configure: str = ...
ConfigureRequest: str = ...
Create: str = ...
Deactivate: str = ...
Destroy: str = ...
Enter: str = ...
Expose: str = ...
FocusIn: str = ...
FocusOut: str = ...
GraphicsExpose: str = ...
Gravity: str = ...
KeyPress: str = ...
KeyRelease: str = ...
Keymap: str = ...
Leave: str = ...
Map: str = ...
MapRequest: str = ...
Mapping: str = ...
Motion: str = ...
MouseWheel: str = ...
NoExpose: str = ...
Property: str = ...
Reparent: str = ...
ResizeRequest: str = ...
Selection: str = ...
SelectionClear: str = ...
SelectionRequest: str = ...
Unmap: str = ...
VirtualEvent: str = ...
Visibility: str = ...
# Events considered covariant because you should never assign to event.widget.
_W = TypeVar("_W", covariant=True, bound="Misc")
@@ -168,10 +167,7 @@ class Event(Generic[_W]):
send_event: bool
keysym: str
keysym_num: int
if sys.version_info >= (3, 6):
type: EventType
else:
type: str
type: EventType
widget: _W
delta: int
@@ -184,10 +180,9 @@ class Variable:
def set(self, value: Any) -> None: ...
initialize = set
def get(self) -> Any: ...
if sys.version_info >= (3, 6):
def trace_add(self, mode: _TraceMode, callback: Callable[[str, str, str], Any]) -> str: ...
def trace_remove(self, mode: _TraceMode, cbname: str) -> None: ...
def trace_info(self) -> List[Tuple[Tuple[_TraceMode, ...], str]]: ...
def trace_add(self, mode: _TraceMode, callback: Callable[[str, str, str], Any]) -> str: ...
def trace_remove(self, mode: _TraceMode, cbname: str) -> None: ...
def trace_info(self) -> List[Tuple[Tuple[_TraceMode, ...], str]]: ...
def trace_variable(self, mode, callback): ... # deprecated
def trace_vdelete(self, mode, cbname): ... # deprecated
def trace_vinfo(self): ... # deprecated
@@ -232,8 +227,6 @@ class Misc:
def tk_strictMotif(self, boolean: Optional[Any] = ...): ...
def tk_bisque(self): ...
def tk_setPalette(self, *args, **kw): ...
if sys.version_info < (3, 6):
def tk_menuBar(self, *args): ...
def wait_variable(self, name: Union[str, Variable] = ...): ...
waitvar: Any
def wait_window(self, window: Optional[Any] = ...): ...
@@ -1878,8 +1871,6 @@ class Menu(Widget):
config = configure
def cget(self, key: _MenuOptionName) -> Any: ...
def tk_popup(self, x, y, entry: str = ...): ...
if sys.version_info < (3, 6):
def tk_bindForTraversal(self): ...
def activate(self, index): ...
def add(self, itemType, cnf=..., **kw): ...
def add_cascade(self, cnf=..., **kw): ...