Werkzeug

wsgi utility collection


Ticket #307 (new defect)

Opened 3 years ago

Last modified 7 months ago

Reloader failures

Reported by: piranha Owned by: mitsuhiko
Priority: major Milestone: Werkzeug 0.7
Component: debugger Version:
Keywords: Cc:

Description

Currently reloader from time to time fails to reload after changes to code. I can't determine why this happens, but looks like commonly this happens after non-catched exceptions (after appearing of debugger page).

Maybe it is possible to add some functionality for forcing reload?

Change History

Changed 17 months ago by mitsuhiko

  • milestone changed from Werkzeug 0.5 to Werkzeug 0.6

Still having problems to reproduce that.

Changed 11 months ago by schinckel

I get the failure to reload, under django/django-extensions/werkzeug (all trunk versions).

It seems to be that it will reload unless an exception has been raised. I was easily able to reproduce it with a simple AssertationError?, using the following steps.

Start the webserver with a working project, using ./manage.py runserver_plus

Load a page.

Make a change (add in assert True to a page that will be executed, like an admin.py file). The server reloads automatically.

Load the page again.

Change the line so that is says 'assert False'. The server restarts.

Load the page. You should get an exception.

Change the page (remove the offending line).

The server does not restart.

Changed 8 months ago by lericson

Since this is without a doubt the most common workflow for most Web developers, i.e. getting an exception on a line and then changing it to resolve said issue, this works for me - and probably the majority of people.

I took the liberty of trying this bug out, and could not reproduce the reported error.

http://ttyshare.com/rec/lericson/87470937/

Platform: Mac OS X 10.6, Python 2.6, Werkzeug 0.5.1.

Changed 8 months ago by schinckel

Okay, I watched your movie, and did a little more playing with my setup.

If I change my app/models.py, then it detects the change. If I change the app/admin.py file, then it doesn't.

So, it looks like the reloader_loop is missing admin.py when an exception has occurred in that file.

Changed 7 months ago by mitsuhiko

  • milestone changed from Werkzeug 0.6 to Werkzeug 0.7

Hard to track down, all python reloaders currently deal with the same problems. Bumped to 0.7.

Note: See TracTickets for help on using tickets.