From 60349e2ad3b48ef019ad7250fa59a3fb0e98feb9 Mon Sep 17 00:00:00 2001 From: Hongli Chen Date: Tue, 19 Mar 2024 08:54:41 -0700 Subject: [PATCH] fix: Move the `named_pipe_helper.py` under the folder `adaptor_runtime_client` Signed-off-by: Hongli Chen --- src/openjd/adaptor_runtime/_background/backend_runner.py | 2 +- src/openjd/adaptor_runtime/_background/frontend_runner.py | 2 +- .../_named_pipe/named_pipe_request_handler.py | 2 +- .../adaptor_runtime/_named_pipe/named_pipe_server.py | 8 ++++---- .../application_ipc/_win_adaptor_server.py | 2 +- .../named_pipe/named_pipe_helper.py | 2 +- src/openjd/adaptor_runtime_client/win_client_interface.py | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openjd/adaptor_runtime/_background/backend_runner.py b/src/openjd/adaptor_runtime/_background/backend_runner.py index 674cb3d..ffe91fe 100644 --- a/src/openjd/adaptor_runtime/_background/backend_runner.py +++ b/src/openjd/adaptor_runtime/_background/backend_runner.py @@ -19,7 +19,7 @@ if OSName.is_posix(): from .http_server import BackgroundHTTPServer if OSName.is_windows(): - from openjd.adaptor_runtime_client.named_pipe.named_pipe_helper import NamedPipeHelper + from ...adaptor_runtime_client.named_pipe.named_pipe_helper import NamedPipeHelper from .backend_named_pipe_server import WinBackgroundNamedPipeServer from .log_buffers import LogBuffer from .model import ConnectionSettings diff --git a/src/openjd/adaptor_runtime/_background/frontend_runner.py b/src/openjd/adaptor_runtime/_background/frontend_runner.py index 158bfd0..036e651 100644 --- a/src/openjd/adaptor_runtime/_background/frontend_runner.py +++ b/src/openjd/adaptor_runtime/_background/frontend_runner.py @@ -31,7 +31,7 @@ ) if OSName.is_windows(): - from openjd.adaptor_runtime_client.named_pipe.named_pipe_helper import NamedPipeHelper + from ...adaptor_runtime_client.named_pipe.named_pipe_helper import NamedPipeHelper import pywintypes _logger = logging.getLogger(__name__) diff --git a/src/openjd/adaptor_runtime/_named_pipe/named_pipe_request_handler.py b/src/openjd/adaptor_runtime/_named_pipe/named_pipe_request_handler.py index c22399d..742850d 100644 --- a/src/openjd/adaptor_runtime/_named_pipe/named_pipe_request_handler.py +++ b/src/openjd/adaptor_runtime/_named_pipe/named_pipe_request_handler.py @@ -6,7 +6,7 @@ if TYPE_CHECKING: # pragma: no cover because pytest will think we should test for this. from openjd.adaptor_runtime._named_pipe import NamedPipeServer -from openjd.adaptor_runtime_client.named_pipe.named_pipe_helper import ( +from ...adaptor_runtime_client.named_pipe.named_pipe_helper import ( NamedPipeHelper, PipeDisconnectedException, ) diff --git a/src/openjd/adaptor_runtime/_named_pipe/named_pipe_server.py b/src/openjd/adaptor_runtime/_named_pipe/named_pipe_server.py index 4a93079..5ba430a 100644 --- a/src/openjd/adaptor_runtime/_named_pipe/named_pipe_server.py +++ b/src/openjd/adaptor_runtime/_named_pipe/named_pipe_server.py @@ -8,19 +8,19 @@ from typing import List -from openjd.adaptor_runtime_client.named_pipe.named_pipe_config import ( +from ...adaptor_runtime_client.named_pipe.named_pipe_config import ( DEFAULT_NAMED_PIPE_TIMEOUT_MILLISECONDS, ) from typing import TYPE_CHECKING -from openjd.adaptor_runtime_client.named_pipe.named_pipe_helper import ( +from ...adaptor_runtime_client.named_pipe.named_pipe_helper import ( NamedPipeHelper, NamedPipeTimeoutError, ) if TYPE_CHECKING: - from openjd.adaptor_runtime._named_pipe import ResourceRequestHandler -from openjd.adaptor_runtime._osname import OSName + from .._named_pipe import ResourceRequestHandler +from .._osname import OSName import win32pipe import win32file diff --git a/src/openjd/adaptor_runtime/application_ipc/_win_adaptor_server.py b/src/openjd/adaptor_runtime/application_ipc/_win_adaptor_server.py index 4aaebdc..d269260 100644 --- a/src/openjd/adaptor_runtime/application_ipc/_win_adaptor_server.py +++ b/src/openjd/adaptor_runtime/application_ipc/_win_adaptor_server.py @@ -7,7 +7,7 @@ from ._named_pipe_request_handler import WinAdaptorServerResourceRequestHandler from .._named_pipe import ResourceRequestHandler -from openjd.adaptor_runtime_client.named_pipe.named_pipe_helper import NamedPipeHelper +from ...adaptor_runtime_client.named_pipe.named_pipe_helper import NamedPipeHelper from .._named_pipe.named_pipe_server import NamedPipeServer diff --git a/src/openjd/adaptor_runtime_client/named_pipe/named_pipe_helper.py b/src/openjd/adaptor_runtime_client/named_pipe/named_pipe_helper.py index 8795077..c01501f 100644 --- a/src/openjd/adaptor_runtime_client/named_pipe/named_pipe_helper.py +++ b/src/openjd/adaptor_runtime_client/named_pipe/named_pipe_helper.py @@ -19,7 +19,7 @@ import os -from openjd.adaptor_runtime_client.named_pipe.named_pipe_config import ( +from .named_pipe_config import ( NAMED_PIPE_BUFFER_SIZE, DEFAULT_MAX_NAMED_PIPE_INSTANCES, ) diff --git a/src/openjd/adaptor_runtime_client/win_client_interface.py b/src/openjd/adaptor_runtime_client/win_client_interface.py index af79e9b..7fbda98 100644 --- a/src/openjd/adaptor_runtime_client/win_client_interface.py +++ b/src/openjd/adaptor_runtime_client/win_client_interface.py @@ -9,7 +9,7 @@ from .base_client_interface import BaseClientInterface -from openjd.adaptor_runtime_client.named_pipe.named_pipe_helper import NamedPipeHelper +from .named_pipe.named_pipe_helper import NamedPipeHelper _DEFAULT_TIMEOUT_IN_SECONDS = 15