Loading django/conf/__init__.py +3 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ import warnings from django.conf import global_settings from django.core.exceptions import ImproperlyConfigured from django.utils.deprecation import RemovedInDjango20Warning from django.utils.deprecation import RemovedInDjango110Warning from django.utils.functional import LazyObject, empty ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE" Loading Loading @@ -114,11 +114,11 @@ class Settings(BaseSettings): if ('django.contrib.auth.middleware.AuthenticationMiddleware' in self.MIDDLEWARE_CLASSES and 'django.contrib.auth.middleware.SessionAuthenticationMiddleware' not in self.MIDDLEWARE_CLASSES): warnings.warn( "Session verification will become mandatory in Django 2.0. " "Session verification will become mandatory in Django 1.10. " "Please add 'django.contrib.auth.middleware.SessionAuthenticationMiddleware' " "to your MIDDLEWARE_CLASSES setting when you are ready to opt-in after " "reading the upgrade considerations in the 1.8 release notes.", RemovedInDjango20Warning RemovedInDjango110Warning ) if hasattr(time, 'tzset') and self.TIME_ZONE: Loading django/conf/urls/__init__.py +10 −9 Original line number Diff line number Diff line Loading @@ -5,8 +5,9 @@ from django.core.urlresolvers import (RegexURLPattern, RegexURLResolver, LocaleRegexURLResolver) from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango21Warning from django.utils.deprecation import ( RemovedInDjango20Warning, RemovedInDjango110Warning, ) __all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include', 'patterns', 'url'] Loading @@ -23,7 +24,7 @@ def include(arg, namespace=None, app_name=None): warnings.warn( 'The app_name argument to django.conf.urls.include() is deprecated. ' 'Set the app_name in the included URLconf instead.', RemovedInDjango21Warning, stacklevel=2 RemovedInDjango20Warning, stacklevel=2 ) if isinstance(arg, tuple): Loading @@ -39,7 +40,7 @@ def include(arg, namespace=None, app_name=None): 'Passing a 3-tuple to django.conf.urls.include() is deprecated. ' 'Pass a 2-tuple containing the list of patterns and app_name, ' 'and provide the namespace argument to include() instead.', RemovedInDjango21Warning, stacklevel=2 RemovedInDjango20Warning, stacklevel=2 ) urlconf_module, app_name, namespace = arg else: Loading @@ -56,7 +57,7 @@ def include(arg, namespace=None, app_name=None): 'providing an app_name is deprecated. Set the app_name attribute ' 'in the included module, or pass a 2-tuple containing the list of ' 'patterns and app_name instead.', RemovedInDjango21Warning, stacklevel=2 RemovedInDjango20Warning, stacklevel=2 ) namespace = namespace or app_name Loading @@ -77,9 +78,9 @@ def include(arg, namespace=None, app_name=None): def patterns(prefix, *args): warnings.warn( 'django.conf.urls.patterns() is deprecated and will be removed in ' 'Django 2.0. Update your urlpatterns to be a list of ' 'Django 1.10. Update your urlpatterns to be a list of ' 'django.conf.urls.url() instances instead.', RemovedInDjango20Warning, stacklevel=2 RemovedInDjango110Warning, stacklevel=2 ) pattern_list = [] for t in args: Loading @@ -100,9 +101,9 @@ def url(regex, view, kwargs=None, name=None, prefix=''): if isinstance(view, six.string_types): warnings.warn( 'Support for string view arguments to url() is deprecated and ' 'will be removed in Django 2.0 (got %s). Pass the callable ' 'will be removed in Django 1.10 (got %s). Pass the callable ' 'instead.' % view, RemovedInDjango20Warning, stacklevel=2 RemovedInDjango110Warning, stacklevel=2 ) if not view: raise ImproperlyConfigured('Empty URL pattern view name not permitted (for pattern %r)' % regex) Loading django/conf/urls/i18n.py +3 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ from django.conf import settings from django.conf.urls import patterns, url from django.core.urlresolvers import LocaleRegexURLResolver from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.deprecation import RemovedInDjango110Warning from django.views.i18n import set_language Loading @@ -18,9 +18,9 @@ def i18n_patterns(prefix, *args): warnings.warn( "Calling i18n_patterns() with the `prefix` argument and with tuples " "instead of django.conf.urls.url() instances is deprecated and " "will no longer work in Django 2.0. Use a list of " "will no longer work in Django 1.10. Use a list of " "django.conf.urls.url() instances instead.", RemovedInDjango20Warning, stacklevel=2 RemovedInDjango110Warning, stacklevel=2 ) pattern_list = patterns(prefix, *args) else: Loading django/contrib/admin/helpers.py +3 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ from django.db.models.fields.related import ManyToManyRel from django.forms.utils import flatatt from django.template.defaultfilters import capfirst, linebreaksbr from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_text, smart_text from django.utils.functional import cached_property from django.utils.html import conditional_escape, format_html Loading Loading @@ -285,9 +285,9 @@ class InlineAdminForm(AdminForm): def original_content_type_id(self): warnings.warn( 'InlineAdminForm.original_content_type_id is deprecated and will be ' 'removed in Django 2.0. If you were using this attribute to construct ' 'removed in Django 1.10. If you were using this attribute to construct ' 'the "view on site" URL, use the `absolute_url` attribute instead.', RemovedInDjango20Warning, stacklevel=2 RemovedInDjango110Warning, stacklevel=2 ) if self.original is not None: # Since this module gets imported in the application's root package, Loading django/contrib/auth/tests/utils.py +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ import warnings from unittest import skipIf from django.conf import settings from django.utils.deprecation import RemovedInDjango21Warning from django.utils.deprecation import RemovedInDjango20Warning def skipIfCustomUser(test_func): Loading @@ -11,6 +11,6 @@ def skipIfCustomUser(test_func): """ warnings.warn( "django.contrib.auth.tests.utils.skipIfCustomUser is deprecated.", RemovedInDjango21Warning, stacklevel=2) RemovedInDjango20Warning, stacklevel=2) return skipIf(settings.AUTH_USER_MODEL != 'auth.User', 'Custom user model in use')(test_func) Loading
django/conf/__init__.py +3 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ import warnings from django.conf import global_settings from django.core.exceptions import ImproperlyConfigured from django.utils.deprecation import RemovedInDjango20Warning from django.utils.deprecation import RemovedInDjango110Warning from django.utils.functional import LazyObject, empty ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE" Loading Loading @@ -114,11 +114,11 @@ class Settings(BaseSettings): if ('django.contrib.auth.middleware.AuthenticationMiddleware' in self.MIDDLEWARE_CLASSES and 'django.contrib.auth.middleware.SessionAuthenticationMiddleware' not in self.MIDDLEWARE_CLASSES): warnings.warn( "Session verification will become mandatory in Django 2.0. " "Session verification will become mandatory in Django 1.10. " "Please add 'django.contrib.auth.middleware.SessionAuthenticationMiddleware' " "to your MIDDLEWARE_CLASSES setting when you are ready to opt-in after " "reading the upgrade considerations in the 1.8 release notes.", RemovedInDjango20Warning RemovedInDjango110Warning ) if hasattr(time, 'tzset') and self.TIME_ZONE: Loading
django/conf/urls/__init__.py +10 −9 Original line number Diff line number Diff line Loading @@ -5,8 +5,9 @@ from django.core.urlresolvers import (RegexURLPattern, RegexURLResolver, LocaleRegexURLResolver) from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango21Warning from django.utils.deprecation import ( RemovedInDjango20Warning, RemovedInDjango110Warning, ) __all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include', 'patterns', 'url'] Loading @@ -23,7 +24,7 @@ def include(arg, namespace=None, app_name=None): warnings.warn( 'The app_name argument to django.conf.urls.include() is deprecated. ' 'Set the app_name in the included URLconf instead.', RemovedInDjango21Warning, stacklevel=2 RemovedInDjango20Warning, stacklevel=2 ) if isinstance(arg, tuple): Loading @@ -39,7 +40,7 @@ def include(arg, namespace=None, app_name=None): 'Passing a 3-tuple to django.conf.urls.include() is deprecated. ' 'Pass a 2-tuple containing the list of patterns and app_name, ' 'and provide the namespace argument to include() instead.', RemovedInDjango21Warning, stacklevel=2 RemovedInDjango20Warning, stacklevel=2 ) urlconf_module, app_name, namespace = arg else: Loading @@ -56,7 +57,7 @@ def include(arg, namespace=None, app_name=None): 'providing an app_name is deprecated. Set the app_name attribute ' 'in the included module, or pass a 2-tuple containing the list of ' 'patterns and app_name instead.', RemovedInDjango21Warning, stacklevel=2 RemovedInDjango20Warning, stacklevel=2 ) namespace = namespace or app_name Loading @@ -77,9 +78,9 @@ def include(arg, namespace=None, app_name=None): def patterns(prefix, *args): warnings.warn( 'django.conf.urls.patterns() is deprecated and will be removed in ' 'Django 2.0. Update your urlpatterns to be a list of ' 'Django 1.10. Update your urlpatterns to be a list of ' 'django.conf.urls.url() instances instead.', RemovedInDjango20Warning, stacklevel=2 RemovedInDjango110Warning, stacklevel=2 ) pattern_list = [] for t in args: Loading @@ -100,9 +101,9 @@ def url(regex, view, kwargs=None, name=None, prefix=''): if isinstance(view, six.string_types): warnings.warn( 'Support for string view arguments to url() is deprecated and ' 'will be removed in Django 2.0 (got %s). Pass the callable ' 'will be removed in Django 1.10 (got %s). Pass the callable ' 'instead.' % view, RemovedInDjango20Warning, stacklevel=2 RemovedInDjango110Warning, stacklevel=2 ) if not view: raise ImproperlyConfigured('Empty URL pattern view name not permitted (for pattern %r)' % regex) Loading
django/conf/urls/i18n.py +3 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ from django.conf import settings from django.conf.urls import patterns, url from django.core.urlresolvers import LocaleRegexURLResolver from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.deprecation import RemovedInDjango110Warning from django.views.i18n import set_language Loading @@ -18,9 +18,9 @@ def i18n_patterns(prefix, *args): warnings.warn( "Calling i18n_patterns() with the `prefix` argument and with tuples " "instead of django.conf.urls.url() instances is deprecated and " "will no longer work in Django 2.0. Use a list of " "will no longer work in Django 1.10. Use a list of " "django.conf.urls.url() instances instead.", RemovedInDjango20Warning, stacklevel=2 RemovedInDjango110Warning, stacklevel=2 ) pattern_list = patterns(prefix, *args) else: Loading
django/contrib/admin/helpers.py +3 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ from django.db.models.fields.related import ManyToManyRel from django.forms.utils import flatatt from django.template.defaultfilters import capfirst, linebreaksbr from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_text, smart_text from django.utils.functional import cached_property from django.utils.html import conditional_escape, format_html Loading Loading @@ -285,9 +285,9 @@ class InlineAdminForm(AdminForm): def original_content_type_id(self): warnings.warn( 'InlineAdminForm.original_content_type_id is deprecated and will be ' 'removed in Django 2.0. If you were using this attribute to construct ' 'removed in Django 1.10. If you were using this attribute to construct ' 'the "view on site" URL, use the `absolute_url` attribute instead.', RemovedInDjango20Warning, stacklevel=2 RemovedInDjango110Warning, stacklevel=2 ) if self.original is not None: # Since this module gets imported in the application's root package, Loading
django/contrib/auth/tests/utils.py +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ import warnings from unittest import skipIf from django.conf import settings from django.utils.deprecation import RemovedInDjango21Warning from django.utils.deprecation import RemovedInDjango20Warning def skipIfCustomUser(test_func): Loading @@ -11,6 +11,6 @@ def skipIfCustomUser(test_func): """ warnings.warn( "django.contrib.auth.tests.utils.skipIfCustomUser is deprecated.", RemovedInDjango21Warning, stacklevel=2) RemovedInDjango20Warning, stacklevel=2) return skipIf(settings.AUTH_USER_MODEL != 'auth.User', 'Custom user model in use')(test_func)