Ticket #154 (new defect)

Opened 7 months ago

Last modified 1 month ago

libyaml parser does not recognise custom tags

Reported by: smichalske@gmail.com Assigned to: xi
Priority: normal Component: pyyaml
Severity: normal Keywords:
Cc:

Description

/usr/bin/python /Users/hardkrash/Desktop/libyaml_custom_class_broken.py Monster(name='Cave spider', hp=[2, 6], ac=16, attacks=['BITE', 'HURT'])

Traceback (most recent call last):

File "/Users/hardkrash/Desktop/libyaml_custom_class_broken.py", line 32, in <module>

""", Loader=yaml.CLoader)

File "/Library/Python/2.5/site-packages/PyYAML-3.09-py2.5-macosx-10.5-i386.egg/yaml/init.py", line 58, in load File "/Library/Python/2.5/site-packages/PyYAML-3.09-py2.5-macosx-10.5-i386.egg/yaml/constructor.py", line 44, in get_single_data File "/Library/Python/2.5/site-packages/PyYAML-3.09-py2.5-macosx-10.5-i386.egg/yaml/constructor.py", line 48, in construct_document File "/Library/Python/2.5/site-packages/PyYAML-3.09-py2.5-macosx-10.5-i386.egg/yaml/constructor.py", line 93, in construct_object File "/Library/Python/2.5/site-packages/PyYAML-3.09-py2.5-macosx-10.5-i386.egg/yaml/constructor.py", line 419, in construct_undefined

yaml.constructor.ConstructorError?: could not determine a constructor for the tag '!Monster'

in "<byte string>", line 2, column 5

Attachments

libyaml_custom_class_broken.py (0.7 kB) - added by smichalske@gmail.com on 01/28/10 20:15:43.
0001-Fix-custom-tags-in-pyyaml-interface.patch (2.4 kB) - added by smichalske@gmail.com on 08/05/10 05:43:04.
Patch that makes the cloades construct custom tags.

Change History

01/28/10 20:15:43 changed by smichalske@gmail.com

  • attachment libyaml_custom_class_broken.py added.

08/05/10 05:43:04 changed by smichalske@gmail.com

  • attachment 0001-Fix-custom-tags-in-pyyaml-interface.patch added.

Patch that makes the cloades construct custom tags.

08/05/10 05:46:30 changed by anonymous

This patch makes custom yaml objects constructors and representers, register themselves with all known loaders and dumpers

One defect, the structure test now has 4 failures.... I can not determine why.


Add/Change #154 (libyaml parser does not recognise custom tags)




Change Properties
Action