[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Learning the Python API - early questions

From: Russell Yanofsky <russ_at_russ.hn.org>
Date: 2003-10-17 00:29:43 CEST

Barry Scott wrote:
> (let's stop cross posting. Use dev?)


> At 16-10-2003 18:50, Russell Yanofsky wrote:
>> If the subversion API were a normal python library, it would need to
>> report these types of errors. But it's not a normal python library.
>> It already requires users to use pools and manage their own memory.
>> I don't think it's too much to ask them to ask them to write correct
>> programs in order to prevent crashes.
> Sorry I don't accept this line of reasoning. Why must it be so hard
> and unfriendly? It means that any app I build for users will crash in
> response to my bugs in a way that makes support a nightmare. Atleast
> with python exception I get a useful report. (Tupically I catch the
> exceptions
> and automatically mail bug reports in for in house projects).

The bugs that cause crashes tend to be be really simple mistakes that will
get weeded out with even a really small amount of testing. None of the API's
I've seen are complicated enough to subtly misuse, so I don't think you'll
have any support nightmares. But even if you are worried about this, you
should be able to see that turning assertions into returned error codes
would only prevent crashes in a small number of cases.

>> I saw your svncpp patches browsing the rapidsvn dev list. Can you
>> post your swig wrapper somewhere? Do you think your work could be
>> incorporated into rapidsvn?
> I'm trying to convince Alex not to make svncpp dependent on wxWindows.
> I'd be happy if the source is available to compile and build the
> extension from, using std::list and std::string is fine.

I think you did convince him.

> Here is the prototype (not fit to ship) swig file. I've added in
> functions to convert types into something that SWIG can convert.
> Below is my
> unittest for ls. I have status and log working as well.

The rapidsvn api does look much easier to get started with since it doens't
force you to deal with side issues like authentication before you can have
working code.

The swig wrapper looks straighforward, although it's not clear why you need
so many helper functions. Couldn't a user write


instead of:

  svncpp.lenDirentList( all_dirents )

- Russ

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 17 00:30:37 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.