Closed
Description
Version: redis-py 5.0.2
Description: The newly-introduced __init__()
on LockError
required a message
and fails without it.
Previously, once could raise LockError()
successfully.
Making message
a required positional argument fails existing code.
Here's a simple mockup reproduction:
from redis.exceptions import LockError
try:
raise LockError()
except LockError:
print("LockError raised")
(obviously that's not real code, but demonstrates LockError
with no message)
With the changes introduced in #3023 - specifically https://github.com/redis/redis-py/pull/3023/files#diff-38992dc598ce0eba5aba9cfd91541d9e61aaaf92387e88b5905685f7b3ffa129R85-R87
The same code raises:
TypeError: LockError.__init__() missing 1 required positional argument: 'message'
It's easy enough to fix on my end by adding a message
, but it wasn't a backwards-compatible change and broke stuff.
Metadata
Metadata
Assignees
Labels
No labels