mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Remove Python's 'Six' package completely. #5357
2) Replace deprecated @abstractproperty with @property, @abstractmethod.
This commit is contained in:
@@ -18,7 +18,6 @@ from smtplib import SMTPConnectError, SMTPResponseException, \
|
||||
from socket import error as SOCKETErrorException
|
||||
from urllib.request import urlopen
|
||||
|
||||
import six
|
||||
import time
|
||||
from flask import current_app, render_template, url_for, make_response, \
|
||||
flash, Response, request, after_this_request, redirect, session
|
||||
@@ -227,8 +226,7 @@ class BrowserModule(PgAdminModule):
|
||||
blueprint = BrowserModule(MODULE_NAME, __name__)
|
||||
|
||||
|
||||
@six.add_metaclass(ABCMeta)
|
||||
class BrowserPluginModule(PgAdminModule):
|
||||
class BrowserPluginModule(PgAdminModule, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract base class for browser submodules.
|
||||
|
||||
@@ -351,11 +349,13 @@ class BrowserPluginModule(PgAdminModule):
|
||||
"""
|
||||
return []
|
||||
|
||||
@abstractproperty
|
||||
@property
|
||||
@abstractmethod
|
||||
def node_type(self):
|
||||
pass
|
||||
|
||||
@abstractproperty
|
||||
@property
|
||||
@abstractmethod
|
||||
def script_load(self):
|
||||
"""
|
||||
This property defines, when to load this script.
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
import six
|
||||
from flask import url_for, render_template
|
||||
from flask import render_template
|
||||
from flask_babel import gettext
|
||||
from pgadmin.browser import BrowserPluginModule
|
||||
from pgadmin.browser.utils import PGChildModule
|
||||
@@ -19,8 +18,7 @@ from pgadmin.utils.preferences import Preferences
|
||||
from pgadmin.utils.constants import PGADMIN_NODE
|
||||
|
||||
|
||||
@six.add_metaclass(ABCMeta)
|
||||
class CollectionNodeModule(PgAdminModule, PGChildModule):
|
||||
class CollectionNodeModule(PgAdminModule, PGChildModule, metaclass=ABCMeta):
|
||||
"""
|
||||
Base class for collection node submodules.
|
||||
"""
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
import simplejson as json
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
import six
|
||||
from flask import request, jsonify, render_template
|
||||
from flask_babel import gettext
|
||||
from flask_security import current_user, login_required
|
||||
@@ -139,8 +138,7 @@ class ServerGroupMenuItem(MenuItem):
|
||||
super(ServerGroupMenuItem, self).__init__(**kwargs)
|
||||
|
||||
|
||||
@six.add_metaclass(ABCMeta)
|
||||
class ServerGroupPluginModule(BrowserPluginModule):
|
||||
class ServerGroupPluginModule(BrowserPluginModule, metaclass=ABCMeta):
|
||||
"""
|
||||
Base class for server group plugins.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user