Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8046

Python C++ class wrappers in cppyy do not report the proper name (preventing pickling)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.08/00, 6.10/00
    • Component/s: PyROOT
    • Labels:
      None
    • Environment:

      ROOT 6.06.02

      Description

      Trying to pickle classes from cppyy we are getting an error (see GAUDI-1197).

      It looks like the problem is that asking a class it's fully qualified python name does not give back the correct result:

      >>> import cppyy
      >>> cppyy.gbl.TH1D
      <class 'cppyy.TH1D'>
      >>> cppyy.gbl.TH1D.__name__
      'TH1D'
      >>> cppyy.gbl.TH1D.__module__
      'cppyy'

      while from a working (pure Python) example we have:

      >>> import xml.dom.minidom
      >>> xml.dom.minidom.Node
      <class xml.dom.minidom.Node at 0x7fa93f33ee88>
      >>> xml.dom.minidom.Node.__name__
      'Node'
      >>> xml.dom.minidom.Node.__module__
      'xml.dom.minidom'

      Note that if we replace cppyy with ROOT works for an example without namespace.

        Attachments

          Activity

            People

            Assignee:
            mato Pere Mato Vila
            Reporter:
            clemenci Marco Clemencic
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual End: