We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproducible example:
from pyramid.view import view_config, render_view_to_response class Foo(object): pass @view_config(route_name='trigger') def trigger_view(request): print 'trigger view' return render_view_to_response(Foo(), request) @view_config(context=Foo, renderer='json') def foo_view(context, request): print 'foo view' return dict(success=False) if __name__ == '__main__': from pyramid.config import Configurator from waitress import serve config = Configurator() config.add_route('trigger', '/') config.scan(__name__) app = config.make_wsgi_app() serve(app, host='127.0.0.1', port=7777)
Then:
python foo.py curl http://localhost:7777/
The render_view_to_response(...) ends up finding trigger_view again and calling it, thus resulting in an infinite recursion.
render_view_to_response(...)
trigger_view
The issues I see as I go through this:
request
/
trigger
request_iface = 'trigger_IRequest'
request_iface
(<InterfaceClass pyramid.request.trigger_IRequest>, <InterfaceClass zope.interface.Interface>)
IRequest
Interface
The text was updated successfully, but these errors were encountered:
Can confirm, pyramid.view.render_view_to_response(..) behaves completely different between 1.5.x and 1.6.x
Sorry, something went wrong.
713bc5f
No branches or pull requests
Reproducible example:
Then:
The
render_view_to_response(...)
ends up findingtrigger_view
again and calling it, thus resulting in an infinite recursion.The issues I see as I go through this:
request
for/
matchestrigger
. This results inrequest_iface = 'trigger_IRequest'
.request_iface
is(<InterfaceClass pyramid.request.trigger_IRequest>, <InterfaceClass zope.interface.Interface>)
.IRequest
!!!Interface
at some point and thus this recursion may always be a risk unless we come up with a work around.The text was updated successfully, but these errors were encountered: