This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bmoyles
Recipients bmoyles, serhiy.storchaka, terry.reedy, vstinner
Date 2017-09-08.21:43:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504906986.07.0.124868105036.issue31026@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2017-09-08 21:43:06bmoylessetrecipients: + bmoyles, terry.reedy, vstinner, serhiy.storchaka
2017-09-08 21:43:06bmoylessetmessageid: <1504906986.07.0.124868105036.issue31026@psf.upfronthosting.co.za>
2017-09-08 21:43:06bmoyleslinkissue31026 messages
2017-09-08 21:43:05bmoylescreate