Skip to content

Commit

Permalink
[Core] ray.util.Queue Empty and Full exceptions extend queue.Empty an…
Browse files Browse the repository at this point in the history
…d Full (#50261)

Signed-off-by: Ibrahim Rabbani <[email protected]>
  • Loading branch information
israbbani authored Feb 6, 2025
1 parent a1e86a4 commit d8a4cd7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions python/ray/_private/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import traceback
from collections import defaultdict
from contextlib import contextmanager, redirect_stderr, redirect_stdout

from typing import Any, Callable, Dict, List, Optional, Tuple
import uuid
from dataclasses import dataclass
Expand Down
2 changes: 1 addition & 1 deletion python/ray/tests/test_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import ray
from ray.exceptions import GetTimeoutError, RayActorError
from ray.util.queue import Queue, Empty, Full
from ray.util.queue import Empty, Full, Queue
from ray._private.test_utils import wait_for_condition, BatchQueue


Expand Down
5 changes: 3 additions & 2 deletions python/ray/util/queue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import queue
from typing import Optional, Any, List, Dict
from collections.abc import Iterable

Expand All @@ -7,12 +8,12 @@


@PublicAPI(stability="beta")
class Empty(Exception):
class Empty(queue.Empty):
pass


@PublicAPI(stability="beta")
class Full(Exception):
class Full(queue.Full):
pass


Expand Down

0 comments on commit d8a4cd7

Please sign in to comment.