Opened 8 years ago

Closed 8 years ago

#11654 closed defect (fixed)

ImportError (cannot import name cleandoc) on Python 2.5

Reported by: Jun Omae Owned by: Mikael Relbe
Priority: normal Component: WikiExtrasPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0


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/", line 68, in _load_eggs
  File "/home/jun66j5/venv/trac/1.0.1/lib/python2.5/site-packages/distribute-0.6.14-py2.5.egg/", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/jun66j5/src/trac/trac-hacks/wikiextrasplugin/trunk/tracwikiextras/", line 1, in <module>
    from boxes import AboutWikiBoxes, Boxes
  File "/home/jun66j5/src/trac/trac-hacks/wikiextrasplugin/trunk/tracwikiextras/", 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 Jun Omae 8 years ago.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Jun Omae

comment:1 Changed 8 years ago by Mikael Relbe

Resolution: fixed
Status: newclosed

In 14314:

WikiExtrasPlugin 1.0dev: Fixed ImportError (cleandoc) on Python 2.5

Patch by Jun Omae, many thanks! Fixes #11654

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Mikael Relbe.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.