Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1827 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Core test failed -- simplejson >= 1.8

Reported by: StevenMohr Owned by: anonymous
Priority: high Milestone: 1.5
Component: TurboGears Version: 1.0.4.4
Severity: normal Keywords:
Cc:

Description

====================================================================== FAIL: test_href (turbogears.tests.test_paginate.TestBasicPagination?)


Traceback (most recent call last):

File "/home/steven/TurboGears/BuildBot/testlinux/TG1full/build/turbogears/tests/test_paginate.py", line 500, in test_href

Spy.assert_ok(self.body, 'href_next', r"'\/basic\/?data_tgp_no=2&data_tgp_limit=4'", raw=True)

File "/home/steven/TurboGears/BuildBot/testlinux/TG1full/build/turbogears/tests/test_paginate.py", line 177, in assert_ok

assert expr in body, "expected %s" % expr

AssertionError?: expected href_next='\/basic\/?data_tgp_no=2&data_tgp_limit=4'


{"spy": "ok: [paginate current_page=1 , first_item=1 , row_count=10 , ordering=[] , reversed=[] , page_count=3 , href_prev=None , last_item=4 , order=None , input_values={'data_tgp_no': 'last', 'data_tgp_limit': 4} , var_name='data' , limit=4 , href_first=None , href_next='/basic/?data_tgp_no=2&data_tgp_limit=4' , href_last='/basic/?data_tgp_no=last&data_tgp_limit=4' , pages=xrange(1, 4) ]", "tg_flash": null, "data": [0, 1, 2, 3]}

Change History

comment:1 Changed 11 years ago by roger.demetrescu

Steven,

Could you provide us more details about your environment ? Which python version are you using ? What is the version of you simplejson ?

I suspect you are running in the same issue described here: #1694

comment:2 Changed 11 years ago by StevenMohr

I use Python 2.5 on an Ubuntu x86_64. My simplejson version 1.9.1. I used this steps to install TurboGears:

  1. Create a virtual enviroment (with --no-site-packages option)
  2. Checkout TG from SVN
  3. Run externals.py
  4. Run setup.py
  5. run nosetests

comment:3 Changed 11 years ago by kskuhlman

  • Summary changed from Core test failed to Core test failed -- simplejson >= 1.8

It looks like simplejson 1.8 introduced a backwards incompatible change. From the release notes:

There is one incompatible change:

"/" is no longer escaped, so if you’re embedding JSON directly in HTML you’ll want to use .replace("/", "/") to prevent a close-tag attack. Sorry, but the in-HTML use case just isn’t worth the bloat in everyone else’s documents.

The release notes should be  here, but it looks like Bob Ippolito's site has been hacked. An archived copy is  here.

So we need to decide if we want a little bit of document bloat or a little less security.

comment:4 Changed 11 years ago by kskuhlman

  • Status changed from new to closed
  • Resolution set to fixed

chrisz fixed this in r4731

Note: See TracTickets for help on using tickets.