Hot reloading not working on FreeBSD
matthewfaircliff opened this issue · comments
- **aiohttp-devtools version: 0.8
- **aiohttp version: 3.0.7
- **python version: 3.6.4
- **Platform: FreeBSD 11.1
Issue Summary
After having followed the instructions several times using both virtualenv and pipenv I cannot get hot reloading to work. I had it working in a previous version about 6 months ago so am experienced in working with aiohttp as well as aiohttp-devtools. The server log states that it reloads the main.py file however any changes are only visible after stopping the server completely and then starting it again.
Steps to reproduce
virtualenv -p python3 venv36
cd venv36
source bin/activate
pip install aiohttp-devtools
adev start test1
cd test1
source ./activate-settings.sh
adev runserver test1 --host 192.168.0.1
It seems as though this is actually a aiohttp-jinja2 problem as the aiohttp code is reloading, however the templates are not. Am thinking it is the jinja2 enviroment setup using
aiohttp_jinja2.setup(app,
loader=jinja2.FileSystemLoader(str(THIS_DIR / 'templates')),
auto_reload=True,
cache_size=0,
)
Although I am still struggling to get this to work.
Closing this as it is not a devtools issue. Any comments would however be appreciated.
I've never had a problem with jinja templates reloading, in my experience they generally "just work ™️", however BSD based systems are very rarely used so it's possible there's a problem there.
I was having a problem with aiohttp-devtools (not using jinja templates) reloading yesterday on ubuntu which I'll look into more when I get the time.
Hi Samuel,
Thanks for your feedback.
I have done a clean reinstall of the entire OS with latest FreeBSD. Used pipenv to install aiohttp-devtools and aiohttp (all latest). I can confirm that there is indeed still a problem: the main.py (which includes create_app()) reloads content on changes however the views.py files does not (even though the adev does restart). The views.py contains some jinja2 templates but even if I remove these and return plain web.response the response is not updated on reload.
Quite strange as I have aiohttp-devtools running 100% ok on a system I installed at the beginning of last year. I copied the requirements.txt from this machine and installed into new pipenv venv and everything works as expected. There is something wrong somewhere.
I found this too. It's fixed by #181. I will release that today.
Thanks. Thought I was going crazy for a while there. Glad I could help.
should be fixed by v0.9 release which should be running now. Sorry about the delay in releasing.
Please let me know if you still have a problem.