Propose merge with branch adding more container methods

Bug #1089682 reported by Mike Owen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyBindGen
New
Undecided
Unassigned

Bug Description

I have a branch of pybindgen which has fleshed out more of the sequence slots for use in pybindgen. The branch can be found on launchpad at

lp:~mikeowen/pybindgen/pybindgen-containers

Here's a list of the changes in this branch:

1. The python slots supported now are __len__, __add__, __mul__, __getitem__, __getslice__, __setitem__, __setslice__, __contains__, __iadd__, and __mul__. The unit tests in tests/footest.py have been extended to cover this full set.

2. I added support for adding standalone functions as attributes of wrapped classes via cppclass.add_custom_instance_attribute. There is a new test in tests/footest.py that test this feature as well.

3. We have added an example of functioning cross-module dependencies in examples/cross_module_inheritance. This involved only one change to the pybindgen source: adding compile guards around the _PyBindGenWrapperFlags enum in utils.py. As the example shows you need to use a MultiSectionFactory in order to make this work. It is also necessary to comment out the -fvisibility=hidden flag in top level wscript in order for the example to run correctly.

There are also some minor changes:

1. The logic using abi::__class_type_info breaks using clang++ on Mac OSX, so I augmented the compile guards screening out this bit of code in the presence of the compiler defined __clang__ directive in cppclass.py.

2. Added guards to tests/boost/wscript to only build and run this test if ENABLE_BOOST_SHARED_PTR=True. This was preventing the tests from completing correctly on machines where I did not have boost installed.

I would like see these changes incorporated into the mainline pybindgen, so please as you get the chance check them out! I have confirmed that all the pybindgen unit tests pass correctly under "waf --disable-pygccxml check", with the obvious exception of the automatically generated bindings since I don't have gccxml installed. I certainly don't think these additions should break the automatic parsing code, though.

Revision history for this message
Gustavo Carneiro (gjc) wrote :

That sounds cool. Maybe you could use the launchpad "propose for merge" feature? I never used it before, but supposedly will help me see the changes more clearly... I can take a look over the weekend.

Revision history for this message
Aaron Black (black27) wrote :

I think this issue is resolved and can be closed. I just chatted with Mike and he thought these changes were now folded into the main branch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.