_tkinter_finder.py 525 B

1234567891011121314151617181920
  1. """ Find compiled module linking to Tcl / Tk libraries
  2. """
  3. import sys
  4. import tkinter
  5. import warnings
  6. from tkinter import _tkinter as tk
  7. if hasattr(sys, "pypy_find_executable"):
  8. TKINTER_LIB = tk.tklib_cffi.__file__
  9. else:
  10. TKINTER_LIB = tk.__file__
  11. tk_version = str(tkinter.TkVersion)
  12. if tk_version == "8.4":
  13. warnings.warn(
  14. "Support for Tk/Tcl 8.4 is deprecated and will be removed"
  15. " in Pillow 10 (2023-01-02). Please upgrade to Tk/Tcl 8.5 "
  16. "or newer.",
  17. DeprecationWarning,
  18. )