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

Ensure that jinja loader is not registered at each render #115

Merged

Conversation

fbessou
Copy link
Contributor

@fbessou fbessou commented Oct 19, 2020

The env.loader was replaced by a new ChoiceLoader wrapping the previous
loader on every render. It seems that the _loaded attribute was here
to avoid re-registering the loader but it was set to True on the
handler instance and not on its class making it useless since the a
handler instance is created for each request.

Closes #114.

@welcome
Copy link

welcome bot commented Oct 19, 2020

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@lambdaTotoro
Copy link
Collaborator

I recently closed #112, which introduced some conflicts to your branch. Could you take care of that? Then I'll be glad to take a closer look.

@fbessou fbessou force-pushed the fix-jinja-loader-registration branch from 8216bcf to fcdc230 Compare October 22, 2020 13:07
@fbessou
Copy link
Contributor Author

fbessou commented Oct 22, 2020

@lambdaTotoro I rebased my branch on master. :)

@djangoliv
Copy link
Contributor

Hello @fbessou.

You also need to adapt the new handler "ChangePasswordAdminHandler".

Regards

The env.loader was replaced by a new ChoiceLoader wrapping the previous
loader on every render. It seems that the `_loaded` attribute was here
to avoid re-registering the loader but it was set to `True` on the
handler instance and not on its class making it useless since the a
handler instance is created for each request.

Closes jupyterhub#114.
@fbessou fbessou force-pushed the fix-jinja-loader-registration branch from fcdc230 to aab9507 Compare October 23, 2020 12:54
@fbessou
Copy link
Contributor Author

fbessou commented Oct 26, 2020

@djangoliv I adapted, my PR to take into account your modification, thanks for your review 🙂

@djangoliv
Copy link
Contributor

I have been using your correction in production for a few days. It fix the problem.

thanks a lot.

@lambdaTotoro
Copy link
Collaborator

This looks good from my end, too, I'll merge.

@lambdaTotoro lambdaTotoro merged commit eda79bf into jupyterhub:master Oct 30, 2020
@welcome
Copy link

welcome bot commented Oct 30, 2020

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime Error: maximum recursion depth
3 participants