Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#34 incomplete filtering of FilterMessages

open
nobody
None
5
2006-09-18
2006-09-18
Santiago Gala
No

FilterMessages is supposed to filter messages below the
report_level. It has two problems, though:

* It does not remove nodes in
self.document.transform_messages
* It does not remove the refids in
the backrefs to the removed nodes

The attached patch does both things.

Discussion

  • Santiago Gala
    Santiago Gala
    2006-09-18

    better filtering of FIlterMessages

     
    Attachments
  • Felix Wiemann
    Felix Wiemann
    2006-09-19

    Logged In: YES
    user_id=1374215

    Thanks! We'll need to add tests to catch the bugs you
    describe. For the refids, that should be pretty
    straightforward; for the transform_messages, we'll have to
    add a test-transform that creates a system_message, it seems
    to me right now (right, David?).

    Note that "del self.document.ids[id_]['refid']" can cause a
    KeyError('refid'); I've changed the patch slightly (attached).

     
  • Felix Wiemann
    Felix Wiemann
    2006-09-19

    2nd version

     
    Attachments
  • Santiago Gala
    Santiago Gala
    2006-09-19

    Logged In: YES
    user_id=178886

    the docstring in the patch has a test,
    that succeeds with the patch
    and shows anchors pointing to the missing ids with the
    current code.

    Not sure how you are handling tests in the project,
    but this is the test case (with a warning and an error) that
    I was using to test.

    I'm writing a xhtml-im (JEP-0071) generator using docutils,
    and typical conventions in IRC: *word, repeatednick_, were
    giving sistematic errors :)