1) Remove Python's 'Six' package completely. #5357

2) Replace deprecated @abstractproperty with @property, @abstractmethod.
This commit is contained in:
Akshay Joshi
2022-09-26 12:47:31 +05:30
parent fc8d6d6e90
commit 0b6b2e733a
15 changed files with 37 additions and 70 deletions

View File

@@ -6,7 +6,6 @@
# This software is released under the PostgreSQL Licence
#
##########################################################################
import six
from pgadmin.utils.dynamic_registry import create_registry_metaclass
from .registry import TestModuleRegistry, TestNamedRegistry, TestNameBase
from .test1 import TestModule1
@@ -86,8 +85,7 @@ def test_create_base_class():
'RegistryWithBaseClass', __package__, decorate_as_module=False
)
@six.add_metaclass(RegistryWithBaseClass)
class TestBase(object):
class TestBase(object, metaclass=RegistryWithBaseClass):
pass
registry = RegistryWithBaseClass._registry

View File

@@ -6,7 +6,6 @@
# This software is released under the PostgreSQL Licence
#
##########################################################################
import six
from pgadmin.utils.dynamic_registry import create_registry_metaclass
@@ -20,13 +19,11 @@ TestNamedRegistry = create_registry_metaclass(
)
@six.add_metaclass(TestModuleRegistry)
class TestModuleBase(object):
class TestModuleBase(object, metaclass=TestModuleRegistry):
pass
@six.add_metaclass(TestNamedRegistry)
class TestNameBase(object):
class TestNameBase(object, metaclass=TestNamedRegistry):
pass