Brian Moyles added the comment:
I ran into the same problem when running the test suite against a fresh Python
3.6.2 build on Ubuntu 16.04. It specifically appears to be a problem with ndbm
and retrieving an empty byte string value:
Python 3.6.2 (default, Sep 8 2017, 18:31:28)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbm.gnu, dbm.ndbm
>>> g = dbm.gnu.open('gnudb', 'c')
>>> g['0'.encode('ascii')] = b''
>>> g.keys()
[b'0']
>>> g['0'.encode('ascii')]
b''
>>>
>>> n = dbm.ndbm.open('ndbm', 'c')
>>> n['0'.encode('ascii')] = b''
>>> n.keys()
[b'0']
>>> n['0'.encode('ascii')]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: b'0'
Same behavior when using the distribution's stock Python 3.5.2 so I suspect
there's a behavioral change in libdb that's not accounted for?
----------
nosy: +bmoyles
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31026>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com