Opened 5 years ago
Last modified 5 years ago
#13927 accepted task
Trac 1.5.2 compatibility
| Reported by: | anonymous | Owned by: | Ryan J Ollos |
|---|---|---|---|
| Priority: | normal | Component: | WikiExtrasPlugin |
| Severity: | normal | Keywords: | Trac1.5.2 patch |
| Cc: | Trac Release: |
Description
Plugin does not work with Trac 1.5.2 anymore:
ImportError: cannot import name 'cleandoc' from 'trac.util.compat'
Trac 1.5.2 removed trac.util.compat.cleandoc (t:ticket:11600, changeset:17483).
Solution: Switch to trac.util.text.cleandoc instead in color.py, boxes.py, icons.py and phrases.py.
ImportError: cannot import name 'sorted' from 'trac.util.compat'
Now the plugin loads. However it still does not work: Any page request gets stuck forever somewhere.
Attachments (1)
Change History (7)
comment:1 Changed 5 years ago by
| Type: | defect → task |
|---|
Changed 5 years ago by
| Attachment: | wikiextras_T13927.patch added |
|---|
comment:2 follow-up: 3 Changed 5 years ago by
comment:3 follow-up: 6 Changed 5 years ago by
comment:4 Changed 5 years ago by
| Owner: | changed from Mikael Relbe to Ryan J Ollos |
|---|---|
| Status: | new → accepted |
comment:5 Changed 5 years ago by
| Keywords: | patch added |
|---|
comment:6 Changed 5 years ago by
changed
csstexttocsstext.encode('utf-8')on this line and that solved the problem.
Similar to Trac wiki code, Trac ticket code, ... maybe required because of Trac code here? I never got a ValueError("Can't send str content") though.
(That Trac code looks strange actually: How can isinstance(content, str) be relevant in _send for Content-Length, when it then calls write(content) which (supposedly) raises (or gets stuck in practice) in that case?)
Anyway, applying the patch above would fix the plugin.



Plugin needs to be ported to Python 3.