Commit Graph

96 Commits

Author SHA1 Message Date
Kirill Simonov
7baeadf46f Minor fixes in the test subsystem to prevent failures in LibYAML bindings tests. 2008-12-27 14:54:07 +00:00
Kirill Simonov
4692b60d88 Added the script tests/test_all.py. 2008-10-01 23:16:55 +00:00
Kirill Simonov
3ded20780b Added a test for single dot being a float bug. 2008-09-30 11:56:14 +00:00
Kirill Simonov
073f08e9d9 A single dot is not a float value (fixes #62). 2007-11-18 00:47:32 +00:00
Kirill Simonov
046f114050 Make compose() and load() ensure that the input stream contains a single document. Fixes #54. 2007-08-21 20:25:34 +00:00
Kirill Simonov
e5059a1d53 Add the tests for checking the libyaml bug. 2007-03-22 16:12:36 +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
b4643e77c3 Fix a test to work under Python 2.3. 2006-08-20 09:10:47 +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
6743cf6181 Update PyRex based bindings to libyaml to include Parser functions. 2006-07-07 19:39:29 +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
4b48dcfb5f Add pyrex-based bindings for the libyaml scanner. 2006-06-19 20:30:29 +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
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
eefe5f7241 Final touches before the release. 2006-05-15 11:24:32 +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
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
c87ce16706 Add support for pickling/unpickling python objects. 2006-04-22 20:40:43 +00:00
Kirill Simonov
cce15169da Fix !!python/name for Python 2.3. Clear the yaml module namespace. 2006-04-21 17:31:29 +00:00
Kirill Simonov
89cc4e3e4f Add more unit tests. 2006-04-18 19:33:30 +00:00
Kirill Simonov
c9aec90fde Add support for recursive nodes to Composer. Constructor does not support recursive objects though. 2006-04-18 17:15:54 +00:00
Kirill Simonov
95b3cef7eb Add more unit tests for error messages. 2006-04-18 16:48:00 +00:00
Kirill Simonov
24f8ae0e00 Rename error-message to loader-error and add new examples. 2006-04-18 14:35:46 +00:00
Kirill Simonov
ea23091a5b Fix #4 (Thanks to murphy(at)rubychan.de) 2006-04-17 06:42:08 +00:00
Kirill Simonov
b12e7fea10 Refactor resolver. 2006-04-16 23:45:21 +00:00
Kirill Simonov
6a97abb4c7 Major refactoring. 2006-04-15 23:54:52 +00:00
Kirill Simonov
cc316a4699 Implement yaml.dump(). 2006-04-11 00:34:16 +00:00
Kirill Simonov
2d457ba718 Emitter is done!!! 2006-04-09 19:51:02 +00:00
Kirill Simonov
268bb76831 Add style information to events generated by Parser. 2006-04-03 18:20:25 +00:00
Kirill Simonov
3aa558459c Fix a test. 2006-03-19 15:42:44 +00:00
Kirill Simonov
8973bb473b * Add the token STREAM-START.
* Add parsing events: STREAM-START, DOCUMENT-START, DOCUMENT-END.
2006-03-19 13:00:38 +00:00
Kirill Simonov
6548cd6b67 Loose indentation rules for the following cases:
* In the flow context, indentation level is not checked.
 * For quoted scalars, indentation level is not checked.
 * Flow scalars are not required to have at least 1 space indentation. Zero indentation is acceptable.
2006-03-19 01:30:05 +00:00
Kirill Simonov
14ed697df4 Back to work :). Rename markers to marks. 2006-03-18 13:37:09 +00:00
Kirill Simonov
4c570faa8b Move pyyaml3000 to a separate directory. 2006-03-04 22:43:48 +00:00