New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve the ordering of the wiki entries #596
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
@@ -56,6 +57,23 @@ class InvalidEntryError(Exception): | |||
PARTS_FILE = "snap-parts.yaml" | |||
|
|||
|
|||
# yaml OrderedDict loading and dumping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am tempted to just have this initialization in snapcraft/__init__.py
ok to test |
maintainer: Jim Doe <jim.doe@example.com> | ||
origin: lp:snapcraft-parser-example | ||
description: example main2 | ||
project-part: app1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a question. Without the ordered dict, this would result in a different order sometimes, right? I mean, would it be unpredictable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my experimentation the order was not predictable. It's my understanding that python dicts make no promises with regard to order.
Can one of the admins verify this patch? |
3 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
retest this please |
I think this just needs an update/rebase with master. 👍 from me. I'm not sure if Sergio's comment was a blocker, or a wishlist. |
Can this be merged? |
It can but needs an update. |
LP:#1591208 Signed-off-by: Joe Talbott <joe.talbott@ubuntu.com>
I'm not sure why the 'state.properties' expected type was changed to OrderedDict in the PR. It's currently failing for me (at least sometimes, I'm not sure how it passed the unit tests). |
El 26/07/16 a las 18:23, Joe Talbott escribió:
It is probably related to module loading and we would need to make the code you did available upon importing snapcraft instead of it being parser specific code
|
I think you're right about the module loading thing. If I do 'runtests.sh unit' they are OrderedDicts but if I just run the 'test_pluginhandler.py' tests via 'python -m unittest ....' they are dicts. |
LP:#1591208 Signed-off-by: Joe Talbott <joe.talbott@ubuntu.com>
LP:#1591208
Signed-off-by: Joe Talbott joe.talbott@ubuntu.com