Django 1.8 supports Python 3.5. It does raise a DeprecationWarning,
which is safe to ignore. We only care about DeprecationWarnings in our
own code.
And it seems that Travis wants all allowed failures listed explicitly,
so we do that. It should now pass again.
As part of my last PR, I had USE_LESS enabled for testing purposes and
accidentally committed the setting. By default, we don't want to run the
(somewhat slow) pre-processor!
- Set Meta.app_label on models created in the tests
- Use logging.NullHandler instead of django.utils.log.NullHandler
- Use oscar.core.loading.get_model() instead of django's get_model
- Remove template tags '{% load url from future %}'
django-compressor used to trigger processing of the less files during
development. But with the browser-based compiler, an easy replacement is
available. This even lowers the barrier to altering styles, because
getting npm up and running isn't required.
Offline compilation isn't impacted.
Using the most current less version seems to not cause any trouble, so I
removed the version requirement.
django-compressor served it's purpose, but given the advent of
more and more frontend JS work, and the accompanying build tools (grunt,
gulp, etc.), it makes less and less sense to use compressor. Jannis
Leidel himself also stepped back from maintaining it.
In my experience with Oscar project, it has also become a bit of a
liability to have compressor as a dependency. Most projects don't use it
any more, but it's not easy to disable/override because all our
templates include it.
So, let's keep things simple and remove it as a dependency. That paves
the way for using other tools, while it's always easy to add back.
Remove all instances of the number 1 being hard-coded in translation strings. In English, the singular is always 1, but this is not universally true. In French, for example, the singular is 0 and 1. As 0 is usually special-cased this wasn't biting us, but some more unusual combinations are incorrect. For example, in Russian 101 is singular. Without this patch the Russian for '101 search results' is displayed as '1 search result', for example.
This patch makes the number being pluralised available and used in every translation string where 1 was previously hard-coded. Individual translators can still provide translations that don't use the variables, if they so wish.
Replace assert statements with appropriate assert* method.
Replace 'assert' with 'assert*' method.
Convert tests.unit.forms.widget_tests to use TestCase class.
Convert bankcard tests to use TestCase.
Convert tests.unit.logging_tests to use TestCase.