r21579 - gnucash/trunk - [Cruft Reduction] Remove unused functions from src/engine

John Ralls jralls at ceridwen.us
Sat Nov 19 10:16:23 EST 2011


On Nov 19, 2011, at 6:52 AM, Geert Janssens wrote:

> John,
> 
> Since you have removed these unused functions, the python bindings spew some 
> errors during GnuCash startup (if built with python bindings enabled of 
> course). Here's one example:
> 
> Traceback (most recent call last):
>  File "/kobaltnet/janssege/Development/Installs/gnucash-f15-
> trunk/share/gnucash/python/init.py", line 3, in <module>
>    from gnucash import *
>  File "/home/janssege/Development/Installs/gnucash-f15-
> trunk/lib/python2.7/site-packages/gnucash/__init__.py", line 6, in <module>
>    from gnucash_core import *
>  File "/home/janssege/Development/Installs/gnucash-f15-
> trunk/lib/python2.7/site-packages/gnucash/gnucash_core.py", line 636, in 
> <module>
>    methods_return_instance(Account, account_dict)
>  File "/home/janssege/Development/Installs/gnucash-f15-
> trunk/lib/python2.7/site-packages/gnucash/function_class.py", line 223, in 
> methods_return_instance
>    method_function_returns_instance( getattr(cls, func_name), instance_name))
> AttributeError: type object 'Account' has no attribute 'get_start_balance'
> 
> The python bindings explicitly wrap a number of the functions you removed. 
> This doesn't mean they are actually used though.
> 
> I have tried to remove the corresponding wrapper code for a few functions from 
> src/optional/python-bindings/gnucash_core.py. This does each time solve the 
> error displayed, but reports a new error for the next deleted function.
> 
> Since you only commented out the functions right now in the engine, I'm not 
> sure what should happen with the wrappers in python: should they also simply 
> get commented out or rather removed ?
> 

Geert,

Run make maintainer-clean, autogen.sh, and configure and the python (and guile) functions should re-wrap. 

I certainly meant to delete everything, but it looks like I missed some of the functions I had commented out. I'll look through everything again today to clean that up.

Sorry for making a mess.

Regards,
John Ralls




More information about the gnucash-devel mailing list