Custom Query (121 matches)
Results (100 - 102 of 121)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #21 | duplicate | yaml emitter bug | xi | rwb123@… |
| Description |
The following code produces bad yaml output, which subsequently dies in the yaml.load(). This is with pyyaml 3.0.3 on python 2.4.1. import yaml e = {"texas: '": 92.5} yammy = yaml.dump(e) print yammy e2 = yaml.load(yammy) print e2 The yaml output is: $ python yamlbug2.py
{'texas: '': 92.5}
Traceback (most recent call last):
File "yamlbug2.py", line 10, in ?
e2 = yaml.load(yammy)
File "/home/blahblah/dl/yaml/PyYAML-3.03/lib/yaml/__init__.py", line 61, in load
return loader.get_data()
... etc.
|
|||
| #169 | wontfix | PyYAML fails to load mapping keys of sequence type | xi | sedie@… |
| Description |
The following YAML code is taken directly from an example given in the YAML 1.1 specification and fails to load with PyYAML, giving the error message: found unacceptable key (unhashable type: 'list'). ---
? - Detroit Tigers
- Chicago cubs
:
- 2001-07-23
? [ New York Yankees,
Atlanta Braves ]
: [ 2001-07-02, 2001-08-12,
2001-08-14 ]
...
The problem most likely arises because Python lists are not hashable and cannot be used as dict keys. A possible solution may be to detect this special case and coerce YAML !!seq types to Python tuples before constructing the dictionaries that they are a part of. |
|||
| #166 | wontfix | PyYAML should use libyaml if libyaml available | xi | sgwong |
| Description |
Currently PyYAML only use python implementation although the libyaml available. The following simple changes on __init__.py should do: (I'm not sure whats the use of __with_libyaml__) __version__ = '3.09' try: from cyaml import * __with_libyaml__ = True Loader = CLoader Dumper = CDumper except ImportError: __with_libyaml__ = False |
|||
