Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-10292

The FrameSet returned by Transform.getFrameSet can change the contained FrameSet in Python

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Story Points:
      0.5
    • Sprint:
      Alert Production S17 - 4
    • Team:
      Alert Production

      Description

      The ast::FrameSet returned by Transform.getFrameSet is not immutable in Python, and modifying it modifies the frame set owned by the transform. In C++ the returned FrameSet is immutable, but that is impossible to enforce in Python, so the obvious fix is for the Python wrapper to return a copy.

        Attachments

          Activity

          Hide
          rowen Russell Owen added a comment -

          A trivial fix: use a lambda in the pybind11 wrapper for getFrameSet to return a copy. I added a simple test and confirmed that it failed on the old code.

          Show
          rowen Russell Owen added a comment - A trivial fix: use a lambda in the pybind11 wrapper for getFrameSet to return a copy. I added a simple test and confirmed that it failed on the old code.
          Hide
          krzys Krzysztof Findeisen added a comment -

          Looks good, no objections.

          Show
          krzys Krzysztof Findeisen added a comment - Looks good, no objections.
          Hide
          rowen Russell Owen added a comment -

          Thank you for the quick review. Jenkins passed. I merged.

          Show
          rowen Russell Owen added a comment - Thank you for the quick review. Jenkins passed. I merged.

            People

            Assignee:
            rowen Russell Owen
            Reporter:
            rowen Russell Owen
            Reviewers:
            Krzysztof Findeisen
            Watchers:
            Krzysztof Findeisen, Russell Owen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.