Skip to content
Snippets Groups Projects
Commit 1d091007 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Replace deprecated @abstractpoperty and ABCMeta-based ABC

parent 7ea328a4
No related branches found
No related tags found
2 merge requests!143Release 0.15.0,!135Add and fix more type hints
......@@ -26,15 +26,13 @@ LinkAhead server.
Implementing modules muts provide a `get_authentication_provider()` method.
"""
from abc import ABCMeta, abstractmethod, abstractproperty
from abc import ABC, abstractmethod
import logging
from ..utils import urlencode
from ..interface import CaosDBServerConnection
from ..utils import parse_auth_token, auth_token_to_cookie
from ...exceptions import LoginFailedError
# meta class compatible with Python 2 *and* 3:
ABC = ABCMeta('ABC', (object, ), {'__slots__': ()})
_LOGGER = logging.getLogger(__name__)
......@@ -262,10 +260,12 @@ class CredentialsProvider(ABC):
None
"""
@abstractproperty
@property
@abstractmethod
def password(self):
"""password."""
@abstractproperty
@property
@abstractmethod
def username(self):
"""username."""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment