Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (19 - 21 of 121)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Ticket Resolution Summary Owner Reporter
#63 invalid % character cannot start a scalar value token xi sproaticus

Reported by sproaticus, 7 years ago.

Description

A scalar value cannot start with a % (percent sign) character, though the YAML specification only reserves that character at the beginning of a non-indented line for directives and tags (see  http://yaml.org/spec/current.html#id2523453 and  http://yaml.org/spec/current.html#id2524297 ). This character should be legal as the first character of a scalar value, e.g. for Python %s-style string substitution and templates.

>>> yaml.load('yaml: %')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 66, in load
    
  File "build/bdist.linux-i686/egg/yaml/constructor.py", line 38, in get_data
  File "build/bdist.linux-i686/egg/yaml/composer.py", line 27, in get_node
  File "build/bdist.linux-i686/egg/yaml/composer.py", line 34, in compose_document
  File "build/bdist.linux-i686/egg/yaml/composer.py", line 63, in compose_node
  File "build/bdist.linux-i686/egg/yaml/composer.py", line 112, in compose_mapping_node
  File "build/bdist.linux-i686/egg/yaml/composer.py", line 43, in compose_node
  File "build/bdist.linux-i686/egg/yaml/parser.py", line 95, in check_event
  File "build/bdist.linux-i686/egg/yaml/parser.py", line 446, in parse_block_mapping_value
  File "build/bdist.linux-i686/egg/yaml/scanner.py", line 116, in check_token
  File "build/bdist.linux-i686/egg/yaml/scanner.py", line 257, in fetch_more_tokens
yaml.scanner.ScannerError: while scanning for the next token
found character '%' that cannot start any token
  in "<string>", line 1, column 7:
    yaml: %
          ^

Environment:

  • Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
  • PyYAML-3.05-py2.5.egg
#150 invalid Typo in emitter.c xi spitzak@…

Reported by spitzak@…, 5 years ago.

Description

In libyaml stable branch there appears to be a typo, here is a patch:

--- src/emitter.c       (revision 369)
+++ src/emitter.c       (working copy)
@@ -1154,7 +1154,7 @@
             break;

         case YAML_MAPPING_START_EVENT:
-            if (!yaml_emitter_check_empty_sequence(emitter))
+            if (!yaml_emitter_check_empty_mapping(emitter))
                 return 0;
             length += emitter->anchor_data.anchor_length
                 + emitter->tag_data.handle_length
#166 wontfix PyYAML should use libyaml if libyaml available xi sgwong

Reported by sgwong, 4 years ago.

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 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Note: See TracQuery for help on using queries.