Skip to content
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

Persistence of *.html.py file in temporary directory #327

Open
ggemmill opened this issue Dec 28, 2020 · 1 comment
Open

Persistence of *.html.py file in temporary directory #327

ggemmill opened this issue Dec 28, 2020 · 1 comment

Comments

@ggemmill
Copy link

Environment Linux, Mageia 7 x86_64
Mako assumes incorrectly that if a .html.py file exists in the specified temporary directory:
tmpl = Template(filename='weather.html', module_directory='/tmp/mako_modules')
that the template does not need to be re-compiled. I have been testing a development version of a python script alongside the production version, with a slight difference in the template. Mako just uses whichever version was last compiled.

@zzzeek
Copy link
Member

zzzeek commented Dec 28, 2020

hi there -

mako uses the last modification time of the template file + the py file to determine if a recompile is needed. the code that does this is here: https://github.com/sqlalchemy/mako/blob/master/mako/template.py#L404

so check the modification time of your .py file is not perhaps in the future relative to your machine's clock, or something like that.

@bourke bourke added this to Icebox in Mako prioritization Nov 17, 2021
@bourke bourke moved this from Icebox to Deep Freeze in Mako prioritization Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants