Skip to content

sentinel: broken weakref on destruction #3205

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jasonk
Copy link

@jasonk jasonk commented Apr 16, 2024

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.

@mdomke
Copy link

mdomke commented May 31, 2024

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.

@rad-pat
Copy link

rad-pat commented Jun 10, 2024

@gerzse, can this please be merged and included in a release?

@WolfEYc
Copy link

WolfEYc commented Jun 12, 2024

+1

@rad-pat
Copy link

rad-pat commented Jun 20, 2024

@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

@KyMaP13
Copy link

KyMaP13 commented Jul 12, 2024

+1

@KostyaLukyanchikov
Copy link

Im getting the error too, please take a look at PR

@DABND19
Copy link

DABND19 commented Aug 16, 2024

I inadvertently did the same thing in this pull request: #3321

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants