Skip to content

Commit

Permalink
Revert "fix(bug): fix the TimeoutError in Python 3.11 and add CI for …
Browse files Browse the repository at this point in the history
…Python==…"

This reverts commit 3711257.
  • Loading branch information
idocx authored Oct 7, 2024
1 parent 3711257 commit e133c42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 5 additions & 11 deletions alab_management/resource_manager/resource_requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e133c42

Please sign in to comment.