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
Fixed #30323 -- Fixed spurious autoreload failures. #11177
Conversation
Hey @orf. Thanks for your efforts here. Is it worth you combining fixes into a single PR here (separate commits if you want) whilst you're working on it? (I don't mind: what do you think?) |
Sure thing, if that's easier to review. I'll bundle them all into this PR 👍 |
Works for me. Let me know if I can help at all testing and such. 👍 |
I've made a few fixes here. When I originally wrote the StatReloader I wanted it to be able to pick up newly created files (that have been watched but do not exist yet, like translation files) as well as files that have been modified. I did this by tracking the So I've just simplified the stat reloader to be pretty much identical to the one in Werkzeug. I will see if I can find anyone to test this (I've pushed it to a fix-stat-reloader branch on my fork, which is right off 2.2). |
Hey @orf: anything your end still to do here? (Thanks!) |
Not on this PR, I think this is complete and ready to go. However there is #11263 which I would say should be included as well if possible, even though it’s not marked as a release blocker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orf Thanks for this patch 👍 I left two comments.
Ticket: https://code.djangoproject.com/ticket/30323
A few fixes and changes here:
Loading the urlconf module can result in SyntaxErrors. We now swallow them to prevent the reloader from quitting.
Simplified the ensure_echo_on method
Simplified the stat autoreloader. The implementation is now pretty much exactly the same as the one in Flask/Werkzeug
The thread running Django itself is now named
django-main-thread
to help with tracebacks.