[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#834059: dose-builddebcheck: outputs wrong yaml



Hi,

Quoting Ralf Treinen (2016-09-06 21:55:08)
> I just found an old email by Andreas Beckmann (who is using dose to find test
> candidates for piuparts) who came across this problem already in 2014. He
> just told be that he had solved the problem for piuparts by using the
> BaseLoader. Indeed, the Pyyaml documentation [1] says:
> 
>   BaseLoader(stream) does not resolve or support any tags and construct
>   only basic Python objects: lists, dictionaries and Unicode strings. 
> 
> and there is also a CBaseLoader(stream) when using the C bindings. This does
> seem to solve the pronlem, doesn't it ?

that there is a workaround for consumers using Python does not mean that dose3
is doing the right thing. It is still violating the yaml spec by printing a
value that is supposed to be a string in a format that the yaml spec defines to
be interpreted differently [1].

Also, not everybody is using Python:

    $ echo 'v: 1.2' | ruby -ryaml -e "puts YAML::load(STDIN.read)['v'].class"
    Float
    $ echo 'v: 0xffff' | ruby -ryaml -e "puts YAML::load(STDIN.read)['v']"
    65535

Thanks!

cheers, josch

[1] http://yaml.org/spec/1.2/spec.html#id2805071

Attachment: signature.asc
Description: signature


Reply to: