I've encountered what I believe to be a bug in Pyramid and I hope you can
help me find a solution or workaround :-)
I have some rather redundant code in Pyramid views and I'm trying to
refactor it into a decorator. The idea is that this decorator will return
a Pyramid view function decorated with @view_config and the redundant code
will be put into this "generated" function so that it automagically applies
in all view functions. This works fine, but as soon as I move my decorator
to a seperate module and import it (it needs to be used from multiple
modules that define views) then I get HTTP 404 errors.
I've taken a look at the Pyramid and Venusian source code, but I'm not
familiar with some of the more advanced stuff going on in Venusian to
properly determine exactly why this doesn't work.
I've attached an SSCCE (~100 lines of code,with comments) that
demonstrates this problem. Can you please take a look at it and confirm
that this is a bug (or not)?
Note: I've tried to keep this as close to possible to how it's used in the
real application. Keep in mind that this is legacy code and I'm not behind
all the decisions (e.g. the do-it-yourself-RPC framework ;-)