refactoring: renamed sat package to libervia.backend

This commit is contained in:
Goffi 2023-06-02 11:49:51 +02:00
commit d2685ba11b
345 changed files with 1293 additions and 1293 deletions

View file

@ -19,7 +19,7 @@
"""base constructor class""" """base constructor class"""
from sat.bridge.bridge_constructor.constants import Const as C from libervia.backend.bridge.bridge_constructor.constants import Const as C
from configparser import NoOptionError from configparser import NoOptionError
import sys import sys
import os import os

View file

@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.bridge import bridge_constructor from libervia.backend.bridge import bridge_constructor
from sat.bridge.bridge_constructor.constants import Const as C from libervia.backend.bridge.bridge_constructor.constants import Const as C
from sat.bridge.bridge_constructor import constructors, base_constructor from libervia.backend.bridge.bridge_constructor import constructors, base_constructor
import argparse import argparse
from configparser import ConfigParser as Parser from configparser import ConfigParser as Parser
from importlib import import_module from importlib import import_module
@ -38,7 +38,7 @@ class BridgeConstructor(object):
for dir_ in os.listdir(constructors_dir): for dir_ in os.listdir(constructors_dir):
init_path = os.path.join(constructors_dir, dir_, "__init__.py") init_path = os.path.join(constructors_dir, dir_, "__init__.py")
constructor_path = os.path.join(constructors_dir, dir_, "constructor.py") constructor_path = os.path.join(constructors_dir, dir_, "constructor.py")
module_path = "sat.bridge.bridge_constructor.constructors.{}.constructor".format( module_path = "libervia.backend.bridge.bridge_constructor.constructors.{}.constructor".format(
dir_ dir_
) )
if os.path.isfile(init_path) and os.path.isfile(constructor_path): if os.path.isfile(init_path) and os.path.isfile(constructor_path):

View file

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core import constants from libervia.backend.core import constants
class Const(constants.Const): class Const(constants.Const):

View file

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.bridge.bridge_constructor import base_constructor from libervia.backend.bridge.bridge_constructor import base_constructor
from xml.dom import minidom from xml.dom import minidom
import sys import sys

View file

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.bridge.bridge_constructor import base_constructor from libervia.backend.bridge.bridge_constructor import base_constructor
class DbusConstructor(base_constructor.Constructor): class DbusConstructor(base_constructor.Constructor):

View file

@ -19,10 +19,10 @@
from types import MethodType from types import MethodType
from functools import partialmethod from functools import partialmethod
from twisted.internet import defer, reactor from twisted.internet import defer, reactor
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.exceptions import BridgeInitError from libervia.backend.core.exceptions import BridgeInitError
from sat.tools import config from libervia.backend.tools import config
from txdbus import client, objects, error from txdbus import client, objects, error
from txdbus.interface import DBusInterface, Method, Signal from txdbus.interface import DBusInterface, Method, Signal

View file

@ -19,10 +19,10 @@
import asyncio import asyncio
import dbus import dbus
import ast import ast
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.tools import config from libervia.backend.tools import config
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.exceptions import BridgeExceptionNoService, BridgeInitError from libervia.backend.core.exceptions import BridgeExceptionNoService, BridgeInitError
from dbus.mainloop.glib import DBusGMainLoop from dbus.mainloop.glib import DBusGMainLoop
from .bridge_frontend import BridgeException from .bridge_frontend import BridgeException

View file

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.bridge.bridge_constructor import base_constructor from libervia.backend.bridge.bridge_constructor import base_constructor
#  from textwraps import dedent #  from textwraps import dedent

View file

@ -17,4 +17,4 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.bridge.embedded import bridge from libervia.backend.bridge.embedded import bridge

View file

@ -17,10 +17,10 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from sat.core import exceptions from libervia.backend.core import exceptions
class _Bridge(object): class _Bridge(object):

View file

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.bridge.bridge_constructor import base_constructor from libervia.backend.bridge.bridge_constructor import base_constructor
import sys import sys
from datetime import datetime from datetime import datetime
import re import re

View file

