[PATCH] invoice creation with python-bindings and value of stability patch

Mark Jenkins mark at parit.ca
Fri Jun 18 13:31:53 EDT 2010


Hi to all again,

Attached is patch,
python_bindings_business_invoice_support_and_examples.patch that
enhances the python bindings to include support for creating, posting,
and paying invoices.

Apply with patch -p0.

The recent discussion re invoice importer inspired this.

The patch is dependent on three prior patch submissions,
nice_example_python_scripts.patch,
python_bindings_gncnumeric_and_accounttype_constants.patch, and
python_bindings_stability_without_guile.patch
in that order, which I have re-attached for convenience.


Because this is a feature enhancement, I don't expect this could be
considered for application to trunk until 2.4 is branched away -- I know
that feature freeze was long ago and that I'm late to the party.

But, I do think this invoice creation patch illustrates the value of
python_bindings_stability_without_guile.patch as a bug fix that should
make it into 2.4, even with the flaw that the module linking there comes
with a portability warning.
see:
http://lists.gnucash.org/pipermail/gnucash-devel/2010-June/028760.html
http://lists.gnucash.org/pipermail/gnucash-devel/2010-June/028790.html
http://lists.gnucash.org/pipermail/gnucash-devel/2010-June/028815.html
I don't though if the kind of changes Christian was discussing to avoid
those linking portability warnings would be appropriate prior to 2.4. On
balance, I'd rather 2.4 ship with python bindings that are less portable
than generally crash prone.

I started working on this invoice creation stuff first and immediately
started to hit major stability problems (seg faults) that I'm certain
had nothing to do with those particular enhancements. So I wrote
python_bindings_stability_without_guile.patch which made those problems
go away. Then I was able to actually test and finish this invoice
creation stuff.

I could re-work things so that
python_bindings_business_invoice_support_and_examples.patch can be
applied first (to show stability issues with current init process), and
python_bindings_stability_without_guile.patch applicable second to help
illustrate that that stability patch really does make a difference
between terrible crash and invoice create success. (and by extension,
the stability patch should make a difference even if applied on its own
to provide a better environment for the bindings already in trunk)

I can file a bug report too. Still can't pin down exactly why the
current python bindings init process (in trunk) is flawed, but I
speculated before that python and guile can't play nice together. Could
it be possible that there are symbol conflicts between the two that the
linker doesn't tell about?

As always, my branch can be followed here:
http://svn.parit.ca/gnucash/branches/python-bindings/



Mark Jenkins
ParIT Worker Co-op

cc Mike Evans
cc Christian Stimming
cc Christoph Holtermann
cc fellow ParIT members
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python_bindings_business_invoice_support_and_examples.patch
Type: text/x-diff
Size: 30093 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100618/104efca6/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nice_example_python_scripts.patch
Type: text/x-diff
Size: 25690 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100618/104efca6/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python_bindings_gncnumeric_and_accounttype_constants.patch
Type: text/x-diff
Size: 3578 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100618/104efca6/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python_bindings_stability_without_guile.patch
Type: text/x-diff
Size: 2624 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100618/104efca6/attachment-0007.bin>


More information about the gnucash-devel mailing list