Python 3 subversion bindings

77 views
Skip to first unread message

Tristan

unread,
Jul 5, 2021, 2:40:55 PM7/5/21
to Trac Users

Hello,

I recently upgraded my Trac to the development version 1.5.3, mainly because of the Python 3.X support. Doing this caused some grief but I managed to get it working, all but the SVN support.

I know this is missing the Subversion Python bindings, this is normally provided by the Ubuntu package python-subversion but this is a Python 2.7 package. I have been trying to find a way to get these bindings installed for Python 3.X but to no avail. See the log messages below.

What would be the way to get these bindings?


2021-07-05 14:02:26,539 Trac[env] INFO: -------------------------------- environment startup [Trac 1.5.3] --------------------------------

2021-07-05 14:02:26,721 Trac[svn_fs] INFO: Failed to load Subversion bindings

Traceback (most recent call last):

File "/usr/lib/python3.8/cmd.py", line 214, in onecmd

func = getattr(self, 'do_' + cmd)

AttributeError: 'TracAdmin' object has no attribute 'do_changeset'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "/usr/local/lib/python3.8/dist-packages/tracopt/versioncontrol/svn/svn_fs.py", line 200, in __init__

_import_svn()

File "/usr/local/lib/python3.8/dist-packages/tracopt/versioncontrol/svn/svn_fs.py", line 72, in _import_svn

from svn import fs, repos, core, delta

ModuleNotFoundError: No module named 'svn'

RjOllos

unread,
Jul 21, 2021, 9:37:23 PM7/21/21
to Trac Users


On Monday, July 5, 2021 at 11:40:55 AM UTC-7 Tristan wrote:

Hello,

I know this is missing the Subversion Python bindings, this is normally provided by the Ubuntu package python-subversion but this is a Python 2.7 package. I have been trying to find a way to get these bindings installed for Python 3.X but to no avail. See the log messages below.
 
Which Ubuntu version and what is the version of Subversion provided by that Ubuntu? Worst case, you may have to build and install Subversion from source.

Ryan

Tristan

unread,
Aug 18, 2021, 1:35:14 PM8/18/21
to Trac Users
Ubuntu version: 20.04
Subversion: 1.13.0-3

Someone noted that I would need 1.14 for it to support Python 3. I have yet to try to build it from source.

The joys of Python 2/3 incompatibility.

Tidbit Software

unread,
Jan 7, 2022, 5:21:04 PM (11 days ago) Jan 7
to Trac Users
Any updates on this? I'm in the same bind: Ubuntu 20.04, development copy of Trac (1.5.4 at this point), everything is migrated successfully from a project running Trac 1.4.3, but the repository connection is obviously broken.

Tidbit Software

unread,
Jan 7, 2022, 5:41:20 PM (11 days ago) Jan 7
to Trac Users
As a follow up, there does appear to be a package containing alternate Subversion bindings for Python 3:


however, I installed it and got the same error in Python 3,

>>> from svn import core

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>

ModuleNotFoundError: No module named 'svn'

It looks like python3-subversion exists for Ubuntu 21 and up:


so it may be that an OS upgrade is necessary (if you are tied to APT and/or do not want to deal with possible dependency issues).

RjOllos

unread,
Jan 11, 2022, 3:54:17 PM (7 days ago) Jan 11
to Trac Users
On Friday, January 7, 2022 at 2:41:20 PM UTC-8 sup...@tidbitsoftware.com wrote:
As a follow up, there does appear to be a package containing alternate Subversion bindings for Python 3:


however, I installed it and got the same error in Python 3,

>>> from svn import core

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>

ModuleNotFoundError: No module named 'svn'


Right, it's not compatible with subvertpy, py-vn, and other third-party Subversion bindings.
Reply all
Reply to author
Forward
0 new messages