[TurboGears] #2437: tg.url() docstring does not match behavior, pagination problem

11 views
Skip to first unread message

TurboGears

unread,
Jan 7, 2010, 2:33:28 PM1/7/10
to turbogear...@googlegroups.com
#2437: tg.url() docstring does not match behavior, pagination problem
------------------------+---------------------------------------------------
Reporter: chrisz | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.1
Component: TurboGears | Version: 2.1a3
Severity: normal | Keywords: tg.url pagination
------------------------+---------------------------------------------------
Just noticed that the docstring of the `tg.url()` function does not match
with the actual behavior any more in TG 2.1.

The docstring says "For backwards compatibility you can also pass in a
params dictionary which is turned into url params, ..."

However, it's the other way round now, **kwargs are supported for
backward compatibility only (with a deprecation warning), and only
passing a dict in params seems to be supported in the future. (Is this
really what we want?)

Second, the docstring says "In general `tg.url is just a proxy for
`pylons.url` which is in turn a proxy for routes `url_for` function."

However, `tg.url` does not seem to resort to `pylons.url` any more.

I'd like to fix that docstring, but I'm not sure whether these changes
are intentional or not.

Remark made by Jonathan on tg-trunk:
This also seems to have broken the pagination system (when you show the
pagination links, it throws an error 500).

See also #2272 and #2371 for other issues with `tg.url()`.

--
Ticket URL: <http://trac.turbogears.org/ticket/2437>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

TurboGears

unread,
Feb 2, 2010, 7:04:47 AM2/2/10
to turbogear...@googlegroups.com
#2437: tg.url() docstring does not match behavior, pagination problem
-------------------------------+--------------------------------------------

Reporter: chrisz | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.1
Component: TurboGears | Version: 2.1a3
Severity: normal | Resolution:
Keywords: tg.url pagination |
-------------------------------+--------------------------------------------
Comment (by chrisz):

For the pagination problem, see also #2455.

--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:2>

TurboGears

unread,
Feb 1, 2010, 8:38:10 AM2/1/10
to turbogear...@googlegroups.com
#2437: tg.url() docstring does not match behavior, pagination problem
-------------------------------+--------------------------------------------

Reporter: chrisz | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.1
Component: TurboGears | Version: 2.1a3
Severity: normal | Resolution:
Keywords: tg.url pagination |
-------------------------------+--------------------------------------------
Comment (by chrisz):

I'm also getting these deprecation warnings in quickstarted apps:
{{{
DeprecationWarning: Passing in keyword arguments as url components is
deprecated.
}}}

--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:1>

TurboGears

unread,
Feb 22, 2010, 7:43:58 PM2/22/10
to turbogear...@googlegroups.com
#2437: tg.url() docstring does not match behavior, pagination problem
-------------------------------+--------------------------------------------

Reporter: chrisz | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.1b2
Component: TurboGears | Version: 2.1a3

Severity: normal | Resolution:
Keywords: tg.url pagination |
-------------------------------+--------------------------------------------
Changes (by mramm):

* milestone: 2.1 => 2.1b2

--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:3>

TurboGears

unread,
Feb 23, 2010, 7:57:39 PM2/23/10
to turbogear...@googlegroups.com
#2437: tg.url() docstring does not match behavior, pagination problem
-------------------------------+--------------------------------------------
Reporter: chrisz | Owner:
Type: defect | Status: closed
Priority: high | Milestone: 2.1b2
Component: TurboGears | Version: 2.1a3
Severity: normal | Resolution: fixed
Keywords: tg.url pagination |
-------------------------------+--------------------------------------------
Comment (by chrisz):

Thanks. For the records and better traceability of fixes you should also
link to the changeset of your fixes (in this case,
[http://bitbucket.org/turbogears/tg-dev/changeset/c345086f9280/
c345086f9280] and [http://bitbucket.org/turbogears/tgdevtools-
dev/changeset/78d3869f7deb/ 78d3869f7deb]).

Also, I'm missing a motivation ''why'' passing keyword parameters was
discarded, since I think it was a handy and intuitive feature. I'm sure
there is a reason, but I currently don't see it.

--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:5>

TurboGears

unread,
Feb 23, 2010, 7:18:29 PM2/23/10
to turbogear...@googlegroups.com
#2437: tg.url() docstring does not match behavior, pagination problem
-------------------------------+--------------------------------------------
Reporter: chrisz | Owner:
Type: defect | Status: closed
Priority: high | Milestone: 2.1b2
Component: TurboGears | Version: 2.1a3
Severity: normal | Resolution: fixed
Keywords: tg.url pagination |
-------------------------------+--------------------------------------------
Changes (by percious):

* status: new => closed
* resolution: => fixed

--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:4>

Reply all
Reply to author
Forward
0 new messages