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

@@ -9,7 +9,6 @@
"""External 2FA Authentication Registry."""
from abc import abstractmethod, abstractproperty
import six
from typing import Union
import flask
@@ -50,8 +49,7 @@ MultiFactorAuthRegistry = create_registry_metaclass(
)
@six.add_metaclass(MultiFactorAuthRegistry)
class BaseMFAuth():
class BaseMFAuth(metaclass=MultiFactorAuthRegistry):
"""
Base Multi-Factor Authentication (MFA) class
@@ -60,7 +58,8 @@ class BaseMFAuth():
available as a MFA method.
"""
@abstractproperty
@property
@abstractmethod
def name(self) -> str:
"""
Represents the short name for the authentiation method. It can be used
@@ -74,7 +73,8 @@ class BaseMFAuth():
"""
pass
@abstractproperty
@property
@abstractmethod
def label(self) -> str:
"""
Represents the user visible name for the authentiation method. It will