Removed backward compatibility code as indicated in the respective TODO markers. eric7

Sat, 04 Mar 2023 16:32:32 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 04 Mar 2023 16:32:32 +0100
branch
eric7
changeset 9846
f5a17960408a
parent 9845
50d1cd44b2cb
child 9847
d8c7ded575cb

Removed backward compatibility code as indicated in the respective TODO markers.

eric7.epj file | annotate | diff | comparison | revisions
src/eric7/Documentation/Source/eric7.UI.PixmapCache.html file | annotate | diff | comparison | revisions
src/eric7/Globals/__init__.py file | annotate | diff | comparison | revisions
src/eric7/UI/PixmapCache.py file | annotate | diff | comparison | revisions
src/eric7/Utilities/__init__.py file | annotate | diff | comparison | revisions
--- a/eric7.epj	Sat Mar 04 16:04:23 2023 +0100
+++ b/eric7.epj	Sat Mar 04 16:32:32 2023 +0100
@@ -2127,7 +2127,6 @@
       "src/eric7/UI/LogView.py",
       "src/eric7/UI/NotificationWidget.py",
       "src/eric7/UI/NumbersWidget.py",
-      "src/eric7/UI/PixmapCache.py",
       "src/eric7/UI/Previewer.py",
       "src/eric7/UI/Previewers/MarkdownExtensions.py",
       "src/eric7/UI/Previewers/PreviewerHTML.py",
--- a/src/eric7/Documentation/Source/eric7.UI.PixmapCache.html	Sat Mar 04 16:04:23 2023 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html><head>
-<title>eric7.UI.PixmapCache</title>
-<meta charset="UTF-8">
-<link rel="stylesheet" href="styles.css">
-</head>
-<body>
-<a NAME="top" ID="top"></a>
-<h1>eric7.UI.PixmapCache</h1>
-
-<p>
-Module implementing a compatibility interface of the EricPixmapCache functionality to
-satisfy old plug-ins.
-</p>
-<h3>Global Attributes</h3>
-
-<table>
-<tr><td>addSearchPath</td></tr><tr><td>getCombinedIcon</td></tr><tr><td>getIcon</td></tr><tr><td>getPixmap</td></tr><tr><td>getSymlinkIcon</td></tr><tr><td>removeSearchPath</td></tr>
-</table>
-<h3>Classes</h3>
-
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Functions</h3>
-
-<table>
-<tr><td>None</td></tr>
-</table>
-<hr />
-</body></html>
\ No newline at end of file
--- a/src/eric7/Globals/__init__.py	Sat Mar 04 16:04:23 2023 +0100
+++ b/src/eric7/Globals/__init__.py	Sat Mar 04 16:32:32 2023 +0100
@@ -17,32 +17,7 @@
 
 from PyQt6.QtCore import QByteArray, QCoreApplication, QProcess, qVersion
 
-from eric7.SystemUtilities.DesktopUtilities import (  # __IGNORE_FLAKES_WARNING__
-    desktopName,
-    isGnomeDesktop,
-    isKdeDesktop,
-    isWaylandSession,
-    sessionType,
-)
-
-# TODO: remove these with release 23.4
-# imports from eric7.SystemUtilities are for backward compatibility
-from eric7.SystemUtilities.OSUtilities import (  # __IGNORE_FLAKES_WARNING__
-    isLinuxPlatform,
-    isMacPlatform,
-    isWindowsPlatform,
-)
-from eric7.SystemUtilities.PythonUtilities import (  # __IGNORE_FLAKES_WARNING__
-    getPythonExecutable,
-    getPythonLibraryDirectory,
-    getPythonScriptsDirectory,
-)
-from eric7.SystemUtilities.QtUtilities import (  # __IGNORE_FLAKES_WARNING__
-    getPyQt6ModulesDirectory,
-    getPyQtToolsPath,
-    getQtBinariesPath,
-    qVersionTuple,
-)
+from eric7.SystemUtilities import PythonUtilities
 
 try:
     from eric7.eric7config import getConfig
@@ -310,7 +285,7 @@
 
     scriptPath = os.path.join(getConfig("ericDir"), "Tools", "webBrowserSupport.py")
     proc = QProcess()
