Edgewall Software

ChristianBoos: genshi-bug-deque-mutated-during-iteration.htm

File genshi-bug-deque-mutated-during-iteration.htm, 103.9 KB (added by cboos, 13 months ago)

weird genshi error

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3 
4
5  <head>
6    <title>
7      Internal Error –
8      cblaptop trac – Trac
9    </title>
10        <link rel="search" href="/cblaptop-trac/search" />
11        <link rel="help" href="/cblaptop-trac/wiki/TracGuide" />
12        <link rel="start" href="/cblaptop-trac/wiki" />
13        <link rel="stylesheet" href="/cblaptop-trac/chrome/common/css/trac.css" type="text/css" />
14        <link rel="shortcut icon" href="/cblaptop-trac/chrome/common/trac.ico" type="image/x-icon" />
15        <link rel="icon" href="/cblaptop-trac/chrome/common/trac.ico" type="image/x-icon" />
16      <link type="application/opensearchdescription+xml" rel="search" href="/cblaptop-trac/search/opensearch" title="Search cblaptop trac" />
17    <script type="text/javascript" src="/cblaptop-trac/chrome/common/js/jquery.js"></script><script type="text/javascript" src="/cblaptop-trac/chrome/common/js/trac.js"></script><script type="text/javascript" src="/cblaptop-trac/chrome/common/js/search.js"></script>
18    <!--[if lt IE 7]>
19    <script type="text/javascript" src="/cblaptop-trac/chrome/common/js/ie_pre7_hacks.js"></script>
20    <![endif]-->
21    <script type="text/javascript">/*<![CDATA[*/
22      $(document).ready(function() {
23        $("#traceback a").click(function() {
24          $("div", this.parentNode).slideToggle("fast");
25          return false;
26        });
27        $("#tbtoggle").click(function() {
28          if (this.value.indexOf("interactive") < 0) {
29            this.value = "Switch to interactive view";
30            $("#traceback ul").fadeOut("fast", function() {
31              $("#traceback pre").fadeIn("fast");
32            });
33          } else {
34            this.value = "Switch to plain text view";
35            $("#traceback pre").fadeOut("fast", function() {
36              $("#traceback ul").fadeIn("fast");
37            });
38          }
39          return false;
40        });
41       var descr = $("#description").text();
42       descr = descr.replace(/==== System Information ====\s+/m,
43         "User Agent was: `" + navigator.userAgent + "`\n\n$&"
44       );
45       descr = descr.replace(/\|\|\s+==== Python Traceback ====/m,
46         "||\n|| '''jQuery:''' || `" + $().jquery + "` $&"
47       );
48       $("#description").text(descr);
49       $("#systeminfo").append("<tr><th>jQuery:</th><td>"+$().jquery+"</td></tr>");
50       $("#systeminfo").before("<p>User Agent: <tt>"+navigator.userAgent+"</tt></p>");
51      });
52    /*]]>*/</script>
53  </head>
54  <body>
55    <div id="banner">
56      <div id="header">
57        <a id="logo" href="http://cblaptop:8001/cblaptop-trac/wiki/WikiStart"><img src="/cblaptop-trac/chrome/common/beafraid_thumbnail.gif" alt="Christian Boos' Personal Trac" /></a>
58      </div>
59      <form id="search" action="/cblaptop-trac/search" method="get"><div>
60        <label for="proj-search">Search:</label>
61        <input type="text" id="proj-search" name="q" size="18" value="" />
62        <input type="submit" value="Search" />
63      </div></form>
64      <div id="metanav" class="nav">
65    <ul>
66      <li class="first">logged in as cboos</li><li><a href="/cblaptop-trac/logout">Logout</a></li><li><a href="/cblaptop-trac/prefs">Preferences</a></li><li><a href="/cblaptop-trac/wiki/TracGuide">Help/Guide</a></li><li class="last"><a href="/cblaptop-trac/about">About Trac</a></li>
67    </ul>
68  </div>
69    </div>
70    <div id="mainnav" class="nav">
71    <ul>
72      <li class="first"><a href="/cblaptop-trac/wiki">Wiki</a></li><li class="active"><a href="/cblaptop-trac/timeline">Timeline</a></li><li><a href="/cblaptop-trac/roadmap">Roadmap</a></li><li><a href="/cblaptop-trac/browser">Browse Source</a></li><li><a href="/cblaptop-trac/report">View Tickets</a></li><li><a href="/cblaptop-trac/newticket">New Ticket</a></li><li><a href="/cblaptop-trac/search">Search</a></li><li><a href="/cblaptop-trac/admin" title="Administration">Admin</a></li><li class="last"><a href="/cblaptop-trac/pydoc">PyDoc</a></li>
73    </ul>
74  </div>
75    <div id="main">
76    <div id="ctxtnav" class="nav"></div>
77    <div id="content" class="error">
78          <h1>Oops…</h1>
79          <div class="message">
80            <strong>Trac detected an internal error:</strong>
81            <pre>RuntimeError: deque mutated during iteration</pre>
82          </div>
83              <p>If you think this should work you can reproduce the problem,
84              you should consider reporting this to the Trac team.</p>
85              <p>Before you do that, though, please first try
86                <a href="http://trac.edgewall.org//search?ticket=yes&amp;noquickjump=1&amp;q=RuntimeError%3A+deque+mutated+during+iteration">searching</a>
87                for similar issues, as it is quite likely that this problem
88                has been reported before. For questions about installation
89                and configuration of Trac, please try the
90                <a href="http://trac.edgewall.org//wiki/MailingList">mailing list</a>
91                instead of filing a ticket.
92              </p>
93              <form class="newticket" method="get" action="http://trac.edgewall.org//newticket">
94                <p>Otherwise, please
95    <input type="hidden" name="preview" value="1" />
96    <input type="hidden" name="reporter" value="cboos" />
97    <input type="hidden" name="version" value="devel" />
98    <input type="hidden" name="summary" value="RuntimeError: deque mutated during iteration" />
99    <textarea name="description" rows="3" cols="10">
100==== How to Reproduce ====
101
102While doing a GET operation on `/timeline`, Trac issued an internal error.
103
104''(please provide additional details here)''
105
106
107Request parameters:
108{{{
109{'changeset': u'on',
110 'daysback': u'898',
111 'from': u'10/29/2007',
112 'milestone': u'on',
113 'ticket': u'on',
114 'ticket_details': u'on',
115 'update': u'Update',
116 'wiki': u'on'}
117}}}
118
119
120==== System Information ====
121
122|| '''Trac''' || `0.11dev-r6089` ||
123|| '''Python''' || `2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)]` ||
124|| '''setuptools''' || `0.7a1` ||
125|| '''SQLite''' || `3.3.10` ||
126|| '''pysqlite''' || `2.3.3` ||
127|| '''Genshi''' || `0.5dev-r656` ||
128|| '''Pygments''' || `None` ||
129|| '''Mercurial''' || `unknown` ||
130
131==== Python Traceback ====
132{{{
133Traceback (most recent call last):
134  File "C:\Workspace\src\trac\repos\context-refactoring\trac\web\main.py", line 381, in dispatch_request
135    dispatcher.dispatch(req)
136  File "C:\Workspace\src\trac\repos\context-refactoring\trac\web\main.py", line 213, in dispatch
137    data, content_type)
138  File "C:\Workspace\src\trac\repos\context-refactoring\trac\web\chrome.py", line 619, in render_template
139    return stream.render(method, doctype=doctype)
140  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\core.py", line 172, in render
141    return encode(generator, method=method, encoding=encoding)
142  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\output.py", line 45, in encode
143    output = u''.join(list(iterator))
144  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\output.py", line 274, in __call__
145    for kind, data, pos in stream:
146  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\output.py", line 526, in __call__
147    for kind, data, pos in stream:
148  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\output.py", line 632, in __call__
149    for kind, data, pos in chain(stream, [(None, None, None)]):
150  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\output.py", line 466, in __call__
151    for ev in stream:
152  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\core.py", line 273, in _ensure
153    for event in stream:
154  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\core.py", line 273, in _ensure
155    for event in stream:
156  File "C:\Workspace\src\trac\repos\context-refactoring\trac\web\chrome.py", line 649, in _strip_accesskeys
157    for kind, data, pos in stream:
158  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\core.py", line 273, in _ensure
159    for event in stream:
160  File "C:\Workspace\src\trac\repos\context-refactoring\trac\web\chrome.py", line 638, in _generate
161    for kind, data, pos in stream:
162  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\base.py", line 521, in _include
163    for event in stream:
164  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\markup.py", line 279, in _match
165    ctxt))
166  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\base.py", line 521, in _include
167    for event in stream:
168  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\markup.py", line 239, in _strip
169    event = stream.next()
170  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\base.py", line 496, in _exec
171    for event in stream:
172  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\base.py", line 450, in _eval
173    for kind, data, pos in stream:
174  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\base.py", line 510, in _flatten
175    for event in self._flatten(substream, ctxt):
176  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\base.py", line 510, in _flatten
177    for event in self._flatten(substream, ctxt):
178  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\base.py", line 504, in _flatten
179    for event in stream:
180  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\directives.py", line 371, in __call__
181    for item in iterable:
182  File "&lt;string&gt;", line 1, in &lt;lambda.3&gt;
183  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\eval.py", line 265, in lookup_name
184    val = data.get(name, UNDEFINED)
185  File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\template\base.py", line 224, in get
186    for frame in self.frames:
187RuntimeError: deque mutated during iteration
188
189}}}
190    </textarea>
191    <span class="inlinebuttons">
192      <input type="submit" name="create" value="Create" />
193    </span>
194   a new ticket at
195                the Trac project site, where you can describe the problem and
196                explain how to reproduce it.</p>
197              </form>
198                <h2>Python Traceback</h2>
199                <div id="traceback">
200                  Most recent call last:
201                  <ul>
202                    <li class="frame">
203                      <a href="#frame0" id="frame0">
204                        <span class="file">File "C:\Workspace\src\trac\repos\context-refactoring\trac\web\main.py",
205                        line <b>381</b>, in</span>
206                        <var>dispatch_request</var>
207                      </a>
208                      <div class="source" style="display: none">
209                        <h3>Code fragment:</h3>
210                        <ol start="376">
211                          <li><code>        if not env and env_error:</code></li><li><code>            raise HTTPInternalError(env_error)</code></li><li><code>        try:</code></li><li><code>            try:</code></li><li><code>                dispatcher = RequestDispatcher(env)</code></li>
212                          <li class="current"><code>                dispatcher.dispatch(req)</code></li>
213                          <li><code>            except RequestDone:</code></li><li><code>                pass</code></li><li><code>            return req._response or []</code></li><li><code>        finally:</code></li><li><code>            if not run_once:</code></li>
214                        </ol>
215                      </div>
216                      <div class="vars" style="display: none">
217                        <h3>Local variables:</h3>
218                        <table class="listing">
219                          <thead><tr><th>Name</th><th>Value</th></tr></thead>
220                          <tbody>
221                            <tr>
222                              <th scope="row"><var>after</var></th>
223                              <td><code>['            except RequestDone:', '                pass', '             ...</code></td>
224                            </tr><tr class="odd">
225                              <th scope="row"><var>before</var></th>
226                              <td><code>['        if not env and env_error:', '            raise  ...</code></td>
227                            </tr><tr>
228                              <th scope="row"><var>dispatcher</var></th>
229                              <td><code>&lt;trac.web.main.RequestDispatcher object at 0x01E01610&gt;</code></td>
230                            </tr><tr class="odd">
231                              <th scope="row"><var>e</var></th>
232                              <td><code>&lt;exceptions.RuntimeError instance at 0x035C9C10&gt;</code></td>
233                            </tr><tr>
234                              <th scope="row"><var>env</var></th>
235                              <td><code>&lt;trac.env.Environment object at 0x01B21890&gt;</code></td>
236                            </tr><tr class="odd">
237                              <th scope="row"><var>env_error</var></th>
238                              <td><code>None</code></td>
239                            </tr><tr>
240                              <th scope="row"><var>env_name</var></th>
241                              <td><code>'cblaptop-trac'</code></td>
242                            </tr><tr class="odd">
243                              <th scope="row"><var>env_parent_dir</var></th>
244                              <td><code>'C:\\Workspace\\local\\trac'</code></td>
245                            </tr><tr>
246                              <th scope="row"><var>env_path</var></th>
247                              <td><code>'C:\\Workspace\\local\\trac\\cblaptop-trac'</code></td>
248                            </tr><tr class="odd">
249                              <th scope="row"><var>env_paths</var></th>
250                              <td><code>None</code></td>
251                            </tr><tr>
252                              <th scope="row"><var>environ</var></th>
253                              <td><code>{'HTTP_AUTHORIZATION': 'Digest username="cboos", realm="BCT",  ...</code></td>
254                            </tr><tr class="odd">
255                              <th scope="row"><var>exc_info</var></th>
256                              <td><code>(&lt;class exceptions.RuntimeError at 0x00A647B0&gt;, &lt;exceptions.RuntimeError  ...</code></td>
257                            </tr><tr>
258                              <th scope="row"><var>filename</var></th>
259                              <td><code>'C:\\Workspace\\src\\trac\\repos\\context-refactoring\\trac\\web\\main.py'</code></td>
260                            </tr><tr class="odd">
261                              <th scope="row"><var>frames</var></th>
262                              <td><code>[{'function': 'dispatch_request', 'lines_before': ['        if not env and  ...</code></td>
263                            </tr><tr>
264                              <th scope="row"><var>has_admin</var></th>
265                              <td><code>True</code></td>
266                            </tr><tr class="odd">
267                              <th scope="row"><var>line</var></th>
268                              <td><code>'                dispatcher.dispatch(req)'</code></td>
269                            </tr><tr>
270                              <th scope="row"><var>lineno</var></th>
271                              <td><code>380</code></td>
272                            </tr><tr class="odd">
273                              <th scope="row"><var>message</var></th>
274                              <td><code>u'RuntimeError: deque mutated during iteration'</code></td>
275                            </tr><tr>
276                              <th scope="row"><var>path_info</var></th>
277                              <td><code>['timeline']</code></td>
278                            </tr><tr class="odd">
279                              <th scope="row"><var>req</var></th>
280                              <td><code>&lt;Request "GET u'/timeline'"&gt;</code></td>
281                            </tr><tr>
282                              <th scope="row"><var>run_once</var></th>
283                              <td><code>False</code></td>
284                            </tr><tr class="odd">
285                              <th scope="row"><var>script_url</var></th>
286                              <td><code>None</code></td>
287                            </tr><tr>
288                              <th scope="row"><var>start_response</var></th>
289                              <td><code>&lt;bound method WSGIServerGateway._start_response of  ...</code></td>
290                            </tr><tr class="odd">
291                              <th scope="row"><var>tb</var></th>
292                              <td><code>&lt;traceback object at 0x036BD0A8&gt;</code></td>
293                            </tr><tr>
294                              <th scope="row"><var>tb_hide</var></th>
295                              <td><code>None</code></td>
296                            </tr><tr class="odd">
297                              <th scope="row"><var>traceback</var></th>
298                              <td><code>'Traceback (most recent call last):\n  File  ...</code></td>
299                            </tr>
300                          </tbody>
301                        </table>
302                      </div>
303                    </li><li class="frame">
304                      <a href="#frame1" id="frame1">
305                        <span class="file">File "C:\Workspace\src\trac\repos\context-refactoring\trac\web\main.py",
306                        line <b>213</b>, in</span>
307                        <var>dispatch</var>
308                      </a>
309                      <div class="source" style="display: none">
310                        <h3>Code fragment:</h3>
311                        <ol start="208">
312                          <li><code>                            out = StringIO()</code></li><li><code>                            pprint(data, out)</code></li><li><code>                            req.send(out.getvalue(), 'text/plain')</code></li><li><code>                        else:</code></li><li><code>                            output = chrome.render_template(req, template,</code></li>
313                          <li class="current"><code>                                                            data, content_type)</code></li>
314                          <li><code>                            # Give the session a chance to persist changes</code></li><li><code>                            if req.session:</code></li><li><code>                                req.session.save()</code></li><li><code> </code></li><li><code>                            req.send(output, content_type or 'text/html')</code></li>
315                        </ol>
316                      </div>
317                      <div class="vars" style="display: none">
318                        <h3>Local variables:</h3>
319                        <table class="listing">
320                          <thead><tr><th>Name</th><th>Value</th></tr></thead>
321                          <tbody>
322                            <tr>
323                              <th scope="row"><var>chosen_handler</var></th>
324                              <td><code>&lt;trac.timeline.web_ui.TimelineModule object at 0x01E010B0&gt;</code></td>
325                            </tr><tr class="odd">
326                              <th scope="row"><var>chrome</var></th>
327                              <td><code>&lt;trac.web.chrome.Chrome object at 0x01E05E10&gt;</code></td>
328                            </tr><tr>
329                              <th scope="row"><var>content_type</var></th>
330                              <td><code>None</code></td>
331                            </tr><tr class="odd">
332                              <th scope="row"><var>data</var></th>
333                              <td><code>{'dateinfo': &lt;function dateinfo at 0x03C13DF0&gt;, 'precisedate':  ...</code></td>
334                            </tr><tr>
335                              <th scope="row"><var>err</var></th>
336                              <td><code>(&lt;class exceptions.RuntimeError at 0x00A647B0&gt;, &lt;exceptions.RuntimeError  ...</code></td>
337                            </tr><tr class="odd">
338                              <th scope="row"><var>handler</var></th>
339                              <td><code>&lt;trac.timeline.web_ui.TimelineModule object at 0x01E010B0&gt;</code></td>
340                            </tr><tr>
341                              <th scope="row"><var>req</var></th>
342                              <td><code>&lt;Request "GET u'/timeline'"&gt;</code></td>
343                            </tr><tr class="odd">
344                              <th scope="row"><var>resp</var></th>
345                              <td><code>('timeline.html', {'dateinfo': &lt;function dateinfo at 0x03C13DF0&gt;,  ...</code></td>
346                            </tr><tr>
347                              <th scope="row"><var>self</var></th>
348                              <td><code>&lt;trac.web.main.RequestDispatcher object at 0x01E01610&gt;</code></td>
349                            </tr><tr class="odd">
350                              <th scope="row"><var>template</var></th>
351                              <td><code>'timeline.html'</code></td>
352                            </tr>
353                          </tbody>
354                        </table>
355                      </div>
356                    </li><li class="frame">
357                      <a href="#frame2" id="frame2">
358                        <span class="file">File "C:\Workspace\src\trac\repos\context-refactoring\trac\web\chrome.py",
359                        line <b>619</b>, in</span>
360                        <var>render_template</var>
361                      </a>
362                      <div class="source" style="display: none">
363                        <h3>Code fragment:</h3>
364                        <ol start="614">
365                          <li><code>            'late_links': req.chrome['links'],</code></li><li><code>            'late_scripts': req.chrome['scripts'],</code></li><li><code>        })</code></li><li><code> </code></li><li><code>        try:</code></li>
366                          <li class="current"><code>            return stream.render(method, doctype=doctype)</code></li>
367                          <li><code>        except:</code></li><li><code>            # restore what may be needed by the error template</code></li><li><code>            req.chrome['links'] = links</code></li><li><code>            raise</code></li><li><code> </code></li>
368                        </ol>
369                      </div>
370                      <div class="vars" style="display: none">
371                        <h3>Local variables:</h3>
372                        <table class="listing">
373                          <thead><tr><th>Name</th><th>Value</th></tr></thead>
374                          <tbody>
375                            <tr>
376                              <th scope="row"><var>content_type</var></th>
377                              <td><code>'text/html'</code></td>
378                            </tr><tr class="odd">
379                              <th scope="row"><var>data</var></th>
380                              <td><code>{'abs_url_of': &lt;function get_abs_url at 0x03EC1AB0&gt;, 'all': &lt;function all  ...</code></td>
381                            </tr><tr>
382                              <th scope="row"><var>doctype</var></th>
383                              <td><code>('html', '-//W3C//DTD XHTML 1.0 Strict//EN',  ...</code></td>
384                            </tr><tr class="odd">
385                              <th scope="row"><var>filename</var></th>
386                              <td><code>'timeline.html'</code></td>
387                            </tr><tr>
388                              <th scope="row"><var>fragment</var></th>
389                              <td><code>False</code></td>
390                            </tr><tr class="odd">
391                              <th scope="row"><var>links</var></th>
392                              <td><code>{'search': [{'href': '/cblaptop-trac/search', 'type': None, 'class': None,  ...</code></td>
393                            </tr><tr>
394                              <th scope="row"><var>method</var></th>
395                              <td><code>'xhtml'</code></td>
396                            </tr><tr class="odd">
397                              <th scope="row"><var>req</var></th>
398                              <td><code>&lt;Request "GET u'/timeline'"&gt;</code></td>
399                            </tr><tr>
400                              <th scope="row"><var>self</var></th>
401                              <td><code>&lt;trac.web.chrome.Chrome object at 0x01E05E10&gt;</code></td>
402                            </tr><tr class="odd">
403                              <th scope="row"><var>stream</var></th>
404                              <td><code>&lt;genshi.core.Stream object at 0x03ED6CB0&gt;</code></td>
405                            </tr><tr>
406                              <th scope="row"><var>template</var></th>
407                              <td><code>&lt;MarkupTemplate "timeline.html"&gt;</code></td>
408                            </tr>
409                          </tbody>
410                        </table>
411                      </div>
412                    </li><li class="frame">
413                      <a href="#frame3" id="frame3">
414                        <span class="file">File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\core.py",
415                        line <b>172</b>, in</span>
416                        <var>render</var>
417                      </a>
418                      <div class="source" style="display: none">
419                        <h3>Code fragment:</h3>
420                        <ol start="167">
421                          <li><code>        """</code></li><li><code>        from genshi.output import encode</code></li><li><code>        if method is None:</code></li><li><code>            method = self.serializer or 'xml'</code></li><li><code>        generator = self.serialize(method=method, **kwargs)</code></li>
422                          <li class="current"><code>        return encode(generator, method=method, encoding=encoding)</code></li>
423                          <li><code> </code></li><li><code>    def select(self, path, namespaces=None, variables=None):</code></li><li><code>        """Return a new stream that contains the events matching the given</code></li><li><code>        XPath expression.</code></li><li><code>        </code></li>
424                        </ol>
425                      </div>
426                      <div class="vars" style="display: none">
427                        <h3>Local variables:</h3>
428                        <table class="listing">
429                          <thead><tr><th>Name</th><th>Value</th></tr></thead>
430                          <tbody>
431                            <tr>
432                              <th scope="row"><var>encode</var></th>
433                              <td><code>&lt;function encode at 0x00DBC430&gt;</code></td>
434                            </tr><tr class="odd">
435                              <th scope="row"><var>encoding</var></th>
436                              <td><code>'utf-8'</code></td>
437                            </tr><tr>
438                              <th scope="row"><var>generator</var></th>
439                              <td><code>&lt;generator object at 0x03990260&gt;</code></td>
440                            </tr><tr class="odd">
441                              <th scope="row"><var>kwargs</var></th>
442                              <td><code>{'doctype': ('html', '-//W3C//DTD XHTML 1.0 Strict//EN',  ...</code></td>
443                            </tr><tr>
444                              <th scope="row"><var>method</var></th>
445                              <td><code>'xhtml'</code></td>
446                            </tr><tr class="odd">
447                              <th scope="row"><var>self</var></th>
448                              <td><code>&lt;genshi.core.Stream object at 0x03ED6CB0&gt;</code></td>
449                            </tr>
450                          </tbody>
451                        </table>
452                      </div>
453                    </li><li class="frame">
454                      <a href="#frame4" id="frame4">
455                        <span class="file">File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\output.py",
456                        line <b>45</b>, in</span>
457                        <var>encode</var>
458                      </a>
459                      <div class="source" style="display: none">
460                        <h3>Code fragment:</h3>
461                        <ol start="40">
462                          <li><code>    :param encoding: how the output string should be encoded; if set to `None`,</code></li><li><code>                     this method returns a `unicode` object</code></li><li><code>    :return: a string or unicode object (depending on the `encoding` parameter)</code></li><li><code>    :since: version 0.4.1</code></li><li><code>    """</code></li>
463                          <li class="current"><code>    output = u''.join(list(iterator))</code></li>
464                          <li><code>    if encoding is not None:</code></li><li><code>        errors = 'replace'</code></li><li><code>        if method != 'text' and not isinstance(method, TextSerializer):</code></li><li><code>            errors = 'xmlcharrefreplace'</code></li><li><code>        return output.encode(encoding, errors)</code></li>
465                        </ol>
466                      </div>
467                      <div class="vars" style="display: none">
468                        <h3>Local variables:</h3>
469                        <table class="listing">
470                          <thead><tr><th>Name</th><th>Value</th></tr></thead>
471                          <tbody>
472                            <tr>
473                              <th scope="row"><var>encoding</var></th>
474                              <td><code>'utf-8'</code></td>
475                            </tr><tr class="odd">
476                              <th scope="row"><var>iterator</var></th>
477                              <td><code>&lt;generator object at 0x03990260&gt;</code></td>
478                            </tr><tr>
479                              <th scope="row"><var>method</var></th>
480                              <td><code>'xhtml'</code></td>
481                            </tr>
482                          </tbody>
483                        </table>
484                      </div>
485                    </li><li class="frame">
486                      <a href="#frame5" id="frame5">
487                        <span class="file">File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\output.py",
488                        line <b>274</b>, in</span>
489                        <var>__call__</var>
490                      </a>
491                      <div class="source" style="display: none">
492                        <h3>Code fragment:</h3>
493                        <ol start="269">
494                          <li><code>        in_cdata = False</code></li><li><code> </code></li><li><code>        stream = chain(self.preamble, stream)</code></li><li><code>        for filter_ in self.filters:</code></li><li><code>            stream = filter_(stream)</code></li>
495                          <li class="current"><code>        for kind, data, pos in stream:</code></li>
496                          <li><code> </code></li><li><code>            if kind is START or kind is EMPTY:</code></li><li><code>                tag, attrib = data</code></li><li><code>                buf = ['&lt;', tag]</code></li><li><code>                for attr, value in attrib:</code></li>
497                        </ol>
498                      </div>
499                      <div class="vars" style="display: none">
500                        <h3>Local variables:</h3>
501                        <table class="listing">
502                          <thead><tr><th>Name</th><th>Value</th></tr></thead>
503                          <tbody>
504                            <tr>
505                              <th scope="row"><var>attr</var></th>
506                              <td><code>u'src'</code></td>
507                            </tr><tr class="odd">
508                              <th scope="row"><var>attrib</var></th>
509                              <td><code>Attrs([(u'type', u'text/javascript'), (u'src',  ...</code></td>
510                            </tr><tr>
511                              <th scope="row"><var>boolean_attrs</var></th>
512                              <td><code>frozenset(['compact', 'defer', 'checked', 'nohref', 'selected', 'ismap',  ...</code></td>
513                            </tr><tr class="odd">
514                              <th scope="row"><var>buf</var></th>
515                              <td><code>['&lt;', u'script', ' ', u'type', '="', &lt;Markup u'text/javascript'&gt;, '"', '  ...</code></td>
516                            </tr><tr>
517                              <th scope="row"><var>data</var></th>
518                              <td><code>u'head'</code></td>
519                            </tr><tr class="odd">
520                              <th scope="row"><var>empty_elems</var></th>
521                              <td><code>frozenset(['img', 'area', 'basefont', 'frame', 'isindex', 'meta', 'param',  ...</code></td>
522                            </tr><tr>
523                              <th scope="row"><var>filter_</var></th>
524                              <td><code>&lt;genshi.output.NamespaceFlattener object at 0x03ED6D90&gt;</code></td>
525                            </tr><tr class="odd">
526                              <th scope="row"><var>have_doctype</var></th>
527                              <td><code>True</code></td>
528                            </tr><tr>
529                              <th scope="row"><var>in_cdata</var></th>
530                              <td><code>False</code></td>
531                            </tr><tr class="odd">
532                              <th scope="row"><var>kind</var></th>
533                              <td><code>'END'</code></td>
534                            </tr><tr>
535                              <th scope="row"><var>name</var></th>
536                              <td><code>'html'</code></td>
537                            </tr><tr class="odd">
538                              <th scope="row"><var>pos</var></th>
539                              <td><code>(u'layout.html', 29, 2)</code></td>
540                            </tr><tr>
541                              <th scope="row"><var>pubid</var></th>
542                              <td><code>'-//W3C//DTD XHTML 1.0 Strict//EN'</code></td>
543                            </tr><tr class="odd">
544                              <th scope="row"><var>self</var></th>
545                              <td><code>&lt;genshi.output.XHTMLSerializer object at 0x03ED6D10&gt;</code></td>
546                            </tr><tr>
547                              <th scope="row"><var>stream</var></th>
548                              <td><code>&lt;generator object at 0x03990148&gt;</code></td>
549                            </tr><tr class="odd">
550                              <th scope="row"><var>sysid</var></th>
551                              <td><code>'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'</code></td>
552                            </tr><tr>
553                              <th scope="row"><var>tag</var></th>
554                              <td><code>u'script'</code></td>
555                            </tr><tr class="odd">
556                              <th scope="row"><var>value</var></th>
557                              <td><code>u'/cblaptop-trac/chrome/common/js/ie_pre7_hacks.js'</code></td>
558                            </tr>
559                          </tbody>
560                        </table>
561                      </div>
562                    </li><li class="frame">
563                      <a href="#frame6" id="frame6">
564                        <span class="file">File "c:\workspace\src\trac\dependencies\genshi\trunk\genshi\output.py",
565                        line <b>526