diff --git a/src/allmydata/test/test_dirnode.py b/src/allmydata/test/test_dirnode.py index afc446bce..91e788913 100644 --- a/src/allmydata/test/test_dirnode.py +++ b/src/allmydata/test/test_dirnode.py @@ -407,11 +407,13 @@ class Dirnode(GridTestMixin, unittest.TestCase, def _start(res): self._start_timestamp = time.time() d.addCallback(_start) - # json-1.7.1 (as shipped on Ubuntu 'gutsy') rounds all - # floats to hundredeths (it uses str(num) instead of repr(num)). - # json-1.7.3 does not have this bug. To prevent this bug - # from causing the test to fail, stall for more than a few - # hundrededths of a second. + # a long time ago, we used simplejson-1.7.1 (as shipped on Ubuntu + # 'gutsy'), which had a bug/misbehavior in which it would round + # all floats to hundredeths (it used str(num) instead of + # repr(num)). To prevent this bug from causing the test to fail, + # we stall for more than a few hundrededths of a second here. + # simplejson-1.7.3 does not have this bug, and anyways we've + # moved on to stdlib "json" which doesn't have it either. d.addCallback(self.stall, 0.1) d.addCallback(lambda res: n.add_file(u"timestamps", upload.Data("stamp me", convergence="some convergence string"))) diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index d4dc3b57b..5db164f0f 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -556,7 +556,7 @@ class DirectoryNodeHandler(RenderMixin, rend.Page, ReplaceMeMixin): raise cs = {} for name, (file_or_dir, mddict) in children.iteritems(): - name = unicode(name) # json-2.0.1 returns str *or* unicode + name = unicode(name) # json returns str *or* unicode writecap = mddict.get('rw_uri') if writecap is not None: writecap = str(writecap)