The tmpl_context
and app_globals
objects are no longer referenced as c
and g
in pylons (and haven't been for some time), but a lot of our code still tries to import them as such. We have some code that imports them correctly and then monkey patches c
and g
as aliases in pylons, but it doesn't always work when running tests.
The imports should be cleaned up and changed to:
from pylons import tmpl_context as c from pylons import app_globals as g
The bad imports can be found with:
ack 'from pylons import ([cg]|c, *g|g, *c)$'
{allura,forge-classic,sftheme,forgehg,forgepastebin}:db/5837
I've run the full test suite and done basic tests of running stuff via web, paster and taskd. Code review might be onerous even with
-U0
but spot-check it at least. Look for places I might've missed and spot-check functionality too.ForgeHg changes are after the [#5685] changes, so we need to get those merged in Allura before this is merged.
Related
Tickets:
#5685