Message301740
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? |
|
Date |
User |
Action |
Args |
2017-09-08 21:43:06 | bmoyles | set | recipients:
+ bmoyles, terry.reedy, vstinner, serhiy.storchaka |
2017-09-08 21:43:06 | bmoyles | set | messageid: <1504906986.07.0.124868105036.issue31026@psf.upfronthosting.co.za> |
2017-09-08 21:43:06 | bmoyles | link | issue31026 messages |
2017-09-08 21:43:05 | bmoyles | create | |
|