Repository navigation
Conversation
Django 2.2 requires SQLite 3.8.3 which is not available in Trusty.
Member
|
Thanks, I've cherry-picked the fix commit as 6622791. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm hitting this error
when trying to load Django's
l10nlibrary in a template while using pytest and django_coverage_plugin. Tests pass when the plugin is not used. This started happening after addingfrom django.templatetags.l10n import localizeto a test module.This happens in Python 3.6 with Django 1.11.
From my investigation of the issue, it's triggered in the following way:
l10ntemplate tag'template'is a prefix of'templatetags'and this causes check_debug() to be run at a time whendjango.template.engineshasn't imported the engines yet.l10n, this import works but the module does not yet have aregisterattributel10nnot to be a template tags module and does not register it and considers the template engine to be fully loaded.I believe the root issue here is that
check_debug()is trying to import template engines too early and that theif not apps.ready:check is not enough. Unfortunately I couldn't find any other way to detect that the engines have been loaded other than by looking at the internal variable_engines.Can confirm that this fixes #63 using the test case attached there.
Wasn't able to add a test to this PR as the bug depends on pytest's collector.