@ -16,7 +16,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.bridge.bridge_constructor import base_constructor from libervia.backend.bridge.bridge_constructor import base_constructor
class pbConstructor(base_constructor.Constructor): class pbConstructor(base_constructor.Constructor):

View file

@ -23,8 +23,8 @@ from functools import partial
from pathlib import Path from pathlib import Path
from twisted.spread import jelly, pb from twisted.spread import jelly, pb
from twisted.internet import reactor from twisted.internet import reactor
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools import config from libervia.backend.tools import config
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -23,8 +23,8 @@ from pathlib import Path
from twisted.spread import pb from twisted.spread import pb
from twisted.internet import reactor, defer from twisted.internet import reactor, defer
from twisted.internet.error import ConnectionRefusedError, ConnectError from twisted.internet.error import ConnectionRefusedError, ConnectError
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.tools import config from libervia.backend.tools import config
from sat_frontends.bridge.bridge_frontend import BridgeException from sat_frontends.bridge.bridge_frontend import BridgeException
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -19,10 +19,10 @@
from types import MethodType from types import MethodType
from functools import partialmethod from functools import partialmethod
from twisted.internet import defer, reactor from twisted.internet import defer, reactor
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.exceptions import BridgeInitError from libervia.backend.core.exceptions import BridgeInitError
from sat.tools import config from libervia.backend.tools import config
from txdbus import client, objects, error from txdbus import client, objects, error
from txdbus.interface import DBusInterface, Method, Signal from txdbus.interface import DBusInterface, Method, Signal

View file

