-
Notifications
You must be signed in to change notification settings - Fork 581
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
Convert data to Pcore before serialisation in to_ruby/to_python #1237
Conversation
:undef was used in old Puppet functions, but modern Puppet 4 functions receive `undef` Puppet values as `nil` Ruby values. This cause to_python() to serialize `undef` as `nil` instead of `None`, which is not valid Python code. Fix the to_python() behavior by comparing with `nil`. Update the test suite accordingly. While here, also adjust the to_ruby() function which had the same wrong logic but was not causing trouble because in Ruby, we want to serialize `nil` to `nil` :-)
This allow to pass any Puppet structure to the to_python and to_ruby functions.
to_python is a functionthat may have no external impact to Forge modules. to_ruby is a functionthat may have no external impact to Forge modules. This module is declared in 318 of 579 indexed public
|
|
Given that this PR contains #1205, are you happy to close it in favour of this? Or is there value in keeping it open? |
GitHub will automatically mark #1205 as merged when this one is merged as long as the commits are not rebased (so a merge commit will do the right thing). This helps when using tools such as github-changelog-generator 😉 |
|
Sounds good 👍 |
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.
Same as with the connected pr, this looks good to me :)
This is a follow-up to #1205 to perform Pcore serialization and correctly handle all
Anyvalues.This PR also include: