[New-bugs-announce] [issue27360] _deque and _islice are sometimes None

David Delassus report at bugs.python.org
Tue Jun 21 04:22:50 EDT 2016


New submission from David Delassus:

With Python 3.4.3-r1 (on Gentoo x86_64), I have encountered a strange behavior with the library "riak==2.5.3".

When closing the client connection, the library calls ``self._stop.set()`` where ``self._stop`` is a ``threading.Event``.

The following error is raised (sometimes):

```
Exception ignored in: <bound method MultiPutPool.__del__ of <riak.client.multi.MultiPutPool object at 0x7fe166fe7dd8>>
Traceback (most recent call last):
  File "/home/linkdd/devel/projects/link-framework/venv3/lib/python3.4/site-packages/riak/client/multi.py", line 110, in __del__
  File "/home/linkdd/devel/projects/link-framework/venv3/lib/python3.4/site-packages/riak/client/multi.py", line 97, in stop
  File "/usr/lib64/python3.4/threading.py", line 518, in set
  File "/usr/lib64/python3.4/threading.py", line 360, in notify_all
  File "/usr/lib64/python3.4/threading.py", line 343, in notify
TypeError: 'NoneType' object is not callable
```

When going in the ``threading`` module, I have found the following line:

```
waiters_to_notify = _deque(_islice(all_waiters, n))
```

I added just before:

```
print(_deque, _islice, all_waiters, n)
```

Just to see that ``_deque`` and ``_islice`` are both **None**. They are imported from the modules ``collections`` and ``itertools`` correctly though.

----------
components: Library (Lib)
messages: 268974
nosy: linkdd
priority: normal
severity: normal
status: open
title: _deque and _islice are sometimes None
type: crash
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27360>
_______________________________________


More information about the New-bugs-announce mailing list