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

Investigate pybind11 base class data member exposure from derived

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      DRP F17-1, DRP F17-2, DRP F17-3, DRP F17-4, DRP F17-5
    • Team:
      Data Release Production

      Description

      On 14-03-2017, John Parejko reported on Slack that when a base class B has a data member x and a derived class D attempts to expose this data member using clsB.def_readonly("x", &D::x); (because B should not itself be wrapped), an error is thrown:

      (Pdb) d.x
      *** TypeError: (): incompatible function arguments. The following argument types are supported:
          1. (self: B) -> float
       
      Invoked with: <D object at 0x7f451da33ea0>
      

      It was later discovered that casting explicitly to a D member pointer (e.g. clsD.def_readonly("x", (float &D::*) &D::x);) does work. So something must be going wrong in the type deduction of def_readonly.

      Investigate and report upstream.

        Attachments

          Issue Links

            Activity

            Hide
            pschella Pim Schellart [X] (Inactive) added a comment -

            Upstream issue #910 filed.

            Show
            pschella Pim Schellart [X] (Inactive) added a comment - Upstream issue #910 filed.
            Hide
            pschella Pim Schellart [X] (Inactive) added a comment -

            Upstream issue is solved. Putting this ticket on hold until a new upstream release is tagged and merged.

            Show
            pschella Pim Schellart [X] (Inactive) added a comment - Upstream issue is solved. Putting this ticket on hold until a new upstream release is tagged and merged.
            Hide
            yusra Yusra AlSayyad added a comment -

            Assuming upstream release was tagged and merged

            Show
            yusra Yusra AlSayyad added a comment - Assuming upstream release was tagged and merged

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              pschella Pim Schellart [X] (Inactive)
              Watchers:
              Pim Schellart [X] (Inactive), Yusra AlSayyad
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins Builds

                  No builds found.