Ensure app module is picked up by Reloader. by jzellman · Pull Request #438 · webpy/webpy
When app is part of a package (e.g. project/app.py), the first
time a change is made to app.py, it was previously not picked up
by Reloader since the app.py module was not found in sys.modules
Steps to recreate
- Unzip the attached sample app (initial-reload-bug.zip)
- Setup virtualenv (make init)
- Run the application (make web)
- Either in a web browser or a terminal go to http://localhost:8090 - You should see "Hello world!"
- Edit file project/app.py and change "Hello world!" to "Goodbye world!". Save the file
- Repeat step 4. You will still see "Hello world!". This is not correct. "Goodbye world!" should have been displayed.
- Save project/app.py again
- Repeat step 4. You will now see "Goodbye world!"
After applying the change set, Repeat steps from above (adjust step 2 to ensure correct path to patched web.py or edit requirements.txt). Step 6 will now say "Goodbye world!"