Convert data to Pcore before serialisation in to_ruby/to_python#1237
Convert data to Pcore before serialisation in to_ruby/to_python#1237david22swan merged 2 commits intomainfrom
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 👍 |
david22swan
left a comment
There was a problem hiding this comment.
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: