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 #1873 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

TurboJson 1.1.3

Reported by: lmacken Owned by: chrisz
Priority: normal Milestone: 1.0.x bugfix
Component: TurboGears Version: 1.0.4.4
Severity: normal Keywords: TurboJson
Cc:

Description

After upgrading to the latest TurboJson? release, my unit tests are all triggering this traceback:

Page handler: <bound method Root.login of <bodhi.controllers.Root object at 0x2364a10>>
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 121, in _run
    self.main()
  File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 264, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in login
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 365, in expose
    *args, **kw)
  File "<string>", line 5, in run_with_transaction
  File "/usr/lib/python2.5/site-packages/turbogears/database.py", line 356, in so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 260, in <lambda>
    _func, "json", None, None, None, False, args, kw))
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 421, in _execute_func
    return _process_output(output, template, format, content_type, mapping, fragment)
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 87, in _process_output
    fragment=fragment) 
  File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line 118, in render
    content_type = engine.get_content_type(ua)
TypeError: get_content_type() takes exactly 1 argument (2 given)

Using:

TurboGears-1.0.4.4
TurboJson-1.1.3

Change History

comment:1 Changed 11 years ago by lmacken

  • Keywords TurboJson added

comment:2 Changed 11 years ago by lmacken

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

I am unable to reproduce this with TurboGears 1.0.5

comment:3 Changed 11 years ago by Chris Arndt

  • Status changed from closed to reopened
  • Resolution worksforme deleted

Actually, TurboJson 1.1.3 introduced a slight backward incompatibility. On line 43 in jsonsupport.py the get_content_type method needs to accept positional parameters not keywords args, because in TG <= 1.0.4.4 it gets called with a a single argument.

comment:4 Changed 11 years ago by Chris Arndt

  • Owner changed from anonymous to chrisz
  • Status changed from reopened to new

comment:5 Changed 11 years ago by Chris Arndt

  • Milestone changed from 1.5 to 1.0.x bugfix

comment:6 Changed 11 years ago by Chris Arndt

Fixed in r5203. Is this worth a TJ 1.1.4 release?

comment:7 Changed 11 years ago by lmacken

It's up to your really -- I would have no problem patching Fedora's package in the mean time. I need to go on a packaging rampage this weekend and get the TG2 stack into shape as well.

comment:8 Changed 11 years ago by chrisz

@ChrisA: Since there have been other important improvements in TJ, we should release a 1.1.4 anyway.

comment:9 Changed 11 years ago by Chris Arndt

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

A new TurboJson release 1.1.4 has been issued now.

Note: See TracTickets for help on using tickets.