PyYAML and compatibility between python 2.6 and python 2.7
Matěj Cepl <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
while doing yamlish and bayeux (which uses yamlish) I have hit the
problem of incompatibility between repo() for floats between python 2.6
and 2.7 (and 3.1 I guess, but that isn't my problem yet, I don't support
python 3 yet).
I have a test
(https://gitorious.org/bayeux/bayeux/blobs/master/test/test_tap.py#line57)
which compares results of generation of TAP (and thus yamlish) stream
based on a JSON file. Unfortunately test fails on 2.7 with TAP file
generated by 2.6.
Diff looks like this (there are couple of hundreds of such diffs in my
file):
Parameter: GL_LUMINANCE_ALPHA16F
result: skip
returncode: 0
- time: 0.077721834182739258
+ time: 0.07772183418273926
...
The problem is the solution for bug http://bugs.python.org/issue7117.
Is there some way how to persuade PyYAML that it should generate
representations of floats with some controllable format? (and I insist
on generating YAML compatible stream, not generating Python objects)
Thanks for any answers,
Matěj
--
http://www.ceplovi.cz/matej/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
If you have a problem and you think awk(1) is the solution, then
you have two problems.
-- David Tilbrook (at least 1989, source of the later famous
jwz rant on regular expressions).
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core