Skip to content
Snippets Groups Projects

Pygobject workaround

Merged Chad Hanna requested to merge pygobject_workaround into master

This merge request allows users to build gstreamer pipelines with newer pygobject by working around missing type conversions. There has been no movement from the community on this despite it being reported

We have about 3 years (and counting) of incompatibility between pygobject and gstreamer regarding array properties for elements. When it is fixed upstream, it will be easy to revert this change or leave it in place until backwards compatibility for the incompatible code is no longer needed.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Maintainer

    I was able to run an end-to-end small offline analysis using the igwn environment. There are python incompatibilities in our plotting scripts (which have nothing to do with this merge request), but the core codes all worked and I pushed through a result

    BEFORE

    image

    AFTER

    image

    Why the change? I don't know, but we can't even begin to investigate without the work in this MR.

  • Author Maintainer

    I added one additional value error and then tested some reasonable cases - of course users could still figure out some way to break this, but I think the state at the moment is reasonable so I will merge

    from gstlal import pipeio
    import numpy
    
    # set works
    pipeio.format_property(set([1,2,3]))
    # tuple works
    pipeio.format_property(tuple([1,2,3]))
    # dictionary works
    pipeio.format_property({k:1 for k in [1,2]})
    # generator works
    pipeio.format_property((x for x in [1,2,3,]))
    # 1D array works
    pipeio.format_property(numpy.ones((2)))
    # 2D array works
    pipeio.format_property(numpy.ones((2,2)))
    # 3D array does not - a value error is raised
    pipeio.format_property(numpy.ones((2,2,2)))
  • Chad Hanna added 1 commit

    added 1 commit

    • 4e04daf7 - add assert for higher D arrays

    Compare with previous version

  • Chad Hanna added 13 commits

    added 13 commits

    • 4e04daf7...6e67f141 - 7 commits from branch master
    • c17d9727 - Patrick Godwin's code: work around backwards incompatible pygobject handling of arrays
    • 15f8e7a2 - Patrick Godwin's code: work around backwards incompatible pygobject handling of arrays
    • 10215d2b - Patrick Godwin's code: work around backwards incompatible pygobject handling of arrays
    • 4be53f91 - gstlal/python/gstpipetools.py: pygobject work around
    • fe38fbf3 - handle 1D arrays
    • 4ee39870 - add assert for higher D arrays

    Compare with previous version

  • merged

Please register or sign in to reply
Loading