test_unversion_parent_and_child_renamed_bug_187207 tests fail on Python 2.7

Bug #654730 reported by Martin Packman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Martin Packman

Bug Description

On Python 2.7 each of the five working tree format variations of the test for bug 187207 error.

<http://babune.ladeuil.net:24842/job/selftest-maverick/37/testReport/junit/bzrlib.tests.per_workingtree.test_unversion/TestUnversion/test_unversion_parent_and_child_renamed_bug_187207_WorkingTreeFormat6_/>

Traceback (most recent call last):
  File "/home/babune/lib/python/testtools/runtest.py", line 144, in _run_user
    return fn(*args)
  File "/home/babune/lib/python/testtools/testcase.py", line 465, in _run_test_method
    testMethod()
  File "/home/babune/babune/slaves/maverick64.local/workspace/selftest-maverick/bzrlib/tests/per_workingtree/test_unversion.py", line 45, in test_unversion_parent_and_child_renamed_bug_187207
    tree = self.make_branch_and_tree(['.'])
  File "/home/babune/babune/slaves/maverick64.local/workspace/selftest-maverick/bzrlib/tests/per_workingtree/__init__.py", line 56, in make_branch_and_tree
    made_control = self.make_bzrdir(relpath, format=format)
  File "/home/babune/babune/slaves/maverick64.local/workspace/selftest-maverick/bzrlib/tests/per_controldir/__init__.py", line 74, in make_bzrdir
    relpath, format=format)
  File "/home/babune/babune/slaves/maverick64.local/workspace/selftest-maverick/bzrlib/tests/__init__.py", line 2345, in make_bzrdir
    maybe_a_url = self.get_url(relpath)
  File "/home/babune/babune/slaves/maverick64.local/workspace/selftest-maverick/bzrlib/tests/__init__.py", line 2261, in get_url
    return self._adjust_url(base, relpath)
  File "/home/babune/babune/slaves/maverick64.local/workspace/selftest-maverick/bzrlib/tests/__init__.py", line 2249, in _adjust_url
    base += urlutils.escape(relpath)
  File "/home/babune/babune/slaves/maverick64.local/workspace/selftest-maverick/bzrlib/urlutils.py", line 69, in escape
    return str(urllib.quote(relpath, safe='/~'))
  File "/usr/lib/python2.7/urllib.py", line 1231, in quote
    if not s.rstrip(safe):
AttributeError: 'list' object has no attribute 'rstrip'

Revision that introduced the incompatibility is <http://svn.python.org/view?view=rev&revision=81265> which was aimed at improving performance <http://bugs.python.org/issue1285086>. As a side effect though, urllib.quote needs an actual string object, not just something to iterate over. The bug is our confusion of make_branch_and_tree with build_tree, but were it not for Barry Warsaw being tough would have started failing on 2.6.6 as well.

Tags: test python27

Related branches

Martin Packman (gz)
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Martin Packman (gz)
Changed in bzr:
assignee: nobody → Martin [gz] (gz)
milestone: none → 2.3b2
status: Confirmed → Fix Released
Martin Packman (gz)
tags: added: python27
removed: python2.7
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.