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

Opened 10 years ago

Last modified 9 years ago

exception raised in _remove_argspec_params_from_params with 3 optional parameters in controller

Reported by: robert Owned by:
Priority: normal Milestone: 2.1b1
Component: TurboGears Version: 2.1a1
Severity: critical Keywords:
Cc: percious


in tg 2.1a2 controller methods with 3 optional parameters will cause an exception in Dispatcher._remove_argspec_params_from_params to be raised.

to reproduce: in a quickstarted project edit the signature of about in controllers/root.py:

def about(self, arg1=None, arg2=None, arg3=None, **kwargs):

then run the project and call the controller:

11:34:36$ curl -I http://localhost:8080/about/a
HTTP/1.0 500 Internal Server Error
Server: PasteWSGIServer/0.5 Python/2.5.1
Date: Thu, 05 Nov 2009 10:34:40 GMT
content-type: text/html
X-Debug-URL: http://localhost:8080/_debug/view/1257417280
Connection: close

my guess is, that the required and optional parameters are computed incorrectly from argspec, because the attached patch fixes the problem.


patch.diff Download (694 bytes) - added by robert 10 years ago.

Change History

Changed 10 years ago by robert


comment:1 Changed 10 years ago by mramm

  • Cc percious added
  • Severity changed from normal to critical
  • Milestone changed from __unclassified__ to 2.* bugfix

comment:2 Changed 9 years ago by percious

  • Milestone changed from 2.0.* bugfix to 2.1b1

comment:3 Changed 9 years ago by percious

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

Fixed when I fixed #2425

Note: See TracTickets for help on using tickets.