redis-py
redis-py copied to clipboard
sentinel: broken weakref on destruction
Pull Request check-list
Please make sure to review and check all of these items:
- [ ] Do tests and lints pass with this change?
- [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
- [ ] Is the new or changed code fully tested?
- [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
- [ ] Is there an example added to the examples folder (if applicable)?
- [ ] Was the change added to CHANGES file?
Description of change
This is basically just a copy of the changes that were made in #2771 to fix the problem reported in #2767, which only fixed the sync Sentinel. This is just the same changes applied to the async Sentinel.
Can this please be merged? I have the exact same problem as reported in #2767, but I'm using the async sentinel, so that the fix provided in #2771 does not help.
@gerzse, can this please be merged and included in a release?
+1
@gerzse, can you please take a look, or comment if the patch is no good? These Tracebacks just pollute my logs. I would rather be able to upgrade redis-py that have to downgrade to get rid of these
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/redis/asyncio/connection.py", line 214, in __del__
File "/usr/local/lib/python3.11/site-packages/redis/asyncio/sentinel.py", line 33, in __repr__
ReferenceError: weakly-referenced object no longer exists
Exception ignored in: <function AbstractConnection.__del__ at 0x7bacb7111ee0>
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/redis/asyncio/connection.py", line 214, in __del__
File "/usr/local/lib/python3.11/site-packages/redis/asyncio/sentinel.py", line 33, in __repr__
ReferenceError: weakly-referenced object no longer exists
Exception ignored in: <function AbstractConnection.__del__ at 0x7bacb7111ee0>
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/redis/asyncio/connection.py", line 214, in __del__
File "/usr/local/lib/python3.11/site-packages/redis/asyncio/sentinel.py", line 33, in __repr__
ReferenceError: weakly-referenced object no longer exists
Exception ignored in: <function AbstractConnection.__del__ at 0x7bacb7111ee0>
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/redis/asyncio/connection.py", line 214, in __del__
File "/usr/local/lib/python3.11/site-packages/redis/asyncio/sentinel.py", line 33, in __repr__
ReferenceError: weakly-referenced object no longer exists
+1
Im getting the error too, please take a look at PR
I inadvertently did the same thing in this pull request: https://github.com/redis/redis-py/pull/3321