Hello community, here is the log from the commit of package python-django-tastypie for openSUSE:Factory checked in at 2019-03-01 16:46:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-django-tastypie (Old) and /work/SRC/openSUSE:Factory/.python-django-tastypie.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-tastypie" Fri Mar 1 16:46:55 2019 rev:13 rq:678837 version:0.14.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-django-tastypie/python-django-tastypie.changes 2018-08-24 17:11:01.270564722 +0200 +++ /work/SRC/openSUSE:Factory/.python-django-tastypie.new.28833/python-django-tastypie.changes 2019-03-01 16:46:56.365810137 +0100 @@ -1,0 +2,9 @@ +Sun Feb 24 08:29:30 UTC 2019 - John Vandenberg <jay...@gmail.com> + +- Add AUTHORS, other *.rst files, and docs/ to %doc +- Update to v0.14.2 + * Added support for Django 2.1; minor bugs and regressions fixed. + + Incorporates django-tastypie-django21.patch + * Drops support for Django 1.8 LTS. + +------------------------------------------------------------------- Old: ---- django-tastypie-django21.patch v0.14.1.tar.gz New: ---- v0.14.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-django-tastypie.spec ++++++ --- /var/tmp/diff_new_pack.I3e7ud/_old 2019-03-01 16:46:57.073809869 +0100 +++ /var/tmp/diff_new_pack.I3e7ud/_new 2019-03-01 16:46:57.077809868 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-django-tastypie # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,13 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-django-tastypie -Version: 0.14.1 +Version: 0.14.2 Release: 0 Summary: A webservice API framework layer for Django License: BSD-3-Clause @@ -26,7 +26,6 @@ URL: https://github.com/django-tastypie/django-tastypie Source: https://github.com/django-tastypie/django-tastypie/archive/v%{version}.tar.gz # https://github.com/django-tastypie/django-tastypie/pull/1562 -Patch0: django-tastypie-django21.patch BuildRequires: %{python_module Django >= 1.8} BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module biplist} @@ -54,7 +53,6 @@ %prep %setup -q -n django-tastypie-%{version} -%patch0 -p1 %build %python_build @@ -80,7 +78,7 @@ %files %{python_files} %license LICENSE -%doc README.rst +%doc AUTHORS *.rst docs/*.rst docs/release_notes/ docs/code/ %{python_sitelib}/* %changelog ++++++ v0.14.1.tar.gz -> v0.14.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/.travis.yml new/django-tastypie-0.14.2/.travis.yml --- old/django-tastypie-0.14.1/.travis.yml 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/.travis.yml 2018-09-04 17:22:15.000000000 +0200 @@ -12,9 +12,9 @@ - MODE=flake8 - MODE=flake8-strict - MODE=docs - - DJANGO_VERSION=dj18 - DJANGO_VERSION=dj111 - DJANGO_VERSION=dj20 + - DJANGO_VERSION=dj21 - DJANGO_VERSION=djdev matrix: @@ -28,10 +28,14 @@ env: MODE=flake8-strict - python: "3.4" env: DJANGO_VERSION=djdev + - python: "3.4" + env: DJANGO_VERSION=dj21 - python: "2.7" env: DJANGO_VERSION=djdev - python: "2.7" env: DJANGO_VERSION=dj20 + - python: "2.7" + env: DJANGO_VERSION=dj21 addons: apt: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/README.rst new/django-tastypie-0.14.2/README.rst --- old/django-tastypie-0.14.1/README.rst 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/README.rst 2018-09-04 17:22:15.000000000 +0200 @@ -18,13 +18,13 @@ :target: https://pypi.python.org/pypi/django-tastypie :alt: Version -.. image:: https://img.shields.io/pypi/dm/django-tastypie.svg +.. image:: https://pypi-badges.global.ssl.fastly.net/svg?package=django-tastypie&timeframe=monthly :target: https://pypi.python.org/pypi/django-tastypie :alt: Downloads Creating delicious APIs for Django apps since 2010. -Currently in beta (v0.14.1) but being used actively in production on several +Currently in beta (v0.14.2) but being used actively in production on several sites. @@ -35,7 +35,7 @@ ---- * Python 2.7+ or Python 3.4+ -* Django 1.8, 1.11 or 2.0 (LTS releases) +* Django - 1.11 (LTS), 2.0 (LTS) or 2.1 - the last two LTS and the last incremental release are supported. * dateutil (http://labix.org/python-dateutil) >= 2.1 Format Support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/docs/debugging.rst new/django-tastypie-0.14.2/docs/debugging.rst --- old/django-tastypie-0.14.1/docs/debugging.rst 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/docs/debugging.rst 2018-09-04 17:22:15.000000000 +0200 @@ -33,7 +33,7 @@ ========================================================================== When calling ``obj_get`` (or another method that uses it, such as -``dispatch_detail``), mke sure the fields you're querying with are either +``dispatch_detail``), make sure the fields you're querying with are either ``Meta.detail_uri_name`` or a field which appears in ``Meta.filtering`` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/docs/index.rst new/django-tastypie-0.14.2/docs/index.rst --- old/django-tastypie-0.14.1/docs/index.rst 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/docs/index.rst 2018-09-04 17:22:15.000000000 +0200 @@ -84,7 +84,7 @@ ---- * Python 2.7+ or Python 3.4+ -* Django 1.8, 1.11 (LTS releases) or Django 2.0 (requires Python 3.4+) +* Django 1.11 (LTS releases) or Django 2.0+ (requires Python 3.4+) * dateutil (http://labix.org/python-dateutil) >= 2.1 Format Support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/docs/release_notes/dev.rst new/django-tastypie-0.14.2/docs/release_notes/dev.rst --- old/django-tastypie-0.14.1/docs/release_notes/dev.rst 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/docs/release_notes/dev.rst 2018-09-04 17:22:15.000000000 +0200 @@ -4,6 +4,12 @@ The current in-progress version. Put your notes here so they can be easily copied to the release notes for the next release. +Major changes +------------- + +* Dropped support for Django 1.8 (EOL). +* Compatability fixes for upstream changes, most notably the removal of QUERY_TERMS. + Bugfixes -------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/docs/release_notes/index.rst new/django-tastypie-0.14.2/docs/release_notes/index.rst --- old/django-tastypie-0.14.1/docs/release_notes/index.rst 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/docs/release_notes/index.rst 2018-09-04 17:22:15.000000000 +0200 @@ -5,6 +5,8 @@ :maxdepth: 1 dev + v0.14.2 + v0.14.1 v0.14.0 v0.13.3 v0.13.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/docs/release_notes/v0.14.1.rst new/django-tastypie-0.14.2/docs/release_notes/v0.14.1.rst --- old/django-tastypie-0.14.1/docs/release_notes/v0.14.1.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/django-tastypie-0.14.2/docs/release_notes/v0.14.1.rst 2018-09-04 17:22:15.000000000 +0200 @@ -0,0 +1,17 @@ +v0.14.1 +======= + +:date: 2018-04-09 + +Added support for Django 2.0; minor bugs and regressions fixed. +Adds abstract base classes for Resources - see documentation. +Adds optimization for getting multiple objects by id in a single query. + +Bugfixes +-------- + +* Add explicit error when ModelResource lacks object_class and queryset +* Update urls to slumber and biplist +* Alter length of URL field in ApiAccess model (to open-ended TextField) +* Fix Advanced Filtering example in documentation (with unit test) +* Fix regression in ToManyField.dehydrate with a null value. (#1544) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/docs/release_notes/v0.14.2.rst new/django-tastypie-0.14.2/docs/release_notes/v0.14.2.rst --- old/django-tastypie-0.14.1/docs/release_notes/v0.14.2.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/django-tastypie-0.14.2/docs/release_notes/v0.14.2.rst 2018-09-04 17:22:15.000000000 +0200 @@ -0,0 +1,7 @@ +v0.14.2 +======= + +:date: 2018-08-20 + +Added support for Django 2.1; minor bugs and regressions fixed. +Drops support for Django 1.8 LTS. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/tastypie/__init__.py new/django-tastypie-0.14.2/tastypie/__init__.py --- old/django-tastypie-0.14.1/tastypie/__init__.py 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/tastypie/__init__.py 2018-09-04 17:22:15.000000000 +0200 @@ -3,7 +3,7 @@ __author__ = 'Daniel Lindsley & the Tastypie core team' -VERSION = (0, 14, 1) +VERSION = (0, 14, 2) __short_version__ = '.'.join(map(str, VERSION[0:2])) __version__ = ''.join(['.'.join(map(str, VERSION[0:3])), ''.join(VERSION[3:])]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/tastypie/paginator.py new/django-tastypie-0.14.2/tastypie/paginator.py --- old/django-tastypie-0.14.1/tastypie/paginator.py 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/tastypie/paginator.py 2018-09-04 17:22:15.000000000 +0200 @@ -159,11 +159,10 @@ del request_params['limit'] if 'offset' in request_params: del request_params['offset'] - request_params.update({'limit': limit, 'offset': offset}) + request_params.update({'limit': str(limit), 'offset': str(offset)}) encoded_params = request_params.urlencode() except AttributeError: request_params = {} - for k, v in self.request_data.items(): if isinstance(v, six.text_type): request_params[k] = v.encode('utf-8') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/tastypie/resources.py new/django-tastypie-0.14.2/tastypie/resources.py --- old/django-tastypie-0.14.1/tastypie/resources.py 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/tastypie/resources.py 2018-09-04 17:22:15.000000000 +0200 @@ -13,11 +13,12 @@ from django.conf import settings from django.conf.urls import url from django.core.exceptions import ( - ObjectDoesNotExist, MultipleObjectsReturned, ValidationError, + ObjectDoesNotExist, MultipleObjectsReturned, ValidationError, FieldDoesNotExist ) from django.core.signals import got_request_exception from django.core.exceptions import ImproperlyConfigured from django.db.models.fields.related import ForeignKey +from django.db import models try: from django.contrib.gis.db.models.fields import GeometryField except (ImproperlyConfigured, ImportError): @@ -29,7 +30,7 @@ except ImportError: from django.db.models.fields.related_descriptors import\ ReverseOneToOneDescriptor -from django.db.models.sql.constants import QUERY_TERMS + from django.http import HttpResponse, HttpResponseNotFound, Http404 from django.utils import six from django.utils.cache import patch_cache_control, patch_vary_headers @@ -2075,10 +2076,6 @@ qs_filters = {} - query_terms = QUERY_TERMS - if django.VERSION >= (1, 8) and GeometryField: - query_terms |= set(GeometryField.class_lookups.keys()) - for filter_expr, value in filters.items(): filter_bits = filter_expr.split(LOOKUP_SEP) field_name = filter_bits.pop(0) @@ -2088,6 +2085,16 @@ # It's not a field we know about. Move along citizen. continue + # Validate filter types other than 'exact' that are supported by the field type + try: + django_field_name = self.fields[field_name].attribute + django_field = self._meta.object_class._meta.get_field(django_field_name) + if hasattr(django_field, 'field'): + django_field = django_field.field # related field + except FieldDoesNotExist: + raise InvalidFilterError("The '%s' field is not a valid field name" % field_name) + + query_terms = django_field.get_lookups().keys() if len(filter_bits) and filter_bits[-1] in query_terms: filter_type = filter_bits.pop() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/tests/core/models.py new/django-tastypie-0.14.2/tests/core/models.py --- old/django-tastypie-0.14.1/tests/core/models.py 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/tests/core/models.py 2018-09-04 17:22:15.000000000 +0200 @@ -22,7 +22,7 @@ title = models.CharField("The Title", max_length=100) slug = models.SlugField() content = models.TextField(blank=True) - is_active = models.BooleanField(default=True) + is_active = models.BooleanField(default=True, blank=True) created = models.DateTimeField(default=now) updated = models.DateTimeField(default=now) @@ -86,7 +86,7 @@ title = models.CharField(max_length=100) slug = models.SlugField(unique=True) content = models.TextField(blank=True) - is_active = models.BooleanField(default=True) + is_active = models.BooleanField(default=True, blank=True) created = models.DateTimeField(auto_now_add=now, null=True) updated = models.DateTimeField(auto_now=now) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/tests/core/tests/paginator.py new/django-tastypie-0.14.2/tests/core/tests/paginator.py --- old/django-tastypie-0.14.1/tests/core/tests/paginator.py 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/tests/core/tests/paginator.py 2018-09-04 17:22:15.000000000 +0200 @@ -268,7 +268,7 @@ def test_multiple(self): request = QueryDict('a=1&a=2') paginator = Paginator(request, self.data_set, - resource_uri='/api/v1/notes/', limit=2, offset=2) + resource_uri='/api/v1/notes/', limit='2', offset='2') meta = paginator.page()['meta'] self.assertEqual(meta['limit'], 2) self.assertEqual(meta['offset'], 2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/tests/core/tests/resources.py new/django-tastypie-0.14.2/tests/core/tests/resources.py --- old/django-tastypie-0.14.1/tests/core/tests/resources.py 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/tests/core/tests/resources.py 2018-09-04 17:22:15.000000000 +0200 @@ -2102,13 +2102,18 @@ resource_4 = AnotherSubjectResource() self.assertEqual(resource_4.build_filters(filters={'notes__user__startswith': 'Daniel'}), {'notes__author__startswith': 'Daniel'}) - # Make sure that fields that don't have attributes can't be filtered on. - self.assertRaises(InvalidFilterError, resource_4.build_filters, filters={'notes__hello_world': 'News'}) - # Make sure build_filters works even on resources without queryset resource = NoQuerysetNoteResource() self.assertEqual(resource.build_filters(), {}) + def test_build_filters_bad(self): + """ + Test that a nonsensical filter fails validation. + """ + resource = AnotherSubjectResource() + # Make sure that fields that don't have attributes can't be filtered on. + self.assertRaises(InvalidFilterError, resource.build_filters, filters={'notes__hello_world': 'News'}) + def test_custom_build_filters(self): """ A test derived from an example in the documentation (under Advanced Filtering). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/tests/validation/tests.py new/django-tastypie-0.14.2/tests/validation/tests.py --- old/django-tastypie-0.14.1/tests/validation/tests.py 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/tests/validation/tests.py 2018-09-04 17:22:15.000000000 +0200 @@ -4,6 +4,7 @@ from basic.models import Note from testcases import TestCaseWithFixture +from django.test.testcases import SimpleTestCase @override_settings(ROOT_URLCONF='validation.api.urls') @@ -156,3 +157,13 @@ 'annotations': ['This field is required.'] } }) + + +class TestJSONPValidation(SimpleTestCase): + """ + Explicitly run the doctests for tastypie.utils.validate_jsonp + """ + def test_jsonp(self): + import tastypie.utils.validate_jsonp + import doctest + doctest.testmod(tastypie.utils.validate_jsonp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-tastypie-0.14.1/tox.ini new/django-tastypie-0.14.2/tox.ini --- old/django-tastypie-0.14.1/tox.ini 2018-04-09 17:13:59.000000000 +0200 +++ new/django-tastypie-0.14.2/tox.ini 2018-09-04 17:22:15.000000000 +0200 @@ -1,6 +1,8 @@ [tox] envlist = - py{27,34,35,36}-dj{18,111,20,dev} + py{27}-dj{111} + py{34}-dj{20} + py{35,36}-dj{20,21,dev} py{27,36}-docs, py{27,36}-flake8, py{27,36}-flake8-strict @@ -15,17 +17,17 @@ PYTHONPATH = {toxinidir}:{toxinidir}/tests PYTHONWARNINGS = always commands = - dj{18,111,20,dev}: {[testenv]test-executable} test -p '*' core.tests --settings=settings_core - dj{18,111,20,dev}: {[testenv]test-executable} test basic.tests --settings=settings_basic - dj{18,111,20,dev}: {[testenv]test-executable} test related_resource.tests --settings=settings_related - dj{18,111,20,dev}: {[testenv]test-executable} test alphanumeric.tests --settings=settings_alphanumeric - dj{18,111,20,dev}: {[testenv]test-executable} test authorization.tests --settings=settings_authorization - dj{18,111,20,dev}: {[testenv]test-executable} test content_gfk.tests --settings=settings_content_gfk - dj{18,111,20,dev}: {[testenv]test-executable} test customuser.tests --settings=settings_customuser - dj{18,111,20,dev}: {[testenv]test-executable} test namespaced.tests --settings=settings_namespaced - dj{18,111,20,dev}: {[testenv]test-executable} test slashless.tests --settings=settings_slashless - dj{18,111,20,dev}: {[testenv]test-executable} test validation.tests --settings=settings_validation - dj{18,111,20,dev}: {[testenv]test-executable} test gis.tests --settings=settings_gis_spatialite + dj{111,20,21,dev}: {[testenv]test-executable} test -p '*' core.tests --settings=settings_core + dj{111,20,21,dev}: {[testenv]test-executable} test basic.tests --settings=settings_basic + dj{111,20,21,dev}: {[testenv]test-executable} test related_resource.tests --settings=settings_related + dj{111,20,21,dev}: {[testenv]test-executable} test alphanumeric.tests --settings=settings_alphanumeric + dj{111,20,21,dev}: {[testenv]test-executable} test authorization.tests --settings=settings_authorization + dj{111,20,21,dev}: {[testenv]test-executable} test content_gfk.tests --settings=settings_content_gfk + dj{111,20,21,dev}: {[testenv]test-executable} test customuser.tests --settings=settings_customuser + dj{111,20,21,dev}: {[testenv]test-executable} test namespaced.tests --settings=settings_namespaced + dj{111,20,21,dev}: {[testenv]test-executable} test slashless.tests --settings=settings_slashless + dj{111,20,21,dev}: {[testenv]test-executable} test validation.tests --settings=settings_validation + dj{111,20,21,dev}: {[testenv]test-executable} test gis.tests --settings=settings_gis_spatialite docs: sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html docs: sphinx-build -W -b doctest -d {envtmpdir}/doctrees . {envtmpdir}/html @@ -39,20 +41,21 @@ py35: python3.5 py36: python3.6 deps = - dj18: Django>=1.8,<1.9 dj111: Django>=1.11,<1.12 dj20: Django>=2.0,<2.1 + dj21: Django>=2.1,<2.2 djdev: https://github.com/django/django/archive/master.tar.gz - py27-dj{18,111}: django-oauth-plus==2.2.9 - py27-dj{18,111,20,dev}: python-digest - py27-dj{18,111,20,dev}: oauth2 - py27-dj{18,111,20,dev}: pysqlite==2.7.0 - py{34,35,36}-dj{18,111,20,dev}: python3-digest>=1.8b4 - dj{18,111,20,dev}: -r{toxinidir}/tests/requirements.txt + py27-dj{111}: django-oauth-plus==2.2.9 + py27-dj{111,20,21,dev}: python-digest + py27-dj{111,20,21,dev}: oauth2 + py27-dj{111,20,21,dev}: pysqlite==2.7.0 + py{34,35,36}-dj{111,20,21,dev}: python3-digest>=1.8b4 + dj{111,20,21,dev}: -r{toxinidir}/tests/requirements.txt docs: Sphinx - docs: Django>=1.11,<1.12 + py27-docs: Django<2.0 + py{34,35,36}-docs: Django<2.2 docs: mock docs: sphinx_rtd_theme