# HG changeset patch # User Mads Kiilerich # Date 2020-04-23 22:22:48 # Node ID f644fc6bbfc39c547f21fb9923b84ed39e14ed65 # Parent 3a02b678b5e78afe8a555a4958a1e4e63488054c tg: drop kallithea.config.environment - it doesn't do much and isn't a TG 2.4 convention diff --git a/kallithea/config/application.py b/kallithea/config/application.py --- a/kallithea/config/application.py +++ b/kallithea/config/application.py @@ -14,11 +14,11 @@ """WSGI middleware initialization for the Kallithea application.""" from kallithea.config.app_cfg import base_config -from kallithea.config.environment import load_environment __all__ = ['make_app'] +load_environment = base_config.make_load_environment() # Use base_config to setup the necessary PasteDeploy application factory. # make_base_app will wrap the TurboGears2 app with all the middleware it needs. make_base_app = base_config.setup_tg_wsgi_app(load_environment) diff --git a/kallithea/config/environment.py b/kallithea/config/environment.py deleted file mode 100644 --- a/kallithea/config/environment.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -"""WSGI environment setup for Kallithea.""" - -from kallithea.config.app_cfg import base_config - - -__all__ = ['load_environment'] - -# Use base_config to setup the environment loader function -load_environment = base_config.make_load_environment() diff --git a/kallithea/tests/scripts/manual_test_concurrency.py b/kallithea/tests/scripts/manual_test_concurrency.py --- a/kallithea/tests/scripts/manual_test_concurrency.py +++ b/kallithea/tests/scripts/manual_test_concurrency.py @@ -37,7 +37,7 @@ from subprocess import PIPE, Popen from paste.deploy import appconfig from sqlalchemy import engine_from_config -from kallithea.config.environment import load_environment +import kallithea.config.application from kallithea.lib.auth import get_crypt_password from kallithea.model import meta from kallithea.model.base import init_model @@ -47,7 +47,7 @@ from kallithea.tests.base import HG_REPO rel_path = dirname(dirname(dirname(dirname(os.path.abspath(__file__))))) conf = appconfig('config:development.ini', relative_to=rel_path) -load_environment(conf.global_conf, conf.local_conf) +kallithea.config.application.make_app(conf.global_conf, **conf.local_conf) USER = TEST_USER_ADMIN_LOGIN PASS = TEST_USER_ADMIN_PASS