diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 118c4818..947e43d5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,7 @@ jobs: timeout-minutes: 60 strategy: matrix: - python-version: ["3.10", "3.11"] + python-version: ["3.10"] services: rabbitmq: image: "rabbitmq:3.9" diff --git a/alab_management/resource_manager/resource_requester.py b/alab_management/resource_manager/resource_requester.py index c996b117..ff549a80 100644 --- a/alab_management/resource_manager/resource_requester.py +++ b/alab_management/resource_manager/resource_requester.py @@ -34,18 +34,12 @@ class RequestCanceledError(Exception): """Request Canceled Error.""" -# considering concurrent.futures.TimeoutError and TimeoutError becomes the same -# from Python 3.11. We should determine the base class of this exception. -if isinstance(concurrent.futures.TimeoutError, TimeoutError): - CombinedTimeoutError = TimeoutError -else: - - class CombinedTimeoutError(TimeoutError, concurrent.futures.TimeoutError): - """ - Combined TimeoutError. +class CombinedTimeoutError(TimeoutError, concurrent.futures.TimeoutError): + """ + Combined TimeoutError. - If you catch either TimeoutError or concurrent.futures.TimeoutError, this will catch both. - """ + If you catch either TimeoutError or concurrent.futures.TimeoutError, this will catch both. + """ class DeviceRequest(BaseModel):