@ -23,8 +23,8 @@ from functools import partial
from pathlib import Path from pathlib import Path
from twisted.spread import jelly, pb from twisted.spread import jelly, pb
from twisted.internet import reactor from twisted.internet import reactor
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools import config from libervia.backend.tools import config
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -23,7 +23,7 @@ except ImportError:
BaseDirectory = None BaseDirectory = None
from os.path import dirname from os.path import dirname
from typing import Final from typing import Final
import sat from libervia import backend
class Const(object): class Const(object):
@ -35,7 +35,7 @@ class Const(object):
APP_NAME_FILE = "libervia" APP_NAME_FILE = "libervia"
APP_NAME_FULL = f"{APP_NAME} ({APP_COMPONENT})" APP_NAME_FULL = f"{APP_NAME} ({APP_COMPONENT})"
APP_VERSION = ( APP_VERSION = (
sat.__version__ backend.__version__
) # Please add 'D' at the end of version in sat/VERSION for dev versions ) # Please add 'D' at the end of version in sat/VERSION for dev versions
APP_RELEASE_NAME = "La Ruche" APP_RELEASE_NAME = "La Ruche"
APP_URL = "https://libervia.org" APP_URL = "https://libervia.org"
@ -487,7 +487,7 @@ if (
import os import os
# we use parent of "sat" module dir as last config path, this is useful for # we use parent of "sat" module dir as last config path, this is useful for
# per instance configurations (e.g. a dev instance and a main instance) # per instance configurations (e.g. a dev instance and a main instance)
root_dir = dirname(dirname(sat.__file__)) + '/' root_dir = dirname(dirname(backend.__file__)) + '/'
Const.CONFIG_PATHS = ( Const.CONFIG_PATHS = (
# /etc/_sat.conf is used for system-related settings (e.g. when media_dir # /etc/_sat.conf is used for system-related settings (e.g. when media_dir
# is set by the distribution and has not reason to change, or in a Docker # is set by the distribution and has not reason to change, or in a Docker

View file

@ -19,7 +19,7 @@
from typing import Callable, cast from typing import Callable, cast
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
@ -27,13 +27,13 @@ try:
import gettext import gettext
_ = gettext.translation("sat", "i18n", fallback=True).gettext _ = gettext.translation("libervia_backend", "i18n", fallback=True).gettext
_translators = {None: gettext.NullTranslations()} _translators = {None: gettext.NullTranslations()}
def language_switch(lang=None): def language_switch(lang=None):
if not lang in _translators: if not lang in _translators:
_translators[lang] = gettext.translation( _translators[lang] = gettext.translation(
"sat", languages=[lang], fallback=True "libervia_backendt", languages=[lang], fallback=True
) )
_translators[lang].install() _translators[lang].install()

View file

@ -25,10 +25,10 @@ from pathlib import Path
from configparser import ConfigParser from configparser import ConfigParser
from twisted.application import app from twisted.application import app
from twisted.python import usage from twisted.python import usage
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
class SatLogger(app.AppLogger): class LiberviaLogger(app.AppLogger):
def start(self, application): def start(self, application):
# logging is initialised by sat.core.log_config via the Twisted plugin, nothing # logging is initialised by sat.core.log_config via the Twisted plugin, nothing
@ -201,7 +201,7 @@ class Launcher:
from twisted.scripts._twistd_unix import (ServerOptions, from twisted.scripts._twistd_unix import (ServerOptions,
UnixApplicationRunner as app_runner) UnixApplicationRunner as app_runner)
app_runner.loggerFactory = SatLogger app_runner.loggerFactory = LiberviaLogger
server_options = ServerOptions() server_options = ServerOptions()
config = self.get_config() config = self.get_config()
pid_file = self.get_pid_file(config) pid_file = self.get_pid_file(config)

View file

@ -28,9 +28,9 @@ if TYPE_CHECKING:
else: else:
_ExcInfoType = Any _ExcInfoType = Any
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.tools.common.ansi import ANSI as A from libervia.backend.tools.common.ansi import ANSI as A
from sat.core import exceptions from libervia.backend.core import exceptions
import traceback import traceback
backend = None backend = None

View file

@ -20,8 +20,8 @@
"""High level logging functions""" """High level logging functions"""
# XXX: this module use standard logging module when possible, but as SàT can work in different cases where logging is not the best choice (twisted, pyjamas, etc), it is necessary to have a dedicated module. Additional feature like environment variables and colors are also managed. # XXX: this module use standard logging module when possible, but as SàT can work in different cases where logging is not the best choice (twisted, pyjamas, etc), it is necessary to have a dedicated module. Additional feature like environment variables and colors are also managed.
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core import log from libervia.backend.core import log
class TwistedLogger(log.Logger): class TwistedLogger(log.Logger):
@ -392,7 +392,7 @@ def sat_configure(backend=C.LOG_BACKEND_STANDARD, const=None, backend_data=None)
global C global C
C = const C = const
log.C = const log.C = const
from sat.tools import config from libervia.backend.tools import config
import os import os
log_conf = {} log_conf = {}

View file

@ -1,8 +1,8 @@
import copy import copy
from twisted.words.protocols.jabber import xmlstream, sasl, client as tclient, jid from twisted.words.protocols.jabber import xmlstream, sasl, client as tclient, jid
from wokkel import client from wokkel import client
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -25,32 +25,32 @@ from pathlib import Path
from typing import Optional, List, Tuple, Dict from typing import Optional, List, Tuple, Dict
from wokkel.data_form import Option from wokkel.data_form import Option
import sat from libervia import backend
from sat.core.i18n import _, D_, language_switch from libervia.backend.core.i18n import _, D_, language_switch
from sat.core import patches from libervia.backend.core import patches
patches.apply() patches.apply()
from twisted.application import service from twisted.application import service
from twisted.internet import defer from twisted.internet import defer
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.internet import reactor from twisted.internet import reactor
from wokkel.xmppim import RosterItem from wokkel.xmppim import RosterItem
from sat.core import xmpp from libervia.backend.core import xmpp
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.memory import memory from libervia.backend.memory import memory
from sat.memory import cache from libervia.backend.memory import cache
from sat.memory import encryption from libervia.backend.memory import encryption
from sat.tools import async_trigger as trigger from libervia.backend.tools import async_trigger as trigger
from sat.tools import utils from libervia.backend.tools import utils
from sat.tools import image from libervia.backend.tools import image
from sat.tools.common import dynamic_import from libervia.backend.tools.common import dynamic_import
from sat.tools.common import regex from libervia.backend.tools.common import regex
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from sat.stdui import ui_contact_list, ui_profile_manager from libervia.backend.stdui import ui_contact_list, ui_profile_manager
import sat.plugins import libervia.backend.plugins
log = getLogger(__name__) log = getLogger(__name__)
@ -119,7 +119,7 @@ class SAT(service.Service):
return self._version_cache return self._version_cache
except AttributeError: except AttributeError:
self._version_cache = "{} « {} » ({})".format( self._version_cache = "{} « {} » ({})".format(
version, C.APP_RELEASE_NAME, utils.get_repository_data(sat) version, C.APP_RELEASE_NAME, utils.get_repository_data(backend)
) )
return self._version_cache return self._version_cache
else: else:
@ -283,8 +283,8 @@ class SAT(service.Service):
# FIXME: should use imp # FIXME: should use imp
# TODO: do not import all plugins if no needed: component plugins are not needed # TODO: do not import all plugins if no needed: component plugins are not needed
# if we just use a client, and plugin blacklisting should be possible in # if we just use a client, and plugin blacklisting should be possible in
# sat.conf # libervia.conf
plugins_path = Path(sat.plugins.__file__).parent plugins_path = Path(libervia.backend.plugins.__file__).parent
plugins_to_import = {} # plugins we still have to import plugins_to_import = {} # plugins we still have to import
for plug_path in plugins_path.glob("plugin_*"): for plug_path in plugins_path.glob("plugin_*"):
if plug_path.is_dir(): if plug_path.is_dir():
@ -306,7 +306,7 @@ class SAT(service.Service):
log.warning( log.warning(
f"{plug_name!r} is not a valid name for a plugin, ignoring it") f"{plug_name!r} is not a valid name for a plugin, ignoring it")
continue continue
plugin_path = f"sat.plugins.{plug_name}" plugin_path = f"libervia.backend.plugins.{plug_name}"
try: try:
__import__(plugin_path) __import__(plugin_path)
except exceptions.MissingModule as e: except exceptions.MissingModule as e:

View file

@ -41,17 +41,17 @@ from wokkel import component
from wokkel import delay from wokkel import delay
from zope.interface import implementer from zope.interface import implementer
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core import core_types from libervia.backend.core import core_types
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.memory import cache from libervia.backend.memory import cache
from sat.memory import encryption from libervia.backend.memory import encryption
from sat.memory import persistent from libervia.backend.memory import persistent
from sat.tools import xml_tools from libervia.backend.tools import xml_tools
from sat.tools import utils from libervia.backend.tools import utils
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -24,11 +24,11 @@ import pickle as pickle
import time import time
from typing import Any, Dict, Optional from typing import Any, Dict, Optional
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools.common import regex from libervia.backend.tools.common import regex
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -18,19 +18,19 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from typing import Optional from typing import Optional
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.words.protocols.jabber.error import StanzaError from twisted.words.protocols.jabber.error import StanzaError
from twisted.internet import defer from twisted.internet import defer
from twisted.internet import reactor from twisted.internet import reactor
from twisted.python import failure from twisted.python import failure
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.tools import xml_tools from libervia.backend.tools import xml_tools
from sat.memory import persistent from libervia.backend.memory import persistent
from wokkel import disco from wokkel import disco
from base64 import b64encode from base64 import b64encode
from hashlib import sha1 from hashlib import sha1

View file

@ -23,14 +23,14 @@ from typing import Optional
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.internet import defer from twisted.internet import defer
from twisted.python import failure from twisted.python import failure
from sat.core.core_types import EncryptionPlugin, EncryptionSession, MessageData from libervia.backend.core.core_types import EncryptionPlugin, EncryptionSession, MessageData
from sat.core.i18n import D_, _ from libervia.backend.core.i18n import D_, _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from sat.tools import utils from libervia.backend.tools import utils
from sat.memory import persistent from libervia.backend.memory import persistent
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -29,19 +29,19 @@ from collections import namedtuple
from twisted.python import failure from twisted.python import failure
from twisted.internet import defer, reactor, error from twisted.internet import defer, reactor, error
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.memory.sqla import Storage from libervia.backend.memory.sqla import Storage
from sat.memory.persistent import PersistentDict from libervia.backend.memory.persistent import PersistentDict
from sat.memory.params import Params from libervia.backend.memory.params import Params
from sat.memory.disco import Discovery from libervia.backend.memory.disco import Discovery
from sat.memory.crypto import BlockCipher from libervia.backend.memory.crypto import BlockCipher
from sat.memory.crypto import PasswordHasher from libervia.backend.memory.crypto import PasswordHasher
from sat.tools import config as tools_config from libervia.backend.tools import config as tools_config
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from sat.tools.common import regex from libervia.backend.tools.common import regex
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -3,8 +3,8 @@ from logging.config import fileConfig
from sqlalchemy import pool from sqlalchemy import pool
from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.ext.asyncio import create_async_engine
from alembic import context from alembic import context
from sat.memory import sqla_config from libervia.backend.memory import sqla_config
from sat.memory.sqla_mapping import Base from libervia.backend.memory.sqla_mapping import Base
# this is the Alembic Config object, which provides # this is the Alembic Config object, which provides
# access to the values within the .ini file in use. # access to the values within the .ini file in use.

View file

@ -7,7 +7,7 @@ Create Date: 2022-03-14 17:15:00.689871
""" """
from alembic import op from alembic import op
import sqlalchemy as sa import sqlalchemy as sa
from sat.memory.sqla_mapping import JID from libervia.backend.memory.sqla_mapping import JID
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.

View file

@ -7,7 +7,7 @@ Create Date: 2021-07-27 16:38:54.658212
""" """
from alembic import op from alembic import op
import sqlalchemy as sa import sqlalchemy as sa
from sat.memory.sqla_mapping import JID, Xml from libervia.backend.memory.sqla_mapping import JID, Xml
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.

View file

@ -16,21 +16,21 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.memory.crypto import BlockCipher, PasswordHasher from libervia.backend.memory.crypto import BlockCipher, PasswordHasher
from xml.dom import minidom, NotFoundErr from xml.dom import minidom, NotFoundErr
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from twisted.internet import defer from twisted.internet import defer
from twisted.python.failure import Failure from twisted.python.failure import Failure
from twisted.words.xish import domish from twisted.words.xish import domish
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from sat.tools.xml_tools import params_xml_2_xmlui, get_text from libervia.backend.tools.xml_tools import params_xml_2_xmlui, get_text
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from xml.sax.saxutils import quoteattr from xml.sax.saxutils import quoteattr
# TODO: params should be rewritten using Twisted directly instead of minidom # TODO: params should be rewritten using Twisted directly instead of minidom

View file

@ -19,8 +19,8 @@
from twisted.internet import defer from twisted.internet import defer
from twisted.python import failure from twisted.python import failure
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -48,14 +48,14 @@ from twisted.internet import defer
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.words.xish import domish from twisted.words.xish import domish
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.memory import migration from libervia.backend.memory import migration
from sat.memory import sqla_config from libervia.backend.memory import sqla_config
from sat.memory.sqla_mapping import ( from libervia.backend.memory.sqla_mapping import (
Base, Base,
Component, Component,
File, File,
@ -75,8 +75,8 @@ from sat.memory.sqla_mapping import (
SyncState, SyncState,
Thread, Thread,
) )
from sat.tools.common import uri from libervia.backend.tools.common import uri
from sat.tools.utils import aio, as_future from libervia.backend.tools.utils import aio, as_future
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -18,8 +18,8 @@
from pathlib import Path from pathlib import Path
from urllib.parse import quote from urllib.parse import quote
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.tools import config from libervia.backend.tools import config
def get_db_config() -> dict: def get_db_config() -> dict:

View file

@ -17,9 +17,9 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import D_, _ from libervia.backend.core.i18n import D_, _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from twisted.internet import defer from twisted.internet import defer

View file

@ -18,11 +18,11 @@
from pathlib import Path from pathlib import Path
from twisted.python.procutils import which from twisted.python.procutils import which
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools.common import async_process from libervia.backend.tools.common import async_process
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -18,16 +18,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from twisted.internet import defer from twisted.internet import defer
from twisted.web import client as web_client from twisted.web import client as web_client
from twisted.words.xish import domish from twisted.words.xish import domish
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.tools import xml_tools from libervia.backend.tools import xml_tools
import os import os
import os.path import os.path
import tempfile import tempfile

View file

@ -18,13 +18,13 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.tools import xml_tools from libervia.backend.tools import xml_tools
from twisted.internet import threads from twisted.internet import threads
from collections import OrderedDict from collections import OrderedDict
import calendar import calendar

View file

@ -17,13 +17,13 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from twisted.internet import threads from twisted.internet import threads
from collections import OrderedDict from collections import OrderedDict
import itertools import itertools

View file

@ -54,16 +54,16 @@ from twisted.words.protocols.jabber import error, jid
from twisted.words.xish import domish from twisted.words.xish import domish
from wokkel import pubsub, rsm from wokkel import pubsub, rsm
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.memory import persistent from libervia.backend.memory import persistent
from sat.memory.sqla_mapping import History, SubscriptionState from libervia.backend.memory.sqla_mapping import History, SubscriptionState
from sat.tools import utils from libervia.backend.tools import utils
from sat.tools.common import data_format, date_utils, tls, uri from libervia.backend.tools.common import data_format, date_utils, tls, uri
from sat.tools.common.async_utils import async_lru from libervia.backend.tools.common.async_utils import async_lru
from .ad_hoc import APAdHocService from .ad_hoc import APAdHocService
from .events import APEvents from .events import APEvents
@ -2463,7 +2463,7 @@ class APGateway:
comment_node = parent_item_parsed["comments"][0]["node"] comment_node = parent_item_parsed["comments"][0]["node"]
except (KeyError, IndexError): except (KeyError, IndexError):
# we don't have a comment node set for this item # we don't have a comment node set for this item
from sat.tools.xml_tools import pp_elt from libervia.backend.tools.xml_tools import pp_elt
log.info(f"{pp_elt(parent_item_elt.toXml())}") log.info(f"{pp_elt(parent_item_elt.toXml())}")
raise NotImplementedError() raise NotImplementedError()
else: else:

View file

@ -20,10 +20,10 @@ from twisted.words.protocols.jabber import jid
from twisted.words.xish import domish from twisted.words.xish import domish
from wokkel import data_form from wokkel import data_form
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -25,10 +25,10 @@ import shortuuid
from twisted.words.xish import domish from twisted.words.xish import domish
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.tools.common import date_utils, uri from libervia.backend.tools.common import date_utils, uri
from .constants import NS_AP_PUBLIC, TYPE_ACTOR, TYPE_EVENT, TYPE_ITEM from .constants import NS_AP_PUBLIC, TYPE_ACTOR, TYPE_EVENT, TYPE_ITEM

View file

@ -32,13 +32,13 @@ from twisted.internet import defer
from twisted.words.protocols.jabber import jid, error from twisted.words.protocols.jabber import jid, error
from wokkel import pubsub, rsm from wokkel import pubsub, rsm
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools.common import date_utils, uri from libervia.backend.tools.common import date_utils, uri
from sat.memory.sqla_mapping import SubscriptionState from libervia.backend.memory.sqla_mapping import SubscriptionState
from .constants import ( from .constants import (
NS_AP, MEDIA_TYPE_AP, CONTENT_TYPE_AP, TYPE_ACTOR, TYPE_INBOX, TYPE_SHARED_INBOX, NS_AP, MEDIA_TYPE_AP, CONTENT_TYPE_AP, TYPE_ACTOR, TYPE_INBOX, TYPE_SHARED_INBOX,

View file

@ -27,15 +27,15 @@ from twisted.words.protocols.jabber import jid, error
from twisted.words.xish import domish from twisted.words.xish import domish
from wokkel import rsm, pubsub, disco from wokkel import rsm, pubsub, disco
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.tools import image from libervia.backend.tools import image
from sat.tools.utils import ensure_deferred from libervia.backend.tools.utils import ensure_deferred
from sat.tools.web import download_file from libervia.backend.tools.web import download_file
from sat.memory.sqla_mapping import PubsubSub, SubscriptionState from libervia.backend.memory.sqla_mapping import PubsubSub, SubscriptionState
from .constants import ( from .constants import (
TYPE_ACTOR, TYPE_ACTOR,

View file

@ -25,18 +25,18 @@ import shortuuid
import unicodedata import unicodedata
from urllib.parse import urljoin, urlparse, quote, unquote from urllib.parse import urljoin, urlparse, quote, unquote
from pathlib import Path from pathlib import Path
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools import stream from libervia.backend.tools import stream
from sat.tools import video from libervia.backend.tools import video
from sat.tools.utils import ensure_deferred from libervia.backend.tools.utils import ensure_deferred
from sat.tools.common import regex from libervia.backend.tools.common import regex
from sat.tools.common import uri from libervia.backend.tools.common import uri
from sat.tools.common import files_utils from libervia.backend.tools.common import files_utils
from sat.tools.common import utils from libervia.backend.tools.common import utils
from sat.tools.common import tls from libervia.backend.tools.common import tls
from twisted.internet import defer, reactor from twisted.internet import defer, reactor
from twisted.words.protocols.jabber import error from twisted.words.protocols.jabber import error
from twisted.web import server, resource, static, http from twisted.web import server, resource, static, http

View file

@ -21,11 +21,11 @@ from functools import partial
from wokkel import data_form from wokkel import data_form
from twisted.internet import defer from twisted.internet import defer
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools.common import utils from libervia.backend.tools.common import utils
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -17,9 +17,9 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from twisted.conch.insults import insults from twisted.conch.insults import insults
from twisted.conch.telnet import TelnetTransport, TelnetBootstrapProtocol from twisted.conch.telnet import TelnetTransport, TelnetBootstrapProtocol
from twisted.internet import reactor, protocol, defer from twisted.internet import reactor, protocol, defer

View file

@ -17,16 +17,16 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.internet import reactor, protocol from twisted.internet import reactor, protocol
from sat.tools import trigger from libervia.backend.tools import trigger
from sat.tools.utils import clean_ustr from libervia.backend.tools.utils import clean_ustr
PLUGIN_INFO = { PLUGIN_INFO = {
C.PI_NAME: "Command export plugin", C.PI_NAME: "Command export plugin",

View file

@ -22,12 +22,12 @@ from twisted.internet import defer
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.words.protocols.jabber.xmlstream import XMPPHandler from twisted.words.protocols.jabber.xmlstream import XMPPHandler
from wokkel import disco, iwokkel from wokkel import disco, iwokkel
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.xmpp import SatXMPPEntity from libervia.backend.core.xmpp import SatXMPPEntity
from sat.tools import utils from libervia.backend.tools import utils
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -16,11 +16,11 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.xmpp import SatXMPPEntity from libervia.backend.core.xmpp import SatXMPPEntity
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from twisted.internet import defer from twisted.internet import defer
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid

View file

@ -20,12 +20,12 @@ from typing import Optional
from twisted.internet import defer from twisted.internet import defer
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.words.xish import domish from twisted.words.xish import domish
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.xmpp import SatXMPPEntity from libervia.backend.core.xmpp import SatXMPPEntity
from sat.tools import utils from libervia.backend.tools import utils
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -27,12 +27,12 @@ from twisted.internet import endpoints
from twisted.internet import reactor from twisted.internet import reactor
from twisted.internet import error from twisted.internet import error
from twisted.internet import interfaces from twisted.internet import interfaces
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools import xml_tools from libervia.backend.tools import xml_tools
from sat.tools import stream from libervia.backend.tools import stream
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -17,12 +17,12 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from sat.core import exceptions from libervia.backend.core import exceptions
try: try:
from langid.langid import LanguageIdentifier, model from langid.langid import LanguageIdentifier, model

View file

@ -17,13 +17,13 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.xmpp import SatXMPPEntity from libervia.backend.core.xmpp import SatXMPPEntity
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from sat.tools.common import uri from libervia.backend.tools.common import uri
from wokkel import disco, iwokkel, pubsub from wokkel import disco, iwokkel, pubsub
from zope.interface import implementer from zope.interface import implementer
from twisted.internet import defer from twisted.internet import defer

View file

@ -17,14 +17,14 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from sat.core.exceptions import UnknownEntityError from libervia.backend.core.exceptions import UnknownEntityError
# from sat.tools import trigger # from sat.tools import trigger

View file

@ -17,11 +17,11 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from wokkel import pubsub from wokkel import pubsub
from wokkel import generic from wokkel import generic

View file

@ -17,11 +17,11 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.memory import persistent from libervia.backend.memory import persistent
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.internet import defer from twisted.internet import defer

View file

@ -17,13 +17,13 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)
from twisted.internet import defer from twisted.internet import defer
from sat.core import exceptions from libervia.backend.core import exceptions
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from functools import partial from functools import partial
import collections import collections

View file

@ -18,12 +18,12 @@
import re import re
from twisted.python.procutils import which from twisted.python.procutils import which
from sat.tools.common import async_process from libervia.backend.tools.common import async_process
from sat.tools import utils from libervia.backend.tools import utils
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -16,19 +16,19 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.tools import xml_tools from libervia.backend.tools import xml_tools
from sat.memory.memory import Sessions from libervia.backend.memory.memory import Sessions
from sat.memory.crypto import PasswordHasher from libervia.backend.memory.crypto import PasswordHasher
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
import configparser import configparser
from twisted.internet import defer from twisted.internet import defer
from twisted.python.failure import Failure from twisted.python.failure import Failure
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from sat.tools.common import email as sat_email from libervia.backend.tools.common import email as sat_email
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -30,12 +30,12 @@ from twisted.internet import protocol
from twisted.internet import abstract from twisted.internet import abstract
from twisted.internet import error as int_error from twisted.internet import error as int_error
from twisted.internet import _sslverify from twisted.internet import _sslverify
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.tools.common import async_process from libervia.backend.tools.common import async_process
from sat.memory import params from libervia.backend.memory import params
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -25,12 +25,12 @@ import string
import shortuuid import shortuuid
from twisted.internet import defer from twisted.internet import defer
from twisted.python.procutils import which from twisted.python.procutils import which
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from sat.tools.common import async_process from libervia.backend.tools.common import async_process
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -25,13 +25,13 @@ from typing import Callable, Optional
from twisted.internet import defer from twisted.internet import defer
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools import utils from libervia.backend.tools import utils
from sat.tools import image from libervia.backend.tools import image
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -17,9 +17,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import json import json
from sat.core.i18n import _ from libervia.backend.core.i18n import _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -25,15 +25,15 @@ import treq
from twisted.internet import defer from twisted.internet import defer
from twisted.words.protocols.jabber import error as jabber_error from twisted.words.protocols.jabber import error as jabber_error
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core.core_types import SatXMPPEntity from libervia.backend.core.core_types import SatXMPPEntity
from sat.core.i18n import D_, _ from libervia.backend.core.i18n import D_, _
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools import xml_tools from libervia.backend.tools import xml_tools
from sat.tools import stream from libervia.backend.tools import stream
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from sat.tools.web import treq_client_no_ssl from libervia.backend.tools.web import treq_client_no_ssl
log = getLogger(__name__) log = getLogger(__name__)

View file

@ -22,14 +22,14 @@ from twisted.internet import defer
from twisted.words.protocols.jabber import jid from twisted.words.protocols.jabber import jid
from twisted.words.protocols.jabber import error from twisted.words.protocols.jabber import error
from twisted.words.protocols.jabber import sasl from twisted.words.protocols.jabber import sasl
from sat.core.i18n import _, D_ from libervia.backend.core.i18n import _, D_
from sat.core.constants import Const as C from libervia.backend.core.constants import Const as C
from sat.core import exceptions from libervia.backend.core import exceptions
from sat.core.log import getLogger from libervia.backend.core.log import getLogger
from sat.tools import utils from libervia.backend.tools import utils
from sat.tools.common import data_format from libervia.backend.tools.common import data_format
from sat.memory import persistent from libervia.backend.memory import persistent
from sat.tools.common import email as sat_email from libervia.backend.tools.common import email as sat_email
log = getLogger(__name__) log = getLogger(__name__)

Some files were not shown because too many files have changed in this diff Show more