Drop Python 3.8 branches (#13776)

This commit is contained in:
Sebastian Rittau
2025-04-03 10:35:36 +02:00
committed by GitHub
parent 1e43190554
commit 30b16c168d
117 changed files with 1023 additions and 2639 deletions
+133 -134
View File
@@ -13,140 +13,139 @@ if sys.version_info >= (3, 11):
else:
from enum import Enum
if sys.version_info >= (3, 9):
__all__ = [
"TclError",
"NO",
"FALSE",
"OFF",
"YES",
"TRUE",
"ON",
"N",
"S",
"W",
"E",
"NW",
"SW",
"NE",
"SE",
"NS",
"EW",
"NSEW",
"CENTER",
"NONE",
"X",
"Y",
"BOTH",
"LEFT",
"TOP",
"RIGHT",
"BOTTOM",
"RAISED",
"SUNKEN",
"FLAT",
"RIDGE",
"GROOVE",
"SOLID",
"HORIZONTAL",
"VERTICAL",
"NUMERIC",
"CHAR",
"WORD",
"BASELINE",
"INSIDE",
"OUTSIDE",
"SEL",
"SEL_FIRST",
"SEL_LAST",
"END",
"INSERT",
"CURRENT",
"ANCHOR",
"ALL",
"NORMAL",
"DISABLED",
"ACTIVE",
"HIDDEN",
"CASCADE",
"CHECKBUTTON",
"COMMAND",
"RADIOBUTTON",
"SEPARATOR",
"SINGLE",
"BROWSE",
"MULTIPLE",
"EXTENDED",
"DOTBOX",
"UNDERLINE",
"PIESLICE",
"CHORD",
"ARC",
"FIRST",
"LAST",
"BUTT",
"PROJECTING",
"ROUND",
"BEVEL",
"MITER",
"MOVETO",
"SCROLL",
"UNITS",
"PAGES",
"TkVersion",
"TclVersion",
"READABLE",
"WRITABLE",
"EXCEPTION",
"EventType",
"Event",
"NoDefaultRoot",
"Variable",
"StringVar",
"IntVar",
"DoubleVar",
"BooleanVar",
"mainloop",
"getint",
"getdouble",
"getboolean",
"Misc",
"CallWrapper",
"XView",
"YView",
"Wm",
"Tk",
"Tcl",
"Pack",
"Place",
"Grid",
"BaseWidget",
"Widget",
"Toplevel",
"Button",
"Canvas",
"Checkbutton",
"Entry",
"Frame",
"Label",
"Listbox",
"Menu",
"Menubutton",
"Message",
"Radiobutton",
"Scale",
"Scrollbar",
"Text",
"OptionMenu",
"Image",
"PhotoImage",
"BitmapImage",
"image_names",
"image_types",
"Spinbox",
"LabelFrame",
"PanedWindow",
]
__all__ = [
"TclError",
"NO",
"FALSE",
"OFF",
"YES",
"TRUE",
"ON",
"N",
"S",
"W",
"E",
"NW",
"SW",
"NE",
"SE",
"NS",
"EW",
"NSEW",
"CENTER",
"NONE",
"X",
"Y",
"BOTH",
"LEFT",
"TOP",
"RIGHT",
"BOTTOM",
"RAISED",
"SUNKEN",
"FLAT",
"RIDGE",
"GROOVE",
"SOLID",
"HORIZONTAL",
"VERTICAL",
"NUMERIC",
"CHAR",
"WORD",
"BASELINE",
"INSIDE",
"OUTSIDE",
"SEL",
"SEL_FIRST",
"SEL_LAST",
"END",
"INSERT",
"CURRENT",
"ANCHOR",
"ALL",
"NORMAL",
"DISABLED",
"ACTIVE",
"HIDDEN",
"CASCADE",
"CHECKBUTTON",
"COMMAND",
"RADIOBUTTON",
"SEPARATOR",
"SINGLE",
"BROWSE",
"MULTIPLE",
"EXTENDED",
"DOTBOX",
"UNDERLINE",
"PIESLICE",
"CHORD",
"ARC",
"FIRST",
"LAST",
"BUTT",
"PROJECTING",
"ROUND",
"BEVEL",
"MITER",
"MOVETO",
"SCROLL",
"UNITS",
"PAGES",
"TkVersion",
"TclVersion",
"READABLE",
"WRITABLE",
"EXCEPTION",
"EventType",
"Event",
"NoDefaultRoot",
"Variable",
"StringVar",
"IntVar",
"DoubleVar",
"BooleanVar",
"mainloop",
"getint",
"getdouble",
"getboolean",
"Misc",
"CallWrapper",
"XView",
"YView",
"Wm",
"Tk",
"Tcl",
"Pack",
"Place",
"Grid",
"BaseWidget",
"Widget",
"Toplevel",
"Button",
"Canvas",
"Checkbutton",
"Entry",
"Frame",
"Label",
"Listbox",
"Menu",
"Menubutton",
"Message",
"Radiobutton",
"Scale",
"Scrollbar",
"Text",
"OptionMenu",
"Image",
"PhotoImage",
"BitmapImage",
"image_names",
"image_types",
"Spinbox",
"LabelFrame",
"PanedWindow",
]
# Using anything from tkinter.font in this file means that 'import tkinter'
# seems to also load tkinter.font. That's not how it actually works, but
+4 -12
View File
@@ -1,20 +1,12 @@
import sys
from tkinter import Misc
from tkinter.commondialog import Dialog
from typing import ClassVar
if sys.version_info >= (3, 9):
__all__ = ["Chooser", "askcolor"]
__all__ = ["Chooser", "askcolor"]
class Chooser(Dialog):
command: ClassVar[str]
if sys.version_info >= (3, 9):
def askcolor(
color: str | bytes | None = None, *, initialcolor: str = ..., parent: Misc = ..., title: str = ...
) -> tuple[None, None] | tuple[tuple[int, int, int], str]: ...
else:
def askcolor(
color: str | bytes | None = None, *, initialcolor: str = ..., parent: Misc = ..., title: str = ...
) -> tuple[None, None] | tuple[tuple[float, float, float], str]: ...
def askcolor(
color: str | bytes | None = None, *, initialcolor: str = ..., parent: Misc = ..., title: str = ...
) -> tuple[None, None] | tuple[tuple[int, int, int], str]: ...
+1 -3
View File
@@ -1,10 +1,8 @@
import sys
from _typeshed import Incomplete
from collections.abc import Mapping
from typing import ClassVar
if sys.version_info >= (3, 9):
__all__ = ["Dialog"]
__all__ = ["Dialog"]
class Dialog:
command: ClassVar[str | None]
+1 -3
View File
@@ -1,11 +1,9 @@
import sys
from _typeshed import Incomplete
from collections.abc import Mapping
from tkinter import Widget
from typing import Any, Final
if sys.version_info >= (3, 9):
__all__ = ["Dialog"]
__all__ = ["Dialog"]
DIALOG_ICON: Final = "questhead"
+1 -3
View File
@@ -1,9 +1,7 @@
import sys
from tkinter import Event, Misc, Tk, Widget
from typing import ClassVar, Protocol
if sys.version_info >= (3, 9):
__all__ = ["dnd_start", "DndHandler"]
__all__ = ["dnd_start", "DndHandler"]
class _DndSource(Protocol):
def dnd_end(self, target: Widget | None, event: Event[Misc] | None, /) -> None: ...
+15 -17
View File
@@ -1,25 +1,23 @@
import sys
from _typeshed import Incomplete, StrOrBytesPath
from collections.abc import Iterable
from tkinter import Button, Entry, Frame, Listbox, Misc, Scrollbar, StringVar, Toplevel, commondialog
from typing import IO, ClassVar, Literal
if sys.version_info >= (3, 9):
__all__ = [
"FileDialog",
"LoadFileDialog",
"SaveFileDialog",
"Open",
"SaveAs",
"Directory",
"askopenfilename",
"asksaveasfilename",
"askopenfilenames",
"askopenfile",
"askopenfiles",
"asksaveasfile",
"askdirectory",
]
__all__ = [
"FileDialog",
"LoadFileDialog",
"SaveFileDialog",
"Open",
"SaveAs",
"Directory",
"askopenfilename",
"asksaveasfilename",
"askopenfilenames",
"askopenfile",
"askopenfiles",
"asksaveasfile",
"askdirectory",
]
dialogstates: dict[Incomplete, tuple[Incomplete, Incomplete]]
+1 -2
View File
@@ -5,8 +5,7 @@ import tkinter
from typing import Any, ClassVar, Final, Literal, TypedDict, overload
from typing_extensions import TypeAlias, Unpack
if sys.version_info >= (3, 9):
__all__ = ["NORMAL", "ROMAN", "BOLD", "ITALIC", "nametofont", "Font", "families", "names"]
__all__ = ["NORMAL", "ROMAN", "BOLD", "ITALIC", "nametofont", "Font", "families", "names"]
NORMAL: Final = "normal"
ROMAN: Final = "roman"
+1 -12
View File
@@ -1,18 +1,7 @@
import sys
from tkinter.commondialog import Dialog
from typing import ClassVar, Final
if sys.version_info >= (3, 9):
__all__ = [
"showinfo",
"showwarning",
"showerror",
"askquestion",
"askokcancel",
"askyesno",
"askyesnocancel",
"askretrycancel",
]
__all__ = ["showinfo", "showwarning", "showerror", "askquestion", "askokcancel", "askyesno", "askyesnocancel", "askretrycancel"]
ERROR: Final = "error"
INFO: Final = "info"