remove Python2 code

This commit is contained in:
mosfet80
2023-03-04 19:36:18 +01:00
committed by Chris Hennes
parent d03f287cf4
commit 3137dea940
79 changed files with 28 additions and 200 deletions

View File

@@ -153,7 +153,6 @@ class Addon:
self.display_name = self.name
self.url = url.strip()
self.branch = branch.strip()
self.python2 = False
self.obsolete = False
self.rejected = False
self.repo_type = Addon.Kind.WORKBENCH
@@ -277,7 +276,6 @@ class Addon:
"description": self.description,
"cached_icon_filename": self.get_cached_icon_filename(),
"best_icon_relative_path": self.get_best_icon_relative_path(),
"python2": self.python2,
"obsolete": self.obsolete,
"rejected": self.rejected,
"requires": list(self.requires),

View File

@@ -67,9 +67,6 @@ class CreateAddonListWorker(QtCore.QThread):
# These addons will print an additional message informing the user
self.obsolete = []
# These addons will print an additional message informing the user Python2 only
self.py2only = []
self.package_names = []
self.moddir = os.path.join(FreeCAD.getUserAppDataDir(), "Mod")
self.current_thread = None
@@ -242,8 +239,6 @@ class CreateAddonListWorker(QtCore.QThread):
repo.updated_timestamp = os.path.getmtime(md_file)
repo.verify_url_and_branch(url, branch)
if name in self.py2only:
repo.python2 = True
if name in self.mod_reject_list:
repo.rejected = True
if name in self.obsolete:

View File

@@ -347,16 +347,6 @@ class PackageDetails(QtWidgets.QWidget):
self.ui.labelWarningInfo.setStyleSheet(
"color:" + utils.warning_color_string()
)
elif repo.python2:
self.ui.labelWarningInfo.show()
self.ui.labelWarningInfo.setText(
"<h1>"
+ translate("AddonsInstaller", "WARNING: This addon is Python 2 Only")
+ "</h1>"
)
self.ui.labelWarningInfo.setStyleSheet(
"color:" + utils.warning_color_string()
)
elif required_version:
self.ui.labelWarningInfo.show()
self.ui.labelWarningInfo.setText(

View File

@@ -615,13 +615,6 @@ class PackageListFilter(QtCore.QSortFilterProxyModel):
if data.status() != Addon.Status.UPDATE_AVAILABLE:
return False
# If it's not installed, check to see if it's Py2 only
if (
data.status() == Addon.Status.NOT_INSTALLED
and self.hide_py2
and data.python2
):
return False
# If it's not installed, check to see if it's marked obsolete
if (