Edgewall Software

Ticket #565 (closed defect: fixed)

Opened 23 months ago

Last modified 12 months ago

[PATCH] assert statement with sideeffect

Reported by: peinthor@… Owned by: cmlenz
Priority: major Milestone: 0.7
Component: Template processing Version: 0.6
Keywords: Cc:



There is a nasty assert statement in markup.py with a sideeffect. And if for example you have an optimized genshi installation it breaks, because the assert call gets removed.

Patch is attached that should fix this.


genshi_assertsideffect.diff Download (0.6 KB) - added by anonymous 23 months ago.
patch for assert fix

Change History

Changed 23 months ago by anonymous

patch for assert fix

Changed 23 months ago by rblank

Wow, good catch. I wonder if this could be the cause of template include failures in Trac that some users have been experiencing, like  #7463.

Changed 23 months ago by peinthor@…

yes this breaks the xi:fallback it will just render until the first fallback statement and then completely stop.

Changed 22 months ago by hodgestar

  • status changed from new to closed
  • resolution set to fixed

Thanks for the bug report and patch! Applied in r1239 and backported to 0.6.x and 0.7.x in r1240 and r1241 respectively.

Changed 17 months ago by warner

This bug just bit me (in trac), in Genshi-0.6.1 (the latest genshi that's selected by the latest stable trac-0.12.5, which says "Genshi<=0.6,<0.7dev"). I don't think the fix is in Genshi-0.7.0 either.

Has there been a 0.6.x or 0.7.x release that includes this fix?

-Brian Warner, tahoe-lafs.org

Changed 12 months ago by hodgestar

Not yet, but there should be one soon.

Add/Change #565 ([PATCH] assert statement with sideeffect)


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

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'
Note: See TracTickets for help on using tickets.