Commit Graph

325 Commits

Author SHA1 Message Date
Kirill Simonov
96fcba3d7f Improve output of float values. Fix #49. 2007-03-22 16:13:32 +00:00
Kirill Simonov
e5059a1d53 Add the tests for checking the libyaml bug. 2007-03-22 16:12:36 +00:00
Kirill Simonov
04ff8e6fa1 Fix the bug when the path in add_path_resolver contains boolean values. Fix #43 (thanks to jstroud(at)mbi.ucla.edu for reporting and pointing to the cause). 2007-02-23 20:45:35 +00:00
Kirill Simonov
21483f22d7 Use the types module instead of constructing type objects by hand. Fix #41. Thanks to v.haisman@sh.cvut.cz for the patch. 2006-12-08 15:36:53 +00:00
Kirill Simonov
ed79023a71 Fix loss of microsecond precision in datetime.datetime constructor (fix #30).
Thanks to edemaine@mit.edu for the bug report and the patch.
2006-10-04 07:42:50 +00:00
Kirill Simonov
cc9c738342 Fix loading an empty YAML stream. 2006-09-12 13:53:30 +00:00
Kirill Simonov
fb2fd2a6b4 Amend the announce message. 2006-08-20 18:26:02 +00:00
Kirill Simonov
be67e2df27 Update README and the announcement message. 2006-08-20 10:41:50 +00:00
Kirill Simonov
320c6976b9 Fix makefile and add setup.cfg. 2006-08-20 09:34:59 +00:00
Kirill Simonov
b4643e77c3 Fix a test to work under Python 2.3. 2006-08-20 09:10:47 +00:00
Kirill Simonov
1710a8d1b6 Preparing the next release. 2006-08-19 19:37:57 +00:00
Kirill Simonov
8f9b8bed40 The 'N' plain scalar was still recognized as `!!bool`. Fix it (close #26). 2006-08-16 21:07:47 +00:00
Kirill Simonov
29413ea88e Fix timestamp constructing and representing (close #25). 2006-08-16 18:22:38 +00:00
Kirill Simonov
17fa129ada Completely rewrite the libyaml bindings. 2006-08-13 13:46:20 +00:00
Kirill Simonov
8b083c6a96 Subclass all base classes from object.
Hold references to the objects being represented (should fix #22).

The value of a mapping node is represented as a list of pairs `(key, value)`
now.

Sort dictionary items (fix #23).

Recursive structures are now loaded and dumped correctly, including complex
structures like recursive tuples (fix #5). Thanks Peter Murphy for the patches.
To make it possible, representer functions are allowed to be generators.
In this case, the first generated value is an object. Other values produced
by the representer are ignored.

Make Representer not try to guess `!!pairs` when a list is represented.
You need to construct a `!!pairs` node explicitly now.

Do not check for duplicate mapping keys as it didn't work correctly anyway.
2006-08-03 16:07:29 +00:00
Kirill Simonov
2e6c774c92 Fix a bug when a block scalar is incorrectly emitted in the simple key context. 2006-07-30 12:51:05 +00:00
Kirill Simonov
e4c1238d2f Update libyaml bindings. 2006-07-21 13:52:03 +00:00
Kirill Simonov
056fe5c72e Fix a bug in Representer.represent_object: copy_reg.dispatch_table was not correctly handled. 2006-07-11 11:32:39 +00:00
Kirill Simonov
6743cf6181 Update PyRex based bindings to libyaml to include Parser functions. 2006-07-07 19:39:29 +00:00
Kirill Simonov
95c8976b37 Fix some minor issues with the new Parser. 2006-07-07 19:38:53 +00:00
Kirill Simonov
63fa1bd6fe To make porting easier, rewrite Parser not using generators.
Fix handling of unexpected block mapping values, like
{{{
: foo
}}}

Remove obsolete and unused {{{__iter__}}} functions.
2006-07-03 11:29:45 +00:00
Kirill Simonov
27de2ba1fc Fix invalid output of single-quoted scalars in cases when a single
quote is not escaped when preceeded by whitespaces or line breaks.
(Fix #17).
2006-06-30 08:10:36 +00:00
Kirill Simonov
92243c675c Trying to make libyaml bindings faster. 2006-06-30 08:07:42 +00:00
Kirill Simonov
4b48dcfb5f Add pyrex-based bindings for the libyaml scanner. 2006-06-19 20:30:29 +00:00
Kirill Simonov
47b72d2be7 Preparing the release: PyYAML-3.03 2006-06-19 16:30:56 +00:00
Kirill Simonov
72992fe01c Fix a typo in a plain scalar scanner. 2006-06-18 18:04:15 +00:00
Kirill Simonov
bcfc0b6dda Fix several problems caused by ill-formed documents.
The line number is not calculated correctly for DOS-style line breaks.

Fix error reporting in '''remove_possible_simple_key'''. The problem is caused by the document:

{{{
+foo: &A bar
+*A ]
}}}

Raise an error for a complex key which is not indented correctly, for instance:

{{{
? "foo"
 : "bar"
}}}
2006-06-16 07:23:05 +00:00
Kirill Simonov
d01a85fe5c Add ind and qnan values to a float test. 2006-05-24 15:45:38 +00:00
Kirill Simonov
e51f97dc02 Optimize slightly the float constructor. 2006-05-22 20:00:11 +00:00
Kirill Simonov
a109c6bfce Add a test case belonging to the previous commit. 2006-05-22 19:50:32 +00:00
Kirill Simonov
500659ddd6 Revamp the inf/nan handling again. 2006-05-22 19:49:54 +00:00
Kirill Simonov
ee2fb1c41d Add a test case for #15. 2006-05-21 07:27:26 +00:00
Kirill Simonov
149a437eda Fixed #15 (pyyaml discards '-' sign on negative floats).
Thanks to alex_(a)_alexmole_(o)_co_(o)_uk for reporting the bug.
2006-05-21 07:26:05 +00:00
Kirill Simonov
810977b416 Dynamically determine the inf and nan values. Should fix #14.
Thanks to Scott Daniels for the report and the patch.
2006-05-15 18:43:58 +00:00
Kirill Simonov
eefe5f7241 Final touches before the release. 2006-05-15 11:24:32 +00:00
Kirill Simonov
da8f3caa44 Preparing the next release. 2006-05-15 06:49:37 +00:00
Kirill Simonov
f87fec835e Rename yaml-hl to yaml-highlight. 2006-05-15 06:49:03 +00:00
Kirill Simonov
6fc24b4387 Load yaml_hl.cfg from the script path. 2006-05-14 15:12:42 +00:00
Kirill Simonov
c3ab1fbdde Add the announcement message. 2006-05-12 09:17:39 +00:00
Kirill Simonov
d694099649 Remake the YAML highlighting example. 2006-05-12 09:14:33 +00:00
Kirill Simonov
9bd0b4e531 Fix a bug in add_path_resolver: map -> dict. 2006-05-11 21:27:20 +00:00
Kirill Simonov
8f22ae6de3 Final touches before the initial release. 2006-05-07 14:36:42 +00:00
Kirill Simonov
43ffedd470 Allow first=None for add_implicit_resolver. 2006-05-07 14:02:42 +00:00
Kirill Simonov
dd2da8afa4 Fix a bug in a test. 2006-05-06 22:12:53 +00:00
Kirill Simonov
74f8caa6fb Fix #11 (Thanks to edemaine(at)mit.edu). 2006-05-06 22:09:50 +00:00
Kirill Simonov
80ba450695 Add a way to override default style chosen by Representer: fix #9 2006-05-04 10:46:11 +00:00
Kirill Simonov
cd21dc64a9 1e30000 => 1e300000 2006-04-23 18:13:32 +00:00
Kirill Simonov
410d822bd5 Prepare setup.py for release. Fix #7. 2006-04-23 18:07:52 +00:00
Kirill Simonov
fc01755908 Raise an error for colons in the flow context. 2006-04-23 13:40:57 +00:00
Kirill Simonov
e8eed6301b Sort object attributes. 2006-04-22 21:08:32 +00:00