Hi all, after spending some time investigating this issue (
https://bugzilla.gnome.org/show_bug.cgi?id=784278) where there is an assertion failure for get_background_items in nautilus-python menu provider extensions, I figured out what the issue is, but I'm hoping to get some feedback from the community about how to fix it, since it will require either changes to Nautilus or nautilus-python.
First, some history. When I last updated nautilus-python in 2011 to work with gobject-introspection, the nautilus extension framework was using introspection but not annotating much, and the functions that called out into extensions were not introspectable. So the generated Nautilus typelib-generated python module did not contain methods for Nautilus.MenuProvider.get_background_items, for example. Sometime in 2012, annotations were added, these provider methods were made introspectable, and all of a sudden there was a collision.
All nautilus-python extensions sub-class their provider class of choice, like Nautilus.MenuProvider, which means they inherit Nautilus.MenuProvider's methods. In this case, Nautilus.MenuProvider.get_background_items points to a C function in libnautilus-extension/nautilus_menu_provider.c. And if a python extension doesn't override get_background_items, you get an assertion failure like in the above bug ticket, because it is trying to call into a C function that it shouldn't be calling into.