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

Bug in python bindings

From: Collin Winter <collinw_at_gmail.com>
Date: 2005-12-29 14:19:36 CET

Hello all,

Before posting a bug report, I thought I'd ask for some confirmation
of what I perceive to be a flaw in SVN's python bindings:

$ python
Python 2.4.1 (#1, Sep 20 2005, 12:25:38)
[GCC 3.3.6] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import svn.client
>>> svn.client.import()
  File "<stdin>", line 1
SyntaxError: invalid syntax
This is happening on Linux 2.6.13 with Subversion 1.2.3 and SWIG 1.3.25.

The reason for this is that "import" is a keyword in python. Note that
there's no compilation failure because svn.client.import is written in
C; you wouldn't notice this bug unless you needed the function.

Short of renaming the C function in libsvn_client/commit.c, the only
solution I see is special-casing this function in the SWIG-generated
bindings, perhaps renaming its python-side version to 'client_import'
or something.

Collin Winter

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 29 14:22:16 2005

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