Discussion:
Python bindings -- I'm stepping back from them
Malcolm Tredinnick
2003-03-13 00:06:40 UTC
Permalink
I have just returned to work after a couple of days of illness and went
to commit all the outstanding stuff I had for the Python bindings so
that others could also work on it. This did not go well. In fact, since
Richard and Johan have also been working on it, it went so badly, that I
really just need to throw away all my stuff, since there's no hope of
resolving all the conflicts. There has been much duplication of work and
naturally we didn't end up calling things exactly the same names, so any
hand-wrapped structures need to be redone, etc.

I'm not annoyed about this, since I am the one who's been out of contact
for 48 hours (and it's already been a bit tricky since I am operating on
a diametrically opposite timezone to the crazy Swedes). However, I think
I will not commit any work for the next few days, just to avoid clashes
and wasting my or other peoples' time. I've had to ditch quite a few
hours work on this, so I am not really keen to do that again. My day job
is too busy at the moment for me to also work late into the night in
order to coordinate more closely with the European contributors.

No hard feelings; I just wanted to let people know what I was doing.

Malcolm
--
Depression is merely anger without enthusiasm.
Richard Hult
2003-03-13 00:38:38 UTC
Permalink
Post by Malcolm Tredinnick
I have just returned to work after a couple of days of illness and went
to commit all the outstanding stuff I had for the Python bindings so
that others could also work on it. This did not go well. In fact, since
Richard and Johan have also been working on it, it went so badly, that I
really just need to throw away all my stuff, since there's no hope of
resolving all the conflicts. There has been much duplication of work and
naturally we didn't end up calling things exactly the same names, so any
hand-wrapped structures need to be redone, etc.
I'm sorry to hear this :/.

We really had to go ahead and start working on the bindings today, due
to various circumstances.
Post by Malcolm Tredinnick
I will not commit any work for the next few days, just to avoid clashes
and wasting my or other peoples' time. I've had to ditch quite a few
Again, sorry about that. We really appreciate the work you've already
contributed so far.

Thanks,
Richard
--
Richard Hult ***@codefactory.se
CodeFactory AB http://www.codefactory.se/
Mikael Hallendal
2003-03-13 00:53:53 UTC
Permalink
Post by Malcolm Tredinnick
I have just returned to work after a couple of days of illness and went
to commit all the outstanding stuff I had for the Python bindings so
that others could also work on it. This did not go well. In fact, since
Richard and Johan have also been working on it, it went so badly, that I
really just need to throw away all my stuff, since there's no hope of
resolving all the conflicts. There has been much duplication of work and
naturally we didn't end up calling things exactly the same names, so any
hand-wrapped structures need to be redone, etc.
Really sorry to hear this. We didn't hear from you and we are on a very
tight schedule and needed to get on with the bindings.

We are not finished though and I really think that having your bindings
(are they finished?) will help even if there are conflicts. For example
we have mostly done the really easy parts yet and the more complex
functions still needs doing. I for one have not much knowledge in
wrapping C libraries in Python and wouldn't mind glancing on your code
(or be able to just copy them in).

You think it would be possible to send your stuff to the list?

Regards,
Mikael Hallendal
--
Mikael Hallendal ***@codefactory.se
CodeFactory AB http://www.codefactory.se/
Cell: +46 (0)709 718 918
Malcolm Tredinnick
2003-03-13 08:55:37 UTC
Permalink
On Thu, Mar 13, 2003 at 01:53:53AM +0100, Mikael Hallendal wrote:
[...]
Post by Mikael Hallendal
We are not finished though and I really think that having your bindings
(are they finished?) will help even if there are conflicts. For example
we have mostly done the really easy parts yet and the more complex
functions still needs doing. I for one have not much knowledge in
wrapping C libraries in Python and wouldn't mind glancing on your code
(or be able to just copy them in).
You think it would be possible to send your stuff to the list?
I have sorted out a fair bit of my stuff and attached it to this mail.
That might save you some time. I'm not going to commit it directly,
because I still don't know where you are up to.

There are still a couple of problems here. In particular, I am not sure
why mrp_interval_new is not being wrapped, even though I have provided
data for it. I wanted to make MrpInterval a proper type, but I cannot
currently create one (the idea is to make the tp_init slot in
PyMrpInterval_Type be a pointer to _wrap_mrp_interval_new). The Interval
type is probably a bit incomplete at the moment, because this
constructor issue was driving me up the wall. I think I'm doing
something really dumb, but I cannot see it right at the moment.

Also, I think there are a couple of FIXMEs in the code where I got bored
and left something for later.

During this work, I came across a couple of points that need to be
considered:

- Calling mrproject.Application() more than once should _not_
segfault. The solution may be to have a check in
mrp_application_new() (in libmrproject) and just return if the
application has already been initialised.

- I suspect that mrp_application_get_all_file_readers() and
mrp_application_get_all_file_writers() should be private
functions. They return lists of MrpFileReader and
MrpFileWriter structures, respectively, but these structures
are not declared in any public header file. Since no functions
take such lists as input, the return values of these two
functions seems to be completely useless outside of
libmrproject.

- There problably should be non-varargs versions of
mrp_object_set and mrp_object_get. This is a problem common to
most non-C language bindings: everywhere you have a varargs
function, you also have something like mrp_object_setv that
takes a list for the bindings to use. We need to wrap these
functions eventually, because otherwise there is no convenient
way to access custom parameters of MrpObject instances.

Cheers,
Malcolm
--
I've got a mind like a... a... what's that thing called?
Loading...