I dug into this a bit, and I think I see what's happening. I'm not sure if this a bug in Pyramid or in my configuration.
First of all, in my `main` function, I have a line like this:
config.override_asset('my_framework', 'my_app')
In other words, I've specified that *all* assets in the framework package should be overridden by assets in the app package.
My mako.directories setting initially looks like this: ['my_app:templates', 'my_framework:templates']. The first time a template is rendered, these asset specs are converted to absolute filesystem paths.
The problem is that 'my_framework:templates' is converted to '/path/to/my_app/templates' due to the override above, and the directory list used for template lookup ends up containing duplicate paths pointing to my_app's templates directory.
Of course, the net effect of all this is that if a template isn't found in the app package, the Mako template lookup machinery never checks to see if the framework might contain the template.