Bug#561793: I've made a Patch

2009-12-21 Thread Thomas Hille


I made this small patch wich fixes the most critical bug with docutils 
0.6. Some testing resulted in some other possible bugs, investigating this.



--- orig/epydoc/markup/restructuredtext.py2008-01-28 
19:15:33.0 +0100
+++ local/epydoc/markup/restructuredtext.py2009-12-21 
11:04:03.0 +0100

@@ -304,8 +304,8 @@
 # Extract the first sentence.
 for child in node:
 if isinstance(child, docutils.nodes.Text):
-m = self._SUMMARY_RE.match(child.data)
-if m:
+if hasattr(child, 'data'):
+m = self._SUMMARY_RE.match(child.data)
 
summary_pieces.append(docutils.nodes.Text(m.group(1)))

 other = child.data[m.end():]
 if other and not other.isspace():





--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#561793: I've made a Patch

2009-12-21 Thread Kenneth Pronovici
Hi,

I haven't had time to look at this yet, and I might not have time until
after the holidays due to work schedule and travel.  Sorry about that.

I have pinged Edward (upstream) to see whether I can get some feedback from
him before I consider applying the patch.  I don't have a a problem applying
your patch if we don't hear from Edward, but I'd like to get his blessing if
possible, since this parsing code is fairly complex.

Couple of quick questions:

1. Does the existing unit test suite pass or fail with Docutils 0.6?  If
not, have you been able to develop any tests that we could add to the suite
to demonstrate the problem?

2. Does the existing unit test suite pass or fail with your patches in
place?  What testing have you been doing to check for possible bugs (the
ones you mention above)?

Thanks,

KEN


Bug#561793: I've made a Patch

2009-12-21 Thread Emilio Pozuelo Monfort
Thomas Hille wrote:
 
 I made this small patch wich fixes the most critical bug with docutils
 0.6. Some testing resulted in some other possible bugs, investigating this.
 
 
 --- orig/epydoc/markup/restructuredtext.py2008-01-28
 19:15:33.0 +0100
 +++ local/epydoc/markup/restructuredtext.py2009-12-21
 11:04:03.0 +0100
 @@ -304,8 +304,8 @@
  # Extract the first sentence.
  for child in node:
  if isinstance(child, docutils.nodes.Text):
 -m = self._SUMMARY_RE.match(child.data)
 -if m:
 +if hasattr(child, 'data'):
 +m = self._SUMMARY_RE.match(child.data)

Indentation is pretty important in Python, and it seems broken here.

Emilio



signature.asc
Description: OpenPGP digital signature