Compare commits

..

No commits in common. "8c5543814037989dfcbb684d94ae94f10326aed9" and "2ff56965d9ed9e091f3e31dc16ff1f12807e94c9" have entirely different histories.

5 changed files with 12 additions and 16 deletions

View File

@ -61,8 +61,7 @@ class RemotePull(LazyLogging):
""" """
clone repository from remote source clone repository from remote source
""" """
with TemporaryDirectory(ignore_cleanup_errors=True) as dir_name: with TemporaryDirectory(ignore_cleanup_errors=True) as dir_name, (clone_dir := Path(dir_name)):
clone_dir = Path(dir_name)
Sources.fetch(clone_dir, self.remote_source) Sources.fetch(clone_dir, self.remote_source)
self.repo_copy(clone_dir) self.repo_copy(clone_dir)

View File

@ -115,8 +115,7 @@ class RemotePush(LazyLogging):
result(Result): build result result(Result): build result
""" """
try: try:
with TemporaryDirectory(ignore_cleanup_errors=True) as dir_name: with TemporaryDirectory(ignore_cleanup_errors=True) as dir_name, (clone_dir := Path(dir_name)):
clone_dir = Path(dir_name)
Sources.fetch(clone_dir, self.remote_source) Sources.fetch(clone_dir, self.remote_source)
Sources.push(clone_dir, self.remote_source, *self.packages_update(result, clone_dir), Sources.push(clone_dir, self.remote_source, *self.packages_update(result, clone_dir),
commit_author=self.commit_author) commit_author=self.commit_author)

View File

@ -84,9 +84,10 @@ class Executor(Cleaner):
result = Result() result = Result()
for single in updates: for single in updates:
with self.in_package_context(single.base), TemporaryDirectory(ignore_cleanup_errors=True) as dir_name: with self.in_package_context(single.base), \
TemporaryDirectory(ignore_cleanup_errors=True) as dir_name, (build_dir := Path(dir_name)):
try: try:
build_single(single, Path(dir_name)) build_single(single, build_dir)
result.add_success(single) result.add_success(single)
except Exception: except Exception:
self.reporter.set_failed(single.base) self.reporter.set_failed(single.base)

View File

@ -160,15 +160,13 @@ def setup_service(architecture: str, configuration: Configuration, spawner: Spaw
application.logger.info("setup process spawner") application.logger.info("setup process spawner")
application["spawn"] = spawner application["spawn"] = spawner
# disable debug panel as it is not compatible with python 3.11 at the moment application.logger.info("setup debug panel")
# https://github.com/aio-libs/aiohttp-debugtoolbar/issues/477 debug_enabled = configuration.getboolean("web", "debug", fallback=False)
# application.logger.info("setup debug panel") if debug_enabled:
# debug_enabled = configuration.getboolean("web", "debug", fallback=False) import aiohttp_debugtoolbar # type: ignore[import]
# if debug_enabled: aiohttp_debugtoolbar.setup(application,
# import aiohttp_debugtoolbar # type: ignore[import] hosts=configuration.getlist("web", "debug_allowed_hosts", fallback=[]),
# aiohttp_debugtoolbar.setup(application, check_host=configuration.getboolean("web", "debug_check_host", fallback=False))
# hosts=configuration.getlist("web", "debug_allowed_hosts", fallback=[]),
# check_host=configuration.getboolean("web", "debug_check_host", fallback=False))
application.logger.info("setup authorization") application.logger.info("setup authorization")
validator = application["validator"] = Auth.load(configuration, database) validator = application["validator"] = Auth.load(configuration, database)

View File

@ -120,7 +120,6 @@ def test_run_with_auth(application_with_auth: Application, mocker: MockerFixture
) )
@pytest.mark.skip(reason="https://github.com/aio-libs/aiohttp-debugtoolbar/issues/477")
def test_run_with_debug(application_with_debug: Application, mocker: MockerFixture) -> None: def test_run_with_debug(application_with_debug: Application, mocker: MockerFixture) -> None:
""" """
must run application with enabled debug panel must run application with enabled debug panel