New issue
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
Development mode server kills itself on syntax errors #681
Comments
A pull request would be awesome. |
Matt Good just made a solution for this for Flask: https://github.com/mgood/flask-failsafe |
Daniel Holth also created something a number of moons ago that we might dredge up. I don't have a link to it at the moment. |
Anybody have a better idea than the one described by the commit above? |
Well, I'm testing this right now.
|
K, welp, I have no better ideas. |
(the above things you described are all expected). |
#698 - I'm sorry I don't know how to attach commit to this issue :) |
The existing behavior, stopping the server on syntax errors, seems best to me. Sometimes after the error that stops the server, your next editing activity in your code returns it to a state that is runnable (sans syntax problems) but may not yet be ready or safe in some other way. Some of us might not want it actually running again until after a manual restart. Auto-restart after error could be made an option, but how about not default? |
Maybe you are better of if you disable auto reloading at in your situation. Because I would highly doubt that you can even guarantee a high probability that your code gets into situations where you don't want to run it only after you made a change that doesn't let the code compile / load anymore. That being said, maybe the real solution for you may be to create a separate development environment where software failure does not have harsh consequences. |
I've opened #2044 as a possible solution. I've been using similar approach for auto-saving in my editor, so it doesn't save a synaxerror. So I remembered pyramid pserve could also benefit from the same behavior. |
Hi there,
I've noticed an annoying feature of the development mode of pyramid, that is, it's server kills itself if it encounters a syntax error.
While that is certainly safe, what I think it should really do is just try again after the next file change (that usually fixes the syntax error....).
The text was updated successfully, but these errors were encountered: