How to return HTTPMovedPermanently (301 status) instead HTTPFound (302) in pyramid notfound_view_config
My solution with deprecated class:
class append_slash_notfound_factory(AppendSlashNotFoundViewFactory):
    def __call__(self, context, request):
        result = super(append_slash_notfound_factory, self).__call__(context, request)
        if isinstance(result, HTTPFound):
            return HTTPMovedPermanently(result.location)
        return result
Using notfound_view_config in pyramid with parameter append_slash=True, i get 302 http status when redirecting, but i want set custom http status - 301.
@notfound_view_config(append_slash=True, renderer="not_found.mako")
def notfound(request):
   return {}