Development

#1966 (propel-load-data fails on records containing "#")

You must first sign up to be able to contribute.

Ticket #1966 (closed defect: fixed)

Opened 1 year ago

Last modified 10 months ago

propel-load-data fails on records containing "#"

Reported by: Andrejs.Verza Assigned to: fabien
Priority: minor Milestone: 1.1.0
Component: tasks Version: 1.0.5
Keywords: propel-load-data, fixtures Cc:
Qualification: Unreviewed

Description

The problem with propel-load-data fixture format.
It should be obvious in the following examples:

Simple unnamed record, works fine:

MyTable:
  - { my_column: "my contents #1" }

The same record (named this time), formatted in two lines, works fine:

MyTable:
  named_record:
    my_column: "my contents #1"

The same named record, reformatted into one line - throws an exception! (why?!):

MyTable:
  named_record: { my_column: "my contents #1" }

And... having "#" sign removed, the example works fine again:

MyTable:
  named_record: { my_column: "my contents _1" }

Seems that #-sign ir treated differently, even between double quotes.

Change History

12/07/07 21:30:12 changed by fabien

  • qualification set to Unreviewed.

This is a Spyc bug.

03/14/08 21:57:47 changed by fabien

  • milestone set to 1.1.0.

03/14/08 22:59:38 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [7892]) replaced Spyc with a new YAML parser/dumper (closes #3083, #2887, #2622, #2514, #1966, #1339, #3016)

  • removed Spyc
  • added sfYamlParser, sfYamlDumper (should be totally BC thanks to the unit tests)
  • the parser and the dumper are much more robust and much more easier to fix
  • exceptions are thrown when a non valid YAML file is parsed (when you forget a : after a key for example, or if the indentation is not right ;))
  • fixed a bunch of bugs of the old parser
  • speed is more or less the same as Spyc
  • added an option to control the dump to switch from the block to the flow notation (propel:build-schema is now much more readable in YAML)
  • added more unit tests