Skip to content
Snippets Groups Projects
Commit e3efcdc2 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

more deprecation

parent 9d1d4542
No related branches found
No related tags found
1 merge request!111MAINT: LinkAhead rename
...@@ -28,6 +28,7 @@ from __future__ import absolute_import, print_function, unicode_literals ...@@ -28,6 +28,7 @@ from __future__ import absolute_import, print_function, unicode_literals
import logging import logging
import ssl import ssl
import sys import sys
from warnings import warn
import warnings import warnings
from builtins import str # pylint: disable=redefined-builtin from builtins import str # pylint: disable=redefined-builtin
from errno import EPIPE as BrokenPipe from errno import EPIPE as BrokenPipe
...@@ -294,6 +295,14 @@ class _DefaultLinkAheadServerConnection(LinkAheadServerConnection): ...@@ -294,6 +295,14 @@ class _DefaultLinkAheadServerConnection(LinkAheadServerConnection):
self._session.verify = verify self._session.verify = verify
class _DefaultCaosDBServerConnection(_DefaultLinkAheadServerConnection):
def __init__(self, *args, **kwargs):
warn(("The name _DefaultCaosDBServerConnection is deprecated. Please use "
"_DefaultLinkAheadServerConnection."),
DeprecationWarning)
super().__init__(*args, **kwargs)
def _make_conf(*conf): def _make_conf(*conf):
"""_make_conf. """_make_conf.
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
# #
"""This module defines the LinkAheadServerConnection interface.""" """This module defines the LinkAheadServerConnection interface."""
from abc import ABCMeta, abstractmethod, abstractproperty from abc import ABCMeta, abstractmethod, abstractproperty
from warnings import warn
# meta class compatible with Python 2 *and* 3: # meta class compatible with Python 2 *and* 3:
ABC = ABCMeta('ABC', (object, ), {'__slots__': ()}) ABC = ABCMeta('ABC', (object, ), {'__slots__': ()})
...@@ -72,6 +73,13 @@ class LinkAheadHTTPResponse(ABC): ...@@ -72,6 +73,13 @@ class LinkAheadHTTPResponse(ABC):
""" """
class CaosDBHTTPResponse(LinkAheadHTTPResponse):
def __init__(self, *args, **kwargs):
warn(("The name CaosDBHTTPResponse is deprecated. Please use LinkAheadHTTPResponse."),
DeprecationWarning)
super().__init__(*args, **kwargs)
class LinkAheadServerConnection(ABC): class LinkAheadServerConnection(ABC):
"""Abstract class which defines the interface for sending requests to the """Abstract class which defines the interface for sending requests to the
LinkAhead server.""" LinkAhead server."""
...@@ -95,3 +103,11 @@ class LinkAheadServerConnection(ABC): ...@@ -95,3 +103,11 @@ class LinkAheadServerConnection(ABC):
------- -------
None None
""" """
class CaosDBServerConnection(LinkAheadServerConnection):
def __init__(self, *args, **kwargs):
warn(("The name CaosDBServerConnection is deprecated. Please use "
"LinkAheadServerConnection."),
DeprecationWarning)
super().__init__(*args, **kwargs)
...@@ -108,6 +108,14 @@ class LinkAheadConnectionError(LinkAheadException): ...@@ -108,6 +108,14 @@ class LinkAheadConnectionError(LinkAheadException):
LinkAheadException.__init__(self, msg) LinkAheadException.__init__(self, msg)
class CaosDBConnectionError(LinkAheadConnectionError):
def __init__(self, *args, **kwargs):
warn(("The name CaosDBConnectionError is deprecated. "
"Please use LinkAheadConnectionError."),
DeprecationWarning)
super().__init__(*args, **kwargs)
class HTTPURITooLongError(HTTPClientError): class HTTPURITooLongError(HTTPClientError):
"""The URI of the last request was too long.""" """The URI of the last request was too long."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment