From c9740ab7e3e812796fe7228e3f1ff17672e6f9ae Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 26 Jan 2021 18:14:28 +1100 Subject: [PATCH] Deprecate Tk/Tcl 8.4, to be removed in Pillow 10 (2023-01-02) --- docs/deprecations.rst | 8 ++++++++ docs/releasenotes/8.2.0.rst | 40 +++++++++++++++++++++++++++++++++++++ docs/releasenotes/index.rst | 1 + src/PIL/_tkinter_finder.py | 8 ++++++++ 4 files changed, 57 insertions(+) create mode 100644 docs/releasenotes/8.2.0.rst diff --git a/docs/deprecations.rst b/docs/deprecations.rst index 44aa2a795..fd2f5620e 100644 --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -25,6 +25,14 @@ vulnerability introduced in FreeType 2.6 (:cve:`CVE-2020-15999`). .. _2.10.4: https://sourceforge.net/projects/freetype/files/freetype2/2.10.4/ +Tk/Tcl 8.4 +~~~~~~~~~~ + +.. deprecated:: 8.2.0 + +Support for Tk/Tcl 8.4 is deprecated and will be removed in Pillow 10.0.0 (2023-01-02), +when Tk/Tcl 8.5 will be the minimum supported. + Image.show command parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/releasenotes/8.2.0.rst b/docs/releasenotes/8.2.0.rst new file mode 100644 index 000000000..8ddbc7f54 --- /dev/null +++ b/docs/releasenotes/8.2.0.rst @@ -0,0 +1,40 @@ +8.2.0 +----- + +Deprecations +============ + +Tk/Tcl 8.4 +^^^^^^^^^^ + +Support for Tk/Tcl 8.4 is deprecated and will be removed in Pillow 10.0.0 (2023-01-02), +when Tk/Tcl 8.5 will be the minimum supported. + +API Changes +=========== + +TODO +^^^^ + +TODO + +API Additions +============= + +TODO +^^^^ + +TODO + +Security +======== + +TODO + +Other Changes +============= + +TODO +^^^^ + +TODO diff --git a/docs/releasenotes/index.rst b/docs/releasenotes/index.rst index cd73de814..0930768e7 100644 --- a/docs/releasenotes/index.rst +++ b/docs/releasenotes/index.rst @@ -14,6 +14,7 @@ expected to be backported to earlier versions. .. toctree:: :maxdepth: 2 + 8.2.0 8.1.0 8.0.1 8.0.0 diff --git a/src/PIL/_tkinter_finder.py b/src/PIL/_tkinter_finder.py index 746359535..58aeffbfb 100644 --- a/src/PIL/_tkinter_finder.py +++ b/src/PIL/_tkinter_finder.py @@ -2,6 +2,7 @@ """ import sys import tkinter +import warnings from tkinter import _tkinter as tk if hasattr(sys, "pypy_find_executable"): @@ -10,3 +11,10 @@ else: TKINTER_LIB = tk.__file__ tk_version = str(tkinter.TkVersion) +if tk_version == "8.4": + warnings.warn( + "Support for Tk/Tcl 8.4 is deprecated and will be removed" + " in Pillow 10 (2023-01-02). Please upgrade to Tk/Tcl 8.5 " + "or newer.", + DeprecationWarning, + )