Modify

Opened 6 months ago

#11654 new defect

ImportError (cannot import name cleandoc) on Python 2.5

Reported by: jun66j5 Owned by: mrelbe
Priority: normal Component: WikiExtrasPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

I got the following error with wikiextrasplugin/trunk on Trac 1.0.1 and Python 2.5.

2014-03-31 15:30:43,770 Trac[loader] ERROR: Skipping "tracwikiextras = tracwikiextras":
Traceback (most recent call last):
  File "/home/jun66j5/venv/trac/1.0.1/lib/python2.5/site-packages/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/home/jun66j5/venv/trac/1.0.1/lib/python2.5/site-packages/distribute-0.6.14-py2.5.egg/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/jun66j5/src/trac/trac-hacks/wikiextrasplugin/trunk/tracwikiextras/__init__.py", line 1, in <module>
    from boxes import AboutWikiBoxes, Boxes
  File "/home/jun66j5/src/trac/trac-hacks/wikiextrasplugin/trunk/tracwikiextras/boxes.py", line 16, in <module>
    from inspect import cleandoc
ImportError: cannot import name cleandoc

The inspect.cleandoc function is not available on Python 2.5. However, we could use cleandoc in trac.util.compat instead.

Patch in wikiextrasplugin-trunk-r13789.diff.

Attachments (1)

wikiextrasplugin-trunk-r13789.diff (2.4 KB) - added by jun66j5 6 months ago.

Download all attachments as: .zip

Change History (1)

Changed 6 months ago by jun66j5

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.