Modify

Opened 11 years ago

Closed 10 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

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 Jun Omae 11 years ago.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by Jun Omae

comment:1 Changed 10 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
Action
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.