Skip to content

Commit

Permalink
Removing more unused stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Apr 17, 2024
1 parent aa88b78 commit d096370
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 1,177 deletions.
3 changes: 0 additions & 3 deletions sideboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
import sideboard.server

from sideboard.internal.imports import _discover_plugins
from sideboard.internal.logging import _configure_logging
import sideboard.run_mainloop

if 'SIDEBOARD_MODULE_TESTING' not in os.environ:
_discover_plugins()
_configure_logging()
6 changes: 1 addition & 5 deletions sideboard/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
from validate import Validator


class ConfigurationError(RuntimeError):
pass


def get_module_and_root_dirs(requesting_file_path, is_plugin):
"""
Returns the "module_root" and "root" directories for the given file path.
Expand Down Expand Up @@ -185,7 +181,7 @@ def parse_config(requesting_file_path, is_plugin=True):
unlink(temp_name)

if validation is not True:
raise ConfigurationError('configuration validation error(s) (): {!r}'.format(
raise RuntimeError('configuration validation error(s) (): {!r}'.format(
configobj.flatten_errors(config, validation))
)

Expand Down
9 changes: 0 additions & 9 deletions sideboard/configspec.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ ssl_version = string(default="PROTOCOL_TLSv1")
# in with any username using this password.
debug_password = string(default="testpassword")

# Sideboard has numerous background threads which wait on sideboard.lib.stopped
# to either sleep or bail immediately on shutdown. Since these threads wait in
# a loop, we don't want to set an interval too small or we'll eat a lot of CPU
# while doing absolutely nothing. A hard-coded value of 1 second would probably
# be fine for all workloads, but we've made it configurable just in case.
thread_wait_interval = float(default=1)

# Plugins can register different authenticators, since different applications may
# have different ideas about what it means to be "logged in". The default
# authenticator is mainly used for the /ws and /json RPC endpoints, so this
Expand Down Expand Up @@ -87,8 +80,6 @@ server.socket_host = string(default="127.0.0.1")
server.socket_port = integer(default=80)
server.thread_pool = integer(default=10)

tools.reset_threadlocal.on = boolean(default=True)

tools.sessions.on = boolean(default=True)
tools.sessions.path = string(default="/")
tools.sessions.timeout = integer(default=60)
Expand Down
243 changes: 0 additions & 243 deletions sideboard/internal/autolog.py

This file was deleted.

41 changes: 0 additions & 41 deletions sideboard/internal/logging.py

This file was deleted.

17 changes: 5 additions & 12 deletions sideboard/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
from __future__ import unicode_literals


from sideboard.internal.autolog import log
from sideboard.config import config, ConfigurationError, parse_config
from sideboard.lib._utils import is_listy, listify, serializer, cached_property, request_cached_property, class_property, entry_point, RWGuard
from sideboard.lib._cp import stopped, on_startup, on_shutdown, mainloop, ajax, renders_template, restricted, all_restricted, register_authenticator
from sideboard.lib._threads import threadlocal
from sideboard.config import parse_config, config
from sideboard.lib._utils import serializer, entry_point
import sideboard.lib._redissession

__all__ = ['log',
'ConfigurationError', 'parse_config',
'is_listy', 'listify', 'serializer', 'cached_property', 'class_property', 'entry_point',
'stopped', 'on_startup', 'on_shutdown', 'mainloop', 'ajax', 'renders_template',
'restricted', 'all_restricted', 'register_authenticator',
'threadlocal',
'listify', 'serializer', 'cached_property', 'request_cached_property', 'is_listy', 'entry_point', 'RWGuard']
__all__ = ['parse_config', 'config',
'serializer', 'entry_point']
Loading

0 comments on commit d096370

Please sign in to comment.