-    proc.start(getPythonExecutable(), [scriptPath, qVersion()])
+    proc.start(PythonUtilities.getPythonExecutable(), [scriptPath, qVersion()])
     variant = (
         str(proc.readAllStandardOutput(), "utf-8", "replace").strip()
         if proc.waitForFinished(10000)
--- a/src/eric7/UI/PixmapCache.py	Sat Mar 04 16:04:23 2023 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2022 - 2023 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing a compatibility interface of the EricPixmapCache functionality to
-satisfy old plug-ins.
-"""
-
-from eric7.EricGui import EricPixmapCache
-
-getPixmap = EricPixmapCache.getPixmap
-getIcon = EricPixmapCache.getIcon
-getSymlinkIcon = EricPixmapCache.getSymlinkIcon
-getCombinedIcon = EricPixmapCache.getCombinedIcon
-addSearchPath = EricPixmapCache.addSearchPath
-removeSearchPath = EricPixmapCache.removeSearchPath
-
-# TODO: remove this module with release 23.4
--- a/src/eric7/Utilities/__init__.py	Sat Mar 04 16:04:23 2023 +0100
+++ b/src/eric7/Utilities/__init__.py	Sat Mar 04 16:32:32 2023 +0100
@@ -34,77 +34,7 @@
 
 from eric7 import Preferences
 from eric7.EricWidgets.EricApplication import ericApp
-
-# TODO: remove these with release 23.4
-# imports from eric7.SystemUtilities are for backward compatibility
-from eric7.Globals import (  # __IGNORE_FLAKES_WARNING__
-    desktopName,
-    getConfig,
-    getConfigDir,
-    getPythonExecutable,
-    getPythonLibraryDirectory,
-    getPythonScriptsDirectory,
-    sessionType,
-    setConfigDir,
-    toBool,
-)
-from eric7.SystemUtilities import DesktopUtilities
-from eric7.SystemUtilities.FileSystemUtilities import (  # __IGNORE_FLAKES_WARNING__
-    absolutePath,
-    absoluteUniversalPath,
-    compactPath,
-    direntries,
-    findVolume,
-    fromNativeSeparators,
-    getDirs,
-    getExecutablePath,
-    getExecutablePaths,
-    getWindowsExecutablePath,
-    isDrive,
-    isExecutable,
-    isinpath,
-    joinext,
-    normabsjoinpath,
-    normcaseabspath,
-    normcasepath,
-    normjoinpath,
-    relativeUniversalPath,
-    samefilepath,
-    samepath,
-    splitPath,
-    startswithPath,
-    toNativeSeparators,
-)
-from eric7.SystemUtilities.OSUtilities import (  # __IGNORE_FLAKES_WARNING__
-    getEnvironmentEntry,
-    getHomeDir,
-    getRealName,
-    getUserName,
-    hasEnvironmentEntry,
-    isLinuxPlatform,
-    isMacPlatform,
-    isWindowsPlatform,
-    win32_getRealName,
-    win32_GetUserName,
-    win32_Kill,
-)
-from eric7.SystemUtilities.PythonUtilities import (  # __IGNORE_FLAKES_WARNING__
-    determinePythonVersion,
-    getPythonLibPath,
-    getPythonVersion,
-)
-from eric7.SystemUtilities.QtUtilities import (  # __IGNORE_FLAKES_WARNING__
-    checkPyside,
-    generatePyQtToolPath,
-    generatePySideToolPath,
-    generateQtToolName,
-    getPyQt6ModulesDirectory,
-    getPyQtToolsPath,
-    getQtBinariesPath,
-    getQtMacBundle,
-    prepareQtMacBundle,
-    qVersionTuple,
-)
+from eric7.SystemUtilities import DesktopUtilities, OSUtilities
 from eric7.UI.Info import Program, Version
 
 
@@ -1014,7 +944,7 @@
         return fn
     elif code in ["H", "%H"]:
         # home directory
-        return getHomeDir()
+        return OSUtilities.getHomeDir()
     elif code in ["L", "%L"]:
         # line of the cursor of the current editor
         aw = ericApp().getObject("ViewManager").activeWindow()
@@ -1039,7 +969,7 @@
         return text
     elif code in ["U", "%U"]:
         # username
-        un = getUserName()
+        un = OSUtilities.getUserName()
         if un is None:
             return code
         else:
@@ -1207,7 +1137,7 @@
     @rtype str
     """
     info = []
-    if isLinuxPlatform():
+    if OSUtilities.isLinuxPlatform():
         releaseList = glob.glob("/etc/*-release")
         if releaseList:
             info.append("Distribution Info:")

eric ide

mercurial