You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Backtrace to stderr on process exit due to redis.client.Redis.__del__()
Here is the trace:
Exception ignored in: <function Redis.__del__ at 0x7fcf29e50ca0>
Traceback (most recent call last):
File "/venv/lib/python3.8/site-packages/redis/client.py", line 491, in __del__
File "/venv/lib/python3.8/site-packages/redis/client.py", line 506, in close
File "/venv/lib/python3.8/site-packages/redis/connection.py", line 1155, in disconnect
File "/venv/lib/python3.8/site-packages/redis/connection.py", line 1062, in _checkpid
AttributeError: 'NoneType' object has no attribute 'getpid'
Occurs due to unloaded globals being referenced in methods called in destructors on process exit. See warning in Python docs here
This can be fixed in a couple of ways:
Add an exception handler to redis.client.Redis.__del__() as it appears has been done in many other destructors (
Add references to required globals to the redis.connection.ConnectionPool class and call via the references. The globals that require references in are os.getpid and chain (from itertools) afaict.
NOTE: It is quite hard to come up with a small piece of code to reproduce this issue as it is caused by a race in the unload order at exit. I'll try to come up with something reliable if req'd.
Version: 5.0.1
Platform: Python 3.8.18 on Ubuntu 20.04
Description: Backtrace to stderr on process exit due to
redis.client.Redis.__del__()
Here is the trace:
Occurs due to unloaded globals being referenced in methods called in destructors on process exit. See warning in Python docs here
This can be fixed in a couple of ways:
redis.client.Redis.__del__()
as it appears has been done in many other destructors (redis-py/redis/connection.py
Line 226 in d3a3ada
redis.connection.ConnectionPool
class and call via the references. The globals that require references in areos.getpid
andchain
(fromitertools
) afaict.NOTE: It is quite hard to come up with a small piece of code to reproduce this issue as it is caused by a race in the unload order at exit. I'll try to come up with something reliable if req'd.
NOTE: The issue is triggered by
redis-py/redis/client.py
Line 506 in d3a3ada
The text was updated successfully, but these errors were encountered: