uWSGI has no yaml support.

Bug #769831 reported by m.br
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
uWSGI Ubuntu package
Invalid
Undecided
Unassigned

Bug Description

While uWSGI claims yaml support, it really doesn't. Actually, its supposed "YAML support" is a bad joke - looking at http://projects.unbit.it/uwsgi/browser/yaml.c it only parses the file line by line and splits it at a colon.

This bites people in the ass pretty quickly, as they discover they can't use exec with multiline strings (using |) or even use the output of a simple python yaml.dump({'opt1': 'val1', 'opt2': 'val2'}) as a configuration file.

The file also deserves a stylistic award for using goto twice in less than 200 very simple lines.

Revision history for this message
roberto (roberto-unbit) wrote :

Instead of being rude, you can follow the "Open Source Way" and send a patch.
You have made a rant not a bug report :(

By the way, this is the correct syntax if you want to generate valid yaml for uWSGI:

yaml.dump({'uwsgi':{'opt1': 'val1', 'opt2': 'val2'}}, default_flow_style=False)

There is truly no need to support other object type in addition to strings, as we are talking about
options value (no multiline strings, no numbers, nor array or dictionary).

You only need to define a "uwsgi yaml dictionary" in your file. The uWSGI parser will use it ignoring all the rest.

Finally: gotos are not bad in C (someone call them a stylish trick to increase readability). You will find tons of them in Python sources too.

Revision history for this message
Leonid Borisenko (leonidborisenko) wrote :

  Actually, this is not the place for reporting bugs or making feature requests for uWSGI code. Everything related to uWSGI code must goes to uWSGI bugtracker (but as bugtracker for uWSGI doesn't exists, you must report to uWSGI mailing list).

  Support of advanced parsing of YAML configuration file (via libyaml) was added to uWSGI 0.9.8-dev [1]. I think it was made for your pleasure by roberto (which is, as I suppose, Roberto De Ioris, uWSGI developer)

  For now, I recommend you to use roberto advices.

  [1] http://projects.unbit.it/hg/uwsgi/rev/823a51fa8fc6

Changed in uwsgi:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.