Skip to content

Commit c8d5e56

Browse files
authored
Remove frozen=True and slots=True from exceptions to avoid triggering context manager traceback issue (#51)
1 parent 191e155 commit c8d5e56

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stompman/errors.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,37 @@
77
from stompman.config import ConnectionParameters
88

99

10-
@dataclass(frozen=True, kw_only=True, slots=True)
10+
@dataclass(kw_only=True)
1111
class Error(Exception):
1212
def __str__(self) -> str:
1313
return self.__repr__()
1414

1515

16-
@dataclass(frozen=True, kw_only=True, slots=True)
16+
@dataclass(kw_only=True)
1717
class ConnectionLostError(Error):
1818
"""Raised in stompman.AbstractConnection—and handled in stompman.ConnectionManager, therefore is private."""
1919

2020

21-
@dataclass(frozen=True, kw_only=True, slots=True)
21+
@dataclass(kw_only=True)
2222
class ConnectionConfirmationTimeoutError(Error):
2323
timeout: int
2424
frames: list[MessageFrame | ReceiptFrame | ErrorFrame | HeartbeatFrame]
2525

2626

27-
@dataclass(frozen=True, kw_only=True, slots=True)
27+
@dataclass(kw_only=True)
2828
class UnsupportedProtocolVersionError(Error):
2929
given_version: str
3030
supported_version: str
3131

3232

33-
@dataclass(frozen=True, kw_only=True, slots=True)
33+
@dataclass(kw_only=True)
3434
class FailedAllConnectAttemptsError(Error):
3535
servers: list["ConnectionParameters"]
3636
retry_attempts: int
3737
retry_interval: int
3838
timeout: int
3939

4040

41-
@dataclass(frozen=True, kw_only=True, slots=True)
41+
@dataclass(kw_only=True)
4242
class RepeatedConnectionLostError(Error):
4343
retry_attempts: int

0 commit comments

Comments
 (0)