Hello community, here is the log from the commit of package python-django-braces for openSUSE:Factory checked in at 2020-01-07 23:54:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-django-braces (Old) and /work/SRC/openSUSE:Factory/.python-django-braces.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-braces" Tue Jan 7 23:54:32 2020 rev:2 rq:761496 version:1.14.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-django-braces/python-django-braces.changes 2019-04-03 09:26:30.835772815 +0200 +++ /work/SRC/openSUSE:Factory/.python-django-braces.new.6675/python-django-braces.changes 2020-01-07 23:54:51.672078270 +0100 @@ -1,0 +2,10 @@ +Tue Jan 7 09:38:39 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Update to 1.14.0: + * Tox now only tests recent Pythons and Djangos + * Include necessary files to build docs in source tarball. Closes #250 + * Fixes deprecated imports, adds `six` as requirement + * force text to prevent Python 2 unicode fun +- Remove merged patch dj21.patch + +------------------------------------------------------------------- Old: ---- dj21.patch django-braces-1.13.0.tar.gz form.html New: ---- django-braces-1.14.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-django-braces.spec ++++++ --- /var/tmp/diff_new_pack.kVDnhY/_old 2020-01-07 23:54:52.128078506 +0100 +++ /var/tmp/diff_new_pack.kVDnhY/_new 2020-01-07 23:54:52.128078506 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-django-braces # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,24 +18,24 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-django-braces -Version: 1.13.0 +Version: 1.14.0 Release: 0 Summary: Reusable, generic mixins for Django License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/brack3t/django-braces/ Source: https://files.pythonhosted.org/packages/source/d/django-braces/django-braces-%{version}.tar.gz -Source1: form.html -Patch0: dj21.patch -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module pytest-django} +BuildRequires: %{python_module Django >= 1.11.0} BuildRequires: %{python_module factory_boy} BuildRequires: %{python_module mock} -BuildRequires: %{python_module Django} +BuildRequires: %{python_module pytest-django} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-Django >= 1.11.0 +Requires: python-six BuildArch: noarch -Requires: python-Django %python_subpackages %description @@ -43,12 +43,9 @@ %prep %setup -q -n django-braces-%{version} -%patch0 -p1 -# https://github.com/brack3t/django-braces/pull/249 -mkdir tests/templates/ -cp %{SOURCE1} tests/templates/ -touch tests/templates/blank.html -echo '<h1>404!!!!</h1>' > tests/templates/404.html +# do not mess with the test setup and rely on pytest defaults +rm tox.ini +rm conftest.py %build %python_build @@ -59,7 +56,7 @@ %check export DJANGO_SETTINGS_MODULE=tests.settings -%python_exec -m pytest +%pytest --nomigrations %files %{python_files} %doc README.md ++++++ django-braces-1.13.0.tar.gz -> django-braces-1.14.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/CONTRIBUTORS.txt new/django-braces-1.14.0/CONTRIBUTORS.txt --- old/django-braces-1.13.0/CONTRIBUTORS.txt 2017-12-03 19:38:42.000000000 +0100 +++ new/django-braces-1.14.0/CONTRIBUTORS.txt 2019-12-30 21:18:50.000000000 +0100 @@ -31,8 +31,10 @@ * Mike Bryant * Fabio C. Barrionuevo da Luz * Sam Spencer +* Mfon Eti-mfon Other Contributors ================== -* The entire Python and Django communities for providing us the tools and desire we to build these things. +* The entire Python and Django communities for providing us the tools + and desire to build these things. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/MANIFEST.in new/django-braces-1.14.0/MANIFEST.in --- old/django-braces-1.13.0/MANIFEST.in 2016-10-24 21:56:33.000000000 +0200 +++ new/django-braces-1.14.0/MANIFEST.in 2019-12-30 21:25:44.000000000 +0100 @@ -1,7 +1,9 @@ -include README.md +include README.md *.toml include LICENSE include CONTRIBUTORS.txt recursive-include braces *.py -recursive-include docs *.rst +recursive-include docs Makefile conf.py *.rst recursive-include tests *.py +recursive-include tests/templates *.html +include conftest.py tox.ini requirements.txt prune docs/_build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/PKG-INFO new/django-braces-1.14.0/PKG-INFO --- old/django-braces-1.13.0/PKG-INFO 2018-04-22 16:52:29.000000000 +0200 +++ new/django-braces-1.14.0/PKG-INFO 2019-12-30 22:17:36.282653000 +0100 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: django-braces -Version: 1.13.0 +Version: 1.14.0 Summary: Reusable, generic mixins for Django Home-page: https://github.com/brack3t/django-braces/ Author: Kenneth Love <kenn...@brack3t.com>, Chris Jones <ch...@brack3t.com> Author-email: d...@brack3t.com License: BSD -Description-Content-Type: UNKNOWN Description: Mixins to add easy functionality to Django class-based views, forms, and models. Keywords: django,views,forms,mixins Platform: UNKNOWN @@ -15,17 +14,10 @@ Classifier: License :: OSI Approved :: BSD License Classifier: Environment :: Web Environment Classifier: Development Status :: 5 - Production/Stable -Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Framework :: Django -Classifier: Framework :: Django :: 1.5 -Classifier: Framework :: Django :: 1.6 -Classifier: Framework :: Django :: 1.7 -Classifier: Framework :: Django :: 1.8 -Classifier: Framework :: Django :: 1.9 -Classifier: Framework :: Django :: 1.10 +Classifier: Framework :: Django :: 1.11 Classifier: Framework :: Django :: 2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/README.md new/django-braces-1.14.0/README.md --- old/django-braces-1.13.0/README.md 2017-12-03 19:38:42.000000000 +0100 +++ new/django-braces-1.14.0/README.md 2019-12-30 21:18:50.000000000 +0100 @@ -1,4 +1,5 @@ # django-braces + Mixins for Django's class-based views. [![Latest Travis CI status](https://travis-ci.org/brack3t/django-braces.svg)](https://travis-ci.org/brack3t/django-braces) @@ -25,17 +26,21 @@ All development dependencies are available in `requirements.txt` file. -To run the test suite, execute the following in your shell (Django install is required): -`py.test tests/ --cov=braces --cov-report=html` +To run the test suite, please install `tox` and as many Python interpreters as you'd +like to test against. Currently we test against 2.7, 3.6, 3.7, and 3.8. We recommend +using `asdf` to install various Python versions. + +Once `tox` and Python(s) are installed, you can execute the entire suite by running +just the `tox` command. -Or test with `tox` if you have `tox` installed. ## Change Log [Changelog on Read The Docs](https://django-braces.readthedocs.io/en/latest/changelog.html) -## Use Django 1.4.x? - -`django-braces` 1.4.x will be the last version to officially support Django 1.4.x. Since Django 1.4.x is an LTS, we'll update `django-braces` 1.4.x as needed for bug fixes but it won't receive new functionality unless backporting is 100% painless. +## Supported Django Versions -Our policy going forward is that `django-braces` officially supports the current version of Django and one version each direction (e.g. 1.6.x is current, so 1.5.x, 1.6.x, and 1.7.x are all supported). There won't be any restraints on using other versions of Django, though, but it will be a "buyer beware" situation. +Our policy is that `django-braces` officially supports, and is tested on, all versions +that Django [officially supports](https://www.djangoproject.com/download/#supported-versions). +You are free to use `django-braces` with any version of Django you wish (so long as it has +class-based views) but no support will be promised. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/braces/__init__.py new/django-braces-1.14.0/braces/__init__.py --- old/django-braces-1.13.0/braces/__init__.py 2018-04-22 16:44:44.000000000 +0200 +++ new/django-braces-1.14.0/braces/__init__.py 2019-12-30 21:18:50.000000000 +0100 @@ -9,7 +9,7 @@ """ __title__ = 'braces' -__version__ = '1.13.0' +__version__ = '1.14.0' __author__ = 'Kenneth Love and Chris Jones' __license__ = 'BSD 3-clause' __copyright__ = 'Copyright 2013 Kenneth Love and Chris Jones' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/braces/views/__init__.py new/django-braces-1.14.0/braces/views/__init__.py --- old/django-braces-1.13.0/braces/views/__init__.py 2017-02-01 19:28:06.000000000 +0100 +++ new/django-braces-1.14.0/braces/views/__init__.py 2019-12-30 21:18:50.000000000 +0100 @@ -26,7 +26,6 @@ MessageMixin, SuccessURLRedirectListMixin, UserFormKwargsMixin, - _MessageAPIWrapper ) from ._other import ( AllVerbsMixin, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/braces/views/_access.py new/django-braces-1.14.0/braces/views/_access.py --- old/django-braces-1.13.0/braces/views/_access.py 2017-12-03 19:38:42.000000000 +0100 +++ new/django-braces-1.14.0/braces/views/_access.py 2019-12-30 21:18:50.000000000 +0100 @@ -2,7 +2,6 @@ import datetime import re -from django import VERSION as DJANGO_VERSION from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.views import redirect_to_login, logout_then_login @@ -10,16 +9,13 @@ from django.http import (HttpResponseRedirect, HttpResponsePermanentRedirect, Http404, HttpResponse, StreamingHttpResponse) from django.shortcuts import resolve_url -from django.utils import six -from django.utils.encoding import force_text +try: + from django.utils.encoding import force_str as force_string +except ImportError: + from django.utils.encoding import force_text as force_string from django.utils.timezone import now - -if DJANGO_VERSION >= (1, 10, 0): - _is_authenticated = lambda user: user.is_authenticated # noqa -else: - # Django<1.10 compatibility - _is_authenticated = lambda user: user.is_authenticated() # noqa +import six class AccessMixin(object): @@ -42,7 +38,7 @@ 'Define {0}.login_url or settings.LOGIN_URL or override ' '{0}.get_login_url().'.format(self.__class__.__name__)) - return force_text(login_url) + return force_string(login_url) def get_redirect_field_name(self): """ @@ -59,7 +55,7 @@ def handle_no_permission(self, request): if self.raise_exception: if (self.redirect_unauthenticated_users - and not _is_authenticated(request.user)): + and not request.user.is_authenticated): return self.no_permissions_fail(request) else: if (inspect.isclass(self.raise_exception) @@ -95,7 +91,7 @@ be the left-most mixin. """ def dispatch(self, request, *args, **kwargs): - if not _is_authenticated(request.user): + if not request.user.is_authenticated: return self.handle_no_permission(request) return super(LoginRequiredMixin, self).dispatch( @@ -122,7 +118,7 @@ authenticated_redirect_url = settings.LOGIN_REDIRECT_URL def dispatch(self, request, *args, **kwargs): - if _is_authenticated(request.user): + if request.user.is_authenticated: return HttpResponseRedirect(self.get_authenticated_redirect_url()) return super(AnonymousRequiredMixin, self).dispatch( request, *args, **kwargs) @@ -341,7 +337,7 @@ def dispatch(self, request, *args, **kwargs): self.request = request in_group = False - if _is_authenticated(request.user): + if request.user.is_authenticated: in_group = self.check_membership(self.get_group_required()) if not in_group: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/braces/views/_ajax.py new/django-braces-1.14.0/braces/views/_ajax.py --- old/django-braces-1.13.0/braces/views/_ajax.py 2017-12-03 19:35:52.000000000 +0100 +++ new/django-braces-1.14.0/braces/views/_ajax.py 2019-12-30 21:18:50.000000000 +0100 @@ -5,7 +5,8 @@ from django.core.exceptions import ImproperlyConfigured from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse, HttpResponseBadRequest -from django.utils import six + +import six class JSONResponseMixin(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/braces/views/_forms.py new/django-braces-1.14.0/braces/views/_forms.py --- old/django-braces-1.13.0/braces/views/_forms.py 2017-02-01 19:28:06.000000000 +0100 +++ new/django-braces-1.14.0/braces/views/_forms.py 2019-12-30 21:18:50.000000000 +0100 @@ -1,15 +1,21 @@ +from functools import partial + from django.contrib import messages from django.core.exceptions import ImproperlyConfigured -from django.utils import six from django.utils.decorators import method_decorator -from django.utils.encoding import force_text -from django.utils.functional import curry, Promise +try: + from django.utils.encoding import force_str as force_string +except ImportError: + from django.utils.encoding import force_text as force_string +from django.utils.functional import Promise from django.views.decorators.csrf import csrf_exempt try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse +import six + class CsrfExemptMixin(object): """ @@ -73,7 +79,7 @@ def __init__(self, request): for name in self.API: api_fn = getattr(messages.api, name) - setattr(self, name, curry(api_fn, request)) + setattr(self, name, partial(api_fn, request)) class _MessageDescriptor(object): @@ -121,7 +127,7 @@ 'object.'.format(self.__class__.__name__) ) - return force_text(self.form_valid_message) + return force_string(self.form_valid_message) def form_valid(self, form): """ @@ -166,7 +172,7 @@ '{0}.form_invalid_message must be a str or unicode ' 'object.'.format(self.__class__.__name__)) - return force_text(self.form_invalid_message) + return force_string(self.form_invalid_message) def form_invalid(self, form): response = super(FormInvalidMessageMixin, self).form_invalid(form) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/braces/views/_other.py new/django-braces-1.14.0/braces/views/_other.py --- old/django-braces-1.13.0/braces/views/_other.py 2017-02-01 19:28:06.000000000 +0100 +++ new/django-braces-1.14.0/braces/views/_other.py 2019-12-30 21:18:50.000000000 +0100 @@ -1,6 +1,9 @@ from django.core.exceptions import ImproperlyConfigured from django.shortcuts import redirect -from django.utils.encoding import force_text +try: + from django.utils.encoding import force_str as force_string +except ImportError: + from django.utils.encoding import force_text as force_string try: from django.urls import resolve except ImportError: @@ -28,7 +31,7 @@ '{0} is missing a headline. ' 'Define {0}.headline, or override ' '{0}.get_headline().'.format(self.__class__.__name__)) - return force_text(self.headline) + return force_string(self.headline) class StaticContextMixin(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/conftest.py new/django-braces-1.14.0/conftest.py --- old/django-braces-1.13.0/conftest.py 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/conftest.py 2017-02-01 20:26:16.000000000 +0100 @@ -0,0 +1,8 @@ +import os +from django.conf import settings +from tests import settings as test_settings + + +def pytest_configure(): + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings') + settings.configure(default_settings=test_settings) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/django_braces.egg-info/PKG-INFO new/django-braces-1.14.0/django_braces.egg-info/PKG-INFO --- old/django-braces-1.13.0/django_braces.egg-info/PKG-INFO 2018-04-22 16:52:29.000000000 +0200 +++ new/django-braces-1.14.0/django_braces.egg-info/PKG-INFO 2019-12-30 22:17:36.000000000 +0100 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: django-braces -Version: 1.13.0 +Version: 1.14.0 Summary: Reusable, generic mixins for Django Home-page: https://github.com/brack3t/django-braces/ Author: Kenneth Love <kenn...@brack3t.com>, Chris Jones <ch...@brack3t.com> Author-email: d...@brack3t.com License: BSD -Description-Content-Type: UNKNOWN Description: Mixins to add easy functionality to Django class-based views, forms, and models. Keywords: django,views,forms,mixins Platform: UNKNOWN @@ -15,17 +14,10 @@ Classifier: License :: OSI Approved :: BSD License Classifier: Environment :: Web Environment Classifier: Development Status :: 5 - Production/Stable -Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Framework :: Django -Classifier: Framework :: Django :: 1.5 -Classifier: Framework :: Django :: 1.6 -Classifier: Framework :: Django :: 1.7 -Classifier: Framework :: Django :: 1.8 -Classifier: Framework :: Django :: 1.9 -Classifier: Framework :: Django :: 1.10 +Classifier: Framework :: Django :: 1.11 Classifier: Framework :: Django :: 2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/django_braces.egg-info/SOURCES.txt new/django-braces-1.14.0/django_braces.egg-info/SOURCES.txt --- old/django-braces-1.13.0/django_braces.egg-info/SOURCES.txt 2018-04-22 16:52:29.000000000 +0200 +++ new/django-braces-1.14.0/django_braces.egg-info/SOURCES.txt 2019-12-30 22:17:36.000000000 +0100 @@ -2,8 +2,12 @@ LICENSE MANIFEST.in README.md +conftest.py +pyproject.toml +requirements.txt setup.cfg setup.py +tox.ini braces/__init__.py braces/forms.py braces/views/__init__.py @@ -17,9 +21,12 @@ django_braces.egg-info/dependency_links.txt django_braces.egg-info/not-zip-safe django_braces.egg-info/pbr.json +django_braces.egg-info/requires.txt django_braces.egg-info/top_level.txt +docs/Makefile docs/access.rst docs/changelog.rst +docs/conf.py docs/contributing.rst docs/form.rst docs/index.rst @@ -37,4 +44,7 @@ tests/test_other_mixins.py tests/urls.py tests/urls_namespaced.py -tests/views.py \ No newline at end of file +tests/views.py +tests/templates/404.html +tests/templates/blank.html +tests/templates/form.html \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/django_braces.egg-info/requires.txt new/django-braces-1.14.0/django_braces.egg-info/requires.txt --- old/django-braces-1.13.0/django_braces.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/django_braces.egg-info/requires.txt 2019-12-30 22:17:36.000000000 +0100 @@ -0,0 +1,2 @@ +Django>=1.11.0 +six diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/docs/Makefile new/django-braces-1.14.0/docs/Makefile --- old/django-braces-1.13.0/docs/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/docs/Makefile 2012-04-30 19:31:44.000000000 +0200 @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django-braces.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-braces.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/django-braces" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-braces" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/docs/access.rst new/django-braces-1.14.0/docs/access.rst --- old/django-braces-1.13.0/docs/access.rst 2017-12-03 19:38:42.000000000 +0100 +++ new/django-braces-1.14.0/docs/access.rst 2019-12-30 21:18:50.000000000 +0100 @@ -18,7 +18,7 @@ * A subclass of ``Exception``: raises this exception. * A callable: gets called with the ``request`` argument. The function has to return a ``HttpResponse`` or - ``StreamingHttpResponse`` (Django 1.5+), otherwise a ``PermissionDenied`` + ``StreamingHttpResponse``, otherwise a ``PermissionDenied`` exception gets raised. This gets done in ``handle_no_permission``, which can be overridden itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/docs/changelog.rst new/django-braces-1.14.0/docs/changelog.rst --- old/django-braces-1.13.0/docs/changelog.rst 2017-02-01 20:34:38.000000000 +0100 +++ new/django-braces-1.14.0/docs/changelog.rst 2019-12-30 21:18:50.000000000 +0100 @@ -4,6 +4,27 @@ Changelog ========= +* :release:`1.14.0 <2019-12-30>` +* :support:`260` Fixes the goshdang Travis tests. +* :support:`250` Include documentation Makefile and conf.py in source distribution. +* :support:`246` README more accurately explains the supported Django versions. +* :release:`1.13.0 <2018-04-06>` +* :support:`243` Adds support for Python 3.7 and Django 2.1. +* :support:`244` Documentation link fix. +* :support:`236` Refines the Django and Python versions tested against. +* :support:`241` Fixes a documentation typo, "altenate" should be "alternate". +* :release:`1.12.0 <2018-04-06>` +* :support:`237` Updates for Django 2.0. +* :support:`232` Updates for Django 1.11. +* :support:`227` Use SVG in README instead of PNG. +* :support:`221` Renamed a duplicative method name. +* :support:`220` Adds a warning for cases where ``prefetch_related`` or ``select_related`` are empty in their respective mixins. +* :release:`1.11.0 <2017-02-01>` +* :bug:`215 major` Imports for 1.11 and 2.x ``reverse`` and ``reverse_lazy`` functions. +* :support:`248` Include some files necessary for testing in the source distribution. +* :feature:`228` Adds an ``object_level_permissions`` attribute to the ``PermissionRequiredMixin`` to allow for object-level permission checks instead of just view-level checks. +* :bug:`224 major` Allows ``OPTIONS`` requests to be body-less. +* :bug:`218 major` ``AccessMixin.handle_no_permission` now accepts a ``request`` parameter. * :feature:`198` New :ref:`OrderableListMixin` allows to switch the default ordering setting from `asc` to `desc`. * :support:`215` Imports updated for Django 2.0. * :feature:`204` New :ref:`HeaderMixin` that allows custom headers to be set on a view. @@ -11,7 +32,7 @@ * :bug:`212 major` Small changes for Django 1.10 compatibility. * :bug:`211 major` ReadTheDocs links updated. * :bug:`209 major` Django documentation link updated. -* :release:`1.9.0 <2016-5-31>` +* :release:`1.9.0 <2016-05-31>` * :bug:`208 major` Fixed errors from combining certain access mixins. * :bug:`196 major` Refactor how users without permissions are handled. * :bug:`181 major` Fixed redirect loops based on user permissions. @@ -21,7 +42,7 @@ * :support:`202` Fixed typo in ``PermissionsRequiredMixin`` and ``MultiplePermissionsRequiredMixin``. * :support:`201` Fixed typo in ``SuccessURLRedirectListMixin``. * :support:`192` Added example for ``OrderableListView``. -* :release:`1.8.1 <2015-7-12>` +* :release:`1.8.1 <2015-07-12>` * :bug:`176` Only check time delta for authenticated users in :ref:`RecentLoginRequiredMixin`. * :bug:`-` Changed :ref:`JsonRequestResponseMixin` docs to not use `ugettext_lazy`. * :bug:`-` Updated tests to include Python 3.2. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/docs/conf.py new/django-braces-1.14.0/docs/conf.py --- old/django-braces-1.13.0/docs/conf.py 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/docs/conf.py 2019-12-30 21:18:50.000000000 +0100 @@ -0,0 +1,251 @@ +# -*- coding: utf-8 -*- +# +# django-braces documentation build configuration file, created by +# sphinx-quickstart on Mon Apr 30 10:31:44 2012. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +sys.path.insert(0, os.path.abspath('..')) +import braces +from braces import __version__ + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['releases'] + +releases_issue_uri = "https://github.com/brack3t/django-braces/issues/%s" +releases_release_uri = "https://github.com/brack3t/django-braces/tree/%s" +releases_unstable_prehistory = True +releases_debug = True + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'django-braces' +copyright = u'2013, Kenneth Love and Chris Jones' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = __version__ +# The full version, including alpha/beta/rc tags. +release = version + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# "<project> v<release> documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a <link> tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'django-bracesdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'django-braces.tex', 'django-braces Documentation', + 'Kenneth Love and Chris Jones', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'django-braces', 'django-braces Documentation', + ['Kenneth Love and Chris Jones'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'django-braces', 'django-braces Documentation', + 'Kenneth Love and Chris Jones', 'django-braces', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/docs/contributing.rst new/django-braces-1.14.0/docs/contributing.rst --- old/django-braces-1.13.0/docs/contributing.rst 2016-10-24 21:07:58.000000000 +0200 +++ new/django-braces-1.14.0/docs/contributing.rst 2019-12-30 21:18:50.000000000 +0100 @@ -50,4 +50,4 @@ we can achieve forever. So long as your tests cover your contribution 80% or better, we're happy to try and bump up that last bit, or just accept the code. -We currently test Braces against late (usually latest) versions of Python 2.7, 3.2, 3.3, 3.4 and 3.5. We also test against the latest released version of Django from 1.5 to 1.10. +We currently test Braces against late (usually latest) versions of Python 2.7, 3.4, 3.5, and 3.6. We also test against the latest released version of Django from 1.11 to 2.0. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/docs/form.rst new/django-braces-1.14.0/docs/form.rst --- old/django-braces-1.13.0/docs/form.rst 2016-05-31 21:52:46.000000000 +0200 +++ new/django-braces-1.14.0/docs/form.rst 2019-12-30 21:18:50.000000000 +0100 @@ -248,6 +248,6 @@ .. _CRUD: http://en.wikipedia.org/wiki/Create,_read,_update_and_delete -.. _CSRF protection: https://docs.djangoproject.com/en/1.5/ref/contrib/csrf/ -.. _csrf_exempt: https://docs.djangoproject.com/en/1.5/ref/contrib/csrf/#django.views.decorators.csrf.csrf_exempt -.. _messages: https://docs.djangoproject.com/en/1.5/ref/contrib/messages/ +.. _CSRF protection: https://docs.djangoproject.com/en/stable/ref/csrf/ +.. _csrf_exempt: https://docs.djangoproject.com/en/stable/ref/csrf/#django.views.decorators.csrf.csrf_exempt +.. _messages: https://docs.djangoproject.com/en/stable/ref/contrib/messages/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/docs/other.rst new/django-braces-1.14.0/docs/other.rst --- old/django-braces-1.13.0/docs/other.rst 2017-02-01 20:39:26.000000000 +0100 +++ new/django-braces-1.14.0/docs/other.rst 2019-12-30 21:18:50.000000000 +0100 @@ -300,7 +300,7 @@ AjaxResponseMixin ----------------- -This mixin provides hooks for altenate processing of AJAX requests based on HTTP verb. +This mixin provides hooks for alternate processing of AJAX requests based on HTTP verb. To control AJAX-specific behavior, override ``get_ajax``, ``post_ajax``, ``put_ajax``, or ``delete_ajax``. All four methods take ``request``, ``*args``, and ``**kwargs`` like the standard view methods. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/pyproject.toml new/django-braces-1.14.0/pyproject.toml --- old/django-braces-1.13.0/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/pyproject.toml 2019-12-30 21:24:58.000000000 +0100 @@ -0,0 +1,7 @@ +[build-system] +requires = ["setuptools>=40.6.6", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 79 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/requirements.txt new/django-braces-1.14.0/requirements.txt --- old/django-braces-1.13.0/requirements.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/requirements.txt 2016-05-31 21:52:46.000000000 +0200 @@ -0,0 +1,5 @@ +factory_boy +mock +pytest-django +pytest-cov +coverage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/setup.cfg new/django-braces-1.14.0/setup.cfg --- old/django-braces-1.13.0/setup.cfg 2018-04-22 16:52:29.000000000 +0200 +++ new/django-braces-1.14.0/setup.cfg 2019-12-30 22:17:36.284009000 +0100 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.13.0 +current_version = 1.14.0 commit = True tag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/setup.py new/django-braces-1.14.0/setup.py --- old/django-braces-1.13.0/setup.py 2018-04-22 16:51:53.000000000 +0200 +++ new/django-braces-1.14.0/setup.py 2019-12-30 21:44:08.000000000 +0100 @@ -21,19 +21,16 @@ "License :: OSI Approved :: BSD License", "Environment :: Web Environment", "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Framework :: Django", - "Framework :: Django :: 1.5", - "Framework :: Django :: 1.6", - "Framework :: Django :: 1.7", - "Framework :: Django :: 1.8", - "Framework :: Django :: 1.9", - "Framework :: Django :: 1.10", + "Framework :: Django :: 1.11", "Framework :: Django :: 2.0" ], + install_requires=[ + "Django>=1.11.0", + "six" + ], ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/compat.py new/django-braces-1.14.0/tests/compat.py --- old/django-braces-1.13.0/tests/compat.py 2017-12-03 19:31:00.000000000 +0100 +++ new/django-braces-1.14.0/tests/compat.py 2019-12-30 21:18:50.000000000 +0100 @@ -1,7 +1,7 @@ try: - from django.utils.encoding import force_text + from django.utils.encoding import force_str as force_string except ImportError: - from django.utils.encoding import force_unicode as force_text + from django.utils.encoding import force_text as force_string try: from django.conf.urls import url, include diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/settings.py new/django-braces-1.14.0/tests/settings.py --- old/django-braces-1.13.0/tests/settings.py 2018-04-22 16:43:31.000000000 +0200 +++ new/django-braces-1.14.0/tests/settings.py 2019-12-30 21:18:50.000000000 +0100 @@ -16,7 +16,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': ':memory:', + 'NAME': ':memory:' } } @@ -51,43 +51,23 @@ 'django.contrib.auth.hashers.MD5PasswordHasher', ) -import django - -if django.VERSION >= (1, 10): - TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.template.context_processors.i18n', - 'django.template.context_processors.media', - 'django.template.context_processors.static', - 'django.template.context_processors.tz', - 'django.contrib.messages.context_processors.messages', - ], - }, +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.i18n', + 'django.template.context_processors.media', + 'django.template.context_processors.static', + 'django.template.context_processors.tz', + 'django.contrib.messages.context_processors.messages', + ], }, - ] - AUTH_PASSWORD_VALIDATORS = [] - -else: - TEMPLATE_CONTEXT_PROCESSORS = [ - 'django.contrib.auth.context_processors.auth', - 'django.core.context_processors.i18n', - 'django.core.context_processors.media', - 'django.core.context_processors.static', - 'django.core.context_processors.tz', - 'django.core.context_processors.request', - 'django.contrib.messages.context_processors.messages' - ] - -if django.VERSION < (1, 4): - TEMPLATE_CONTEXT_PROCESSORS.remove('django.core.context_processors.tz') - MIDDLEWARE_CLASSES.remove( - 'django.middleware.clickjacking.XFrameOptionsMiddleware' - ) + }, +] +AUTH_PASSWORD_VALIDATORS = [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/templates/404.html new/django-braces-1.14.0/tests/templates/404.html --- old/django-braces-1.13.0/tests/templates/404.html 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/tests/templates/404.html 2014-03-05 00:44:38.000000000 +0100 @@ -0,0 +1 @@ +<h1>404!!!!</h1> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/templates/form.html new/django-braces-1.14.0/tests/templates/form.html --- old/django-braces-1.13.0/tests/templates/form.html 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/tests/templates/form.html 2013-07-27 01:39:31.000000000 +0200 @@ -0,0 +1,12 @@ +<html> +<head></head> +<body> + {% if messages %} + {% for message in messages %} + {{ message }} + {% endfor %} + {% endif %} + + {{ form.as_p }} +</body> +</html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/test_access_mixins.py new/django-braces-1.14.0/tests/test_access_mixins.py --- old/django-braces-1.13.0/tests/test_access_mixins.py 2017-12-03 19:42:55.000000000 +0100 +++ new/django-braces-1.14.0/tests/test_access_mixins.py 2019-12-30 21:18:50.000000000 +0100 @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals -import pytest import datetime +import pytest + from django import test -from django import VERSION as DJANGO_VERSION from django.test.utils import override_settings from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.http import Http404, HttpResponse @@ -16,7 +16,7 @@ except ImportError: from django.core.urlresolvers import reverse_lazy -from .compat import force_text +from .compat import force_string from .factories import GroupFactory, UserFactory from .helpers import TestViewHelper from .views import (PermissionRequiredView, MultiplePermissionsRequiredView, @@ -27,6 +27,7 @@ UserPassesTestLoginRequiredView) +@pytest.mark.django_db class _TestAccessBasicsMixin(TestViewHelper): """ A set of basic tests for access mixins. @@ -53,7 +54,7 @@ self.client.login(username=user.username, password='asdf1234') resp = self.client.get(self.view_url) self.assertEqual(200, resp.status_code) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) def test_redirects_to_login(self): """ @@ -115,7 +116,7 @@ resp = self.dispatch_view(req, raise_exception=func) assert resp.status_code == 200 - assert force_text(resp.content) == 'CUSTOM' + assert force_string(resp.content) == 'CUSTOM' def test_raise_func_false(self): """ @@ -221,6 +222,7 @@ redirect_unauthenticated_users=False) +@pytest.mark.django_db class TestLoginRequiredMixin(TestViewHelper, test.TestCase): """ Tests for LoginRequiredMixin. @@ -242,7 +244,7 @@ self.client.login(username=user.username, password='asdf1234') resp = self.client.get(self.view_url) assert resp.status_code == 200 - assert force_text(resp.content) == 'OK' + assert force_string(resp.content) == 'OK' def test_anonymous_redirects(self): resp = self.dispatch_view( @@ -252,6 +254,7 @@ assert resp['Location'] == '/accounts/login/?next=/login_required/' +@pytest.mark.django_db class TestChainedLoginRequiredMixin(TestViewHelper, test.TestCase): """ Tests for LoginRequiredMixin combined with another AccessMixin. @@ -309,6 +312,7 @@ self.assert_redirect_to_login(resp) +@pytest.mark.django_db class TestAnonymousRequiredMixin(TestViewHelper, test.TestCase): """ Tests for AnonymousRequiredMixin. @@ -323,14 +327,14 @@ """ resp = self.client.get(self.view_url) self.assertEqual(200, resp.status_code) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) # Test with reverse_lazy resp = self.dispatch_view( self.build_request(), login_url=reverse_lazy(self.view_url)) self.assertEqual(200, resp.status_code) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) def test_authenticated(self): """ @@ -360,6 +364,7 @@ self.assertEqual(404, resp.status_code) +@pytest.mark.django_db class TestPermissionRequiredMixin(_TestAccessBasicsMixin, test.TestCase): """ Tests for PermissionRequiredMixin. @@ -382,6 +387,7 @@ self.dispatch_view(self.build_request(), permission_required=None) +@pytest.mark.django_db class TestMultiplePermissionsRequiredMixin( _TestAccessBasicsMixin, test.TestCase): view_class = MultiplePermissionsRequiredView @@ -464,7 +470,7 @@ req = self.build_request(user=user) resp = self.dispatch_view(req, permissions=permissions) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) user = UserFactory(permissions=['auth.add_user']) with self.assertRaises(PermissionDenied): @@ -481,7 +487,7 @@ req = self.build_request(user=user) resp = self.dispatch_view(req, permissions=permissions) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) user = UserFactory(permissions=[]) with self.assertRaises(PermissionDenied): @@ -490,6 +496,7 @@ permissions=permissions) +@pytest.mark.django_db class TestSuperuserRequiredMixin(_TestAccessBasicsMixin, test.TestCase): view_class = SuperuserRequiredView view_url = '/superuser_required/' @@ -501,6 +508,7 @@ return UserFactory() +@pytest.mark.django_db class TestStaffuserRequiredMixin(_TestAccessBasicsMixin, test.TestCase): view_class = StaffuserRequiredView view_url = '/staffuser_required/' @@ -512,6 +520,7 @@ return UserFactory() +@pytest.mark.django_db class TestGroupRequiredMixin(_TestAccessBasicsMixin, test.TestCase): view_class = GroupRequiredView view_url = '/group_required/' @@ -537,7 +546,7 @@ self.client.login(username=user.username, password='asdf1234') resp = self.client.get(self.view_url) self.assertEqual(200, resp.status_code) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) def test_with_group_list(self): group_list = ['test_group', 'editors'] @@ -549,7 +558,7 @@ self.client.login(username=user.username, password='asdf1234') resp = self.client.get(self.view_url) self.assertEqual(200, resp.status_code) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) self.view_class.group_required = 'test_group' self.assertEqual('test_group', self.view_class.group_required) @@ -558,7 +567,7 @@ self.client.login(username=user.username, password='asdf1234') resp = self.client.get(self.view_url) self.assertEqual(200, resp.status_code) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) def test_improperly_configured(self): view = self.view_class() @@ -583,11 +592,12 @@ self.client.login(username=user.username, password='asdf1234') resp = self.client.get(self.view_url) self.assertEqual(200, resp.status_code) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) self.view_class.group_required = 'test_group' self.assertEqual('test_group', self.view_class.group_required) +@pytest.mark.django_db class TestUserPassesTestMixin(_TestAccessBasicsMixin, test.TestCase): view_class = UserPassesTestView view_url = '/user_passes_test/' @@ -608,7 +618,7 @@ resp = self.client.get(self.view_url) self.assertEqual(200, resp.status_code) - self.assertEqual('OK', force_text(resp.content)) + self.assertEqual('OK', force_string(resp.content)) def test_with_user_not_pass(self): user = self.build_authorized_user(is_superuser=True) @@ -630,13 +640,12 @@ raise_exception=True) +@pytest.mark.django_db class TestSSLRequiredMixin(test.TestCase): view_class = SSLRequiredView view_url = '/sslrequired/' - @pytest.mark.skipif(DJANGO_VERSION[:2] < (1, 9), - reason='Django 1.9 and above behave differently') - def test_ssl_redirection_django_19_up(self): + def test_ssl_redirection(self): self.view_url = 'https://testserver' + self.view_url self.view_class.raise_exception = False resp = self.client.get(self.view_url) @@ -645,28 +654,6 @@ self.assertEqual(200, resp.status_code) self.assertEqual('https', resp.request.get('wsgi.url_scheme')) - @pytest.mark.skipif(DJANGO_VERSION[:2] < (1, 7), - reason='Django 1.6 and below behave differently') - @pytest.mark.skipif(DJANGO_VERSION[:2] > (1, 8), - reason='Django 1.6 and below behave differently') - def test_ssl_redirection_django_17_up(self): - self.view_class.raise_exception = False - resp = self.client.get(self.view_url) - self.assertRedirects(resp, self.view_url, status_code=301) - resp = self.client.get(self.view_url, follow=True) - self.assertEqual(200, resp.status_code) - self.assertEqual('https', resp.request.get('wsgi.url_scheme')) - - @pytest.mark.skipif(DJANGO_VERSION[:2] > (1, 6), - reason='Django 1.7 and above behave differently') - def test_ssl_redirection_django_16_down(self): - self.view_class.raise_exception = False - resp = self.client.get(self.view_url) - self.assertEqual(301, resp.status_code) - resp = self.client.get(self.view_url, follow=True) - self.assertEqual(200, resp.status_code) - self.assertEqual('https', resp.request.get('wsgi.url_scheme')) - def test_raises_exception(self): self.view_class.raise_exception = True resp = self.client.get(self.view_url) @@ -678,25 +665,14 @@ resp = self.client.get(self.view_url) self.assertEqual(200, resp.status_code) - @pytest.mark.skipif( - DJANGO_VERSION[:2] < (1, 7), - reason='Djanog 1.6 and below does not have the secure=True option') - def test_https_does_not_redirect_django_17_up(self): + def test_https_does_not_redirect(self): self.view_class.raise_exception = False resp = self.client.get(self.view_url, secure=True) self.assertEqual(200, resp.status_code) self.assertEqual('https', resp.request.get('wsgi.url_scheme')) - @pytest.mark.skipif( - DJANGO_VERSION[:2] > (1, 6), - reason='Django 1.7 and above have secure=True option, below does not') - def test_https_does_not_redirect_django_16_down(self): - self.view_class.raise_exception = False - resp = self.client.get(self.view_url, **{'wsgi.url_scheme': 'https'}) - self.assertEqual(200, resp.status_code) - self.assertEqual('https', resp.request.get('wsgi.url_scheme')) - +@pytest.mark.django_db class TestRecentLoginRequiredMixin(test.TestCase): """ Tests for RecentLoginRequiredMixin. @@ -713,7 +689,7 @@ self.client.login(username=user.username, password='asdf1234') resp = self.client.get(self.recent_view_url) assert resp.status_code == 200 - assert force_text(resp.content) == 'OK' + assert force_string(resp.content) == 'OK' def test_outdated_login(self): self.view_class.max_last_login_delta = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/test_ajax_mixins.py new/django-braces-1.14.0/tests/test_ajax_mixins.py --- old/django-braces-1.13.0/tests/test_ajax_mixins.py 2017-12-03 19:34:45.000000000 +0100 +++ new/django-braces-1.14.0/tests/test_ajax_mixins.py 2019-12-30 21:18:50.000000000 +0100 @@ -9,7 +9,7 @@ from braces.views import AjaxResponseMixin -from .compat import force_text +from .compat import force_string from .factories import ArticleFactory, UserFactory from .helpers import TestViewHelper from .views import (SimpleJsonView, JsonRequestResponseView, @@ -30,7 +30,7 @@ for m in self.methods: fn = getattr(self.client, m) resp = fn('/ajax_response/', HTTP_X_REQUESTED_WITH='XMLHttpRequest') - assert force_text(resp.content) == 'AJAX_OK' + assert force_string(resp.content) == 'AJAX_OK' def test_not_xhr(self): """ @@ -40,7 +40,7 @@ for m in self.methods: fn = getattr(self.client, m) resp = fn('/ajax_response/') - assert force_text(resp.content) == 'OK' + assert force_string(resp.content) == 'OK' def test_fallback_to_normal_methods(self): """ @@ -83,7 +83,7 @@ """ resp = self.client.get(url) self.assert_json_response(resp) - content = force_text(resp.content) + content = force_string(resp.content) return content def test_simple_json(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/test_other_mixins.py new/django-braces-1.14.0/tests/test_other_mixins.py --- old/django-braces-1.13.0/tests/test_other_mixins.py 2017-12-03 19:34:45.000000000 +0100 +++ new/django-braces-1.14.0/tests/test_other_mixins.py 2019-12-30 21:18:50.000000000 +0100 @@ -4,7 +4,6 @@ import mock import pytest -from django import VERSION as DJANGO_VERSION from django.contrib import messages from django.contrib.messages.middleware import MessageMiddleware from django.contrib.messages.storage.base import Message @@ -14,9 +13,9 @@ from django.test.utils import override_settings from django.views.generic import View -from braces.views import (SetHeadlineMixin, MessageMixin, _MessageAPIWrapper, - FormValidMessageMixin, FormInvalidMessageMixin) -from .compat import force_text +from braces.views import (SetHeadlineMixin, MessageMixin, FormValidMessageMixin, + FormInvalidMessageMixin) +from .compat import force_string from .factories import UserFactory from .helpers import TestViewHelper from .models import Article, CanonicalArticle @@ -54,7 +53,7 @@ user = UserFactory() self.client.login(username=user.username, password='asdf1234') resp = self.client.post('/form_with_user_kwarg/', {'field1': 'foo'}) - assert force_text(resp.content) == "username: %s" % user.username + assert force_string(resp.content) == "username: %s" % user.username def test_get_method(self): user = UserFactory() @@ -145,7 +144,7 @@ """ resp = self.client.post('/csrf_exempt/', {'field1': 'test'}) self.assertEqual(200, resp.status_code) - self.assertEqual("OK", force_text(resp.content)) + self.assertEqual("OK", force_string(resp.content)) class TestSelectRelatedMixin(TestViewHelper, test.TestCase): @@ -193,9 +192,10 @@ qs.select_related = m m.reset_mock() - resp = self.dispatch_view( - self.build_request(), - view_class=ArticleListViewWithCustomQueryset) + with pytest.warns(UserWarning): + resp = self.dispatch_view( + self.build_request(), + view_class=ArticleListViewWithCustomQueryset) self.assertEqual(200, resp.status_code) self.assertEqual(0, m.call_count) @@ -245,9 +245,10 @@ qs.prefetch_related = m m.reset_mock() - resp = self.dispatch_view( - self.build_request(), - view_class=ArticleListViewWithCustomQueryset) + with pytest.warns(UserWarning): + resp = self.dispatch_view( + self.build_request(), + view_class=ArticleListViewWithCustomQueryset) self.assertEqual(200, resp.status_code) self.assertEqual(0, m.call_count) @@ -641,10 +642,6 @@ with self.assertRaises(AttributeError): self.get_request_response(TestView.as_view()) - @pytest.mark.skipif( - DJANGO_VERSION < (1, 5), - reason='Some features of MessageMixin are only available in ' - 'Django >= 1.5') def test_wrapper_available_in_dispatch(self): """ Make sure that self.messages is available in dispatch() even before @@ -671,12 +668,7 @@ # This test is designed to break when django.contrib.messages.api # changes (items being added or removed). excluded_API = set() - if DJANGO_VERSION >= (1, 7): - excluded_API.add('MessageFailure') - self.assertEqual( - _MessageAPIWrapper.API | excluded_API, - set(messages.api.__all__) - ) + excluded_API.add('MessageFailure') class TestFormMessageMixins(test.TestCase): @@ -721,7 +713,7 @@ def test_form_valid_returns_message(self): mixin = FormValidMessageMixin() mixin.form_valid_message = 'Good øø' - self.assertEqual('Good øø', mixin.get_form_valid_message()) + self.assertEqual(force_string('Good øø'), mixin.get_form_valid_message()) def test_form_invalid_message_not_set(self): mixin = FormInvalidMessageMixin() @@ -737,7 +729,7 @@ def test_form_invalid_returns_message(self): mixin = FormInvalidMessageMixin() mixin.form_invalid_message = 'Bad øø' - self.assertEqual('Bad øø', mixin.get_form_invalid_message()) + self.assertEqual(force_string('Bad øø'), mixin.get_form_invalid_message()) class TestAllVerbsMixin(test.TestCase): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/urls.py new/django-braces-1.14.0/tests/urls.py --- old/django-braces-1.13.0/tests/urls.py 2018-04-22 16:43:31.000000000 +0200 +++ new/django-braces-1.14.0/tests/urls.py 2019-12-30 21:18:50.000000000 +0100 @@ -1,7 +1,7 @@ from __future__ import absolute_import from django.core.exceptions import ImproperlyConfigured -from django.contrib.auth.views import login +from django.contrib.auth.views import LoginView from . import views from .compat import include, url, patterns_compat @@ -116,8 +116,8 @@ ] urlpatterns += [ - url(r'^accounts/login/$', login, {'template_name': 'blank.html'}), - url(r'^auth/login/$', login, {'template_name': 'blank.html'}), + url(r'^accounts/login/$', LoginView.as_view(template_name='blank.html')), + url(r'^auth/login/$', LoginView.as_view(template_name='blank.html')), ] try: urlpatterns += [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tests/views.py new/django-braces-1.14.0/tests/views.py --- old/django-braces-1.13.0/tests/views.py 2017-02-01 19:28:06.000000000 +0100 +++ new/django-braces-1.14.0/tests/views.py 2019-12-30 21:18:50.000000000 +0100 @@ -4,7 +4,10 @@ from django.contrib.auth.models import User from django.http import HttpResponse -from django.utils.translation import ugettext_lazy as _ +try: + from django.utils.translation import gettext_lazy as _ +except ImportError: + from django.utils.translation import ugettext_lazy as _ from django.views.generic import (View, UpdateView, FormView, TemplateView, ListView, DetailView, CreateView) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-braces-1.13.0/tox.ini new/django-braces-1.14.0/tox.ini --- old/django-braces-1.13.0/tox.ini 1970-01-01 01:00:00.000000000 +0100 +++ new/django-braces-1.14.0/tox.ini 2019-12-30 21:18:50.000000000 +0100 @@ -0,0 +1,29 @@ +[tox] +envlist = py{27}-django{111},py{36,37,38}-django{111,22,30} +install_command = pip install {opts} "{packages}" + +[testenv] +basepython = + py27: python2.7 + py36: python3.6 + py37: python3.7 + py38: python3.8 + +commands = + {posargs:py.test} + +deps = + mock + factory_boy==2.8.1 + coverage==4.1 + pytest + pytest-django + pytest-cov + argparse + django111: Django>=1.11,<1.12 + django22: Django>=2.2,<2.3 + django30: Django>=3.0,<4.0 + +[pytest] +addopts = --cov=braces --nomigrations +django_find_project = false