Bazaar Version Control System

bzrlib.tests.test_utextwrap.TestWrap.test_umlaut_followed_by_dash (from )

Reported by Vincent Ladeuil on 2011-05-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Vincent Ladeuil

Bug Description

This looks like a genuine bug, not sure what is involved here, python2.6 may be involved though it doesn't fail on other platforms using it.

http://babune.ladeuil.net:24842/job/selftest-gentoo/lastFailedBuild/testReport/junit/bzrlib.tests.test_utextwrap/TestWrap/test_umlaut_followed_by_dash/

Related branches

Vincent Ladeuil (vila) wrote :

Wrong url above, that should be:
http://babune.ladeuil.net:24842/job/selftest-gentoo/417/testReport/bzrlib.tests.test_utextwrap/TestWrap/test_umlaut_followed_by_dash/

Digging a bit, it probably happens on gentoo because the python tests are installed there unlike on Ubuntu.

Vincent Ladeuil (vila) wrote :

Oooook, that one is nasty, reproducing recipe:

- install sphinx,

- install python tests (I grabbed test_support.py and
  test_textwrap.py from the python sources and put them under a
  test directory reachable via PYTHONPATH). Don't forget to
  create a dummy __init__.py there.

Now, run:

   ./bzr selftest -s bt.test_ut -s bt.doc_generate

Wait for your eyes to stop glazing.

The culprit is indeed sphinx (in sphinx/writers/text.py):

# monkey-patch...
new_wordsep_re = re.compile(
        r'(\s+|' # any whitespace
        r'(?<=\s)(?::[a-z-]+:)?`\S+|' # interpreted text start
        r'[^\s\w]*\w+[a-zA-Z]-(?=\w+[a-zA-Z])|' # hyphenated words
        r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash
textwrap.TextWrapper.wordsep_re = new_wordsep_re

Ouch.

I will report the bug upstream and provides a workaround along
the lines of: skip the failing test if the version is not > (the
highest where I see this bug) so it will fail on sphinx upgrade
if not fixed.

There is little point trying to keep running these tests in the
mean time.

Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
Vincent Ladeuil (vila) on 2011-05-28
Changed in bzr:
milestone: none → 2.4b4
status: Confirmed → Fix Released
Georg Brandl (gbrandl) wrote :

I agree the monkeypatching is bad; fixed upstream with a patch that actually keeps the same behavior in Sphinx, and does not raise "bool object is not callable" errors.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers