Ticket #9807 (inprogress)

Opened 6 years ago

Last modified 5 years ago

Classes in DataObjects/MDEVents layers need exposing to Python

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 3.5
Component: Python Keywords: Maintenance
Cc: Blocked By: #11209
Blocking: #8943 Tester:

Description

When trying to implement #8943 it was found that the current mechanism for trying to get boost python to return the correct type for the actual workspace type was flawed, as it can never handle multiple inheritance.

The only way to get the correct type back in Python is to expose all of the concrete Workspace types and just let boost.python do the heavy lifting. This will currently require classes from DataObjects & MDEvents to be exported

The only question is whether to have a single compiled Python _plugins module that exports all from each of the C++ libraries or one Python module for each plugin.

Change History

comment:1 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Nick Draper

Moved to the backlog at the code freeze of R3.3

comment:3 Changed 6 years ago by Nick Draper

  • Milestone changed from Release 3.3 to Backlog

comment:4 Changed 6 years ago by Martyn Gigg

  • Summary changed from Classes in plugin layers need exposing to Python to Classes in DataObjects/MDEVents layers need exposing to Python

comment:5 Changed 6 years ago by Martyn Gigg

  • Blocked By 11209 added

comment:6 Changed 5 years ago by Martyn Gigg

Now that MDEvents no longer exists we only need to do this for DataObjects

comment:7 Changed 5 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

Added DataObjects as a submodule for the Python package

This will allow boost.python to take care of automatically downcasting Workspace objects to the correct type without manual intervention Refs #9807

Changeset: e6d750dde850f5ad2cb6c5e69b358de5bcab7b73

comment:8 Changed 5 years ago by Martyn Gigg

Checkpoint removing downcasting policies

The tests still don't work yet. Refs #9807

Changeset: 2167ec8df527ce49d18319ad1c5391e160501678

comment:9 Changed 5 years ago by Martyn Gigg

Added DataObjects as a submodule for the Python package

This will allow boost.python to take care of automatically downcasting Workspace objects to the correct type without manual intervention Refs #9807

Changeset: e6d750dde850f5ad2cb6c5e69b358de5bcab7b73

comment:10 Changed 5 years ago by Martyn Gigg

Checkpoint removing downcasting policies

The tests still don't work yet. Refs #9807

Changeset: 2167ec8df527ce49d18319ad1c5391e160501678

comment:11 Changed 5 years ago by Martyn Gigg

Remove all of the Python downcasting framework

This should now happen behind the scenes in Boost Python. Refs #9807

Changeset: 12df5ed20852153332c5cc90a72fe65d71fa044e

comment:12 Changed 5 years ago by Martyn Gigg

Add a simple ToWeakPtr return value policy

Improve WorkspaceGroup test to cover the use case. Refs #9807

Changeset: 0a6b102fc713bf0665a97814e4625f05c28e9999

comment:13 Changed 5 years ago by Martyn Gigg

  • Milestone changed from Backlog to Release 3.5

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10649

Note: See TracTickets for help on using tickets.