Hi André,
i guess this is with venusian >= 1.0a6. I ran into a similar problem
with cornice, and managed to find a workaround:
https://github.com/xrotwang/cornice/commit/dbbf07fb50a100c9357eef47668528cb83096c9b
Note the depth argument passed explicitely to venusian.attach which
controls down to which depth venusian will go down the import stack
(although i didn't fully understand this feature and the need for it
myself).
This may be not possible in your case, though, if you are not calling
venusian.attach in your own code but rely on view_config.
regards
robert
On Mon, Jul 16, 2012 at 3:30 PM, andre.l.caron <
andre....@gmail.com> wrote:
> Hi All!
>
> 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[1] (~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 ;-)
>
> Thanks,
> André Caron
>
> [1]:
http://sscce.org/
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/pylons-discuss/-/V39AjAbHCmgJ.
> To post to this group, send email to
pylons-...@googlegroups.com.
> To unsubscribe from this group, send email to
>
pylons-discus...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/pylons-discuss?hl=en.