[Python-3000] How best to handle failing tests in struni?
Jean-Paul Calderone
exarkun at divmod.com
Wed Jun 20 19:51:25 CEST 2007
On Wed, 20 Jun 2007 10:24:55 -0700, Guido van Rossum <guido at python.org> wrote:
>On 6/20/07, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>> > So, my question is how best to handle this test (and thus other tests
>> > like it). Should it just continue to fail until someone fixes
>> > _bsddb.c to accept Unicode keys (and thus start up a FAILING file
>> > listing the various tests that are failing and doc which ones are
>> > expected to fail until something specific changes)? Or do we silence
>> > the failure by making the constants pass through str8? Or should str8
>> > not even be used at all since (I assume) it won't survive the merge
>> > back into p3yk?
>>
>> This goes back to the text-vs-binary debate. I _think_ bsddb inherently
>> operates on binary data, i.e. neither keys nor values need to be text
>> in some sense.
>>
>> So the most natural way would be to make it accept binary data only on
>> input, and always produce binary data on output. Any *usage* that
>> expect to be able to pass in strings is broken.
>
>OTOH, pragmatically, people will generally use text strings for db keys.
>
>I'm not sure how to decide this; perhaps we need to take it public.
If it helps, after having used bsddb for a couple years and developed a
non-trivial library on top of it, what Martin said seems most sensible to
me.
Jean-Paul
More information about the Python-3000
mailing list