debian/0000755000000000000000000000000012161321757007173 5ustar debian/source/0000755000000000000000000000000012147223157010472 5ustar debian/source/format0000644000000000000000000000001412147223157011700 0ustar 3.0 (quilt) debian/get-orig-source0000644000000000000000000000105312147223160012121 0ustar #!/bin/sh set -ex PACKAGE=django-tastypie SHA=a9b6b23 USER=toastdriven VERSION=${VERSION:-$2} TARFILE=${TARFILE:-$3} if [ -z ${VERSION}]; then VERSION=`dpkg-parsechangelog | sed -n -e 's/^Version: \(.*\)-[^-]*$/\1/p'` fi if [ -z ${TARFILE}]; then TARFILE=${PACKAGE}_${VERSION}.orig.tar.gz fi FOLDER=${PACKAGE}-${VERSION} wget https://github.com/${USER}/${PACKAGE}/tarball/v${VERSION} -O ${PACKAGE}-${VERSION}.tar.gz tar xvzf ${PACKAGE}-${VERSION}.tar.gz mv ${USER}-${PACKAGE}-${SHA} ${FOLDER} GZIP=-9 tar czf ${TARFILE} ${FOLDER} #rm -rf ${FOLDER} debian/rules0000755000000000000000000000026112147223160010243 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk get-orig-source: /bin/sh $(CURDIR)/debian/get-orig-source debian/copyright0000644000000000000000000000332712147227450011132 0ustar Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=202 Source: http://django-tastypie.readthedocs.org/en/latest/index.html Files: * Copyright: (c) 2010, Daniel Lindsley License: BSD Files: debian/* Copyright: 2011, Dominique Belhachemi License: BSD License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the tastypie nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL tastypie BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/control0000644000000000000000000000151312147236020010566 0ustar Source: django-tastypie Maintainer: Dominique Belhachemi Section: python Priority: optional Build-Depends: cdbs (>=0.4.90), debhelper (>= 8), python-setuptools, python-all (>=2.6.6-3), python-dateutil (>= 1.5), python-mimeparse (>= 0.1.3) Standards-Version: 3.9.4 Homepage: http://django-tastypie.readthedocs.org/ Package: python-tastypie Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-dateutil (>= 1.5), python-django (>= 1.2), python-mimeparse (>= 0.1.3) Suggests: python-yaml, python-lxml Breaks: python-django-tastypie (<= 0.9.9-2) Replaces: python-django-tastypie (<= 0.9.9-2) Description: webservice API framework for Django Tastypie is an webservice API framework for Django. It provides a convenient, yet powerful and highly customizable, abstraction for creating REST-style interfaces. debian/compat0000644000000000000000000000000212147223160010362 0ustar 8 debian/watch0000644000000000000000000000046212147232755010231 0ustar version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$// \ https://github.com/toastdriven/django-tastypie/tags .*/v?(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) # Bart Martens Sat, 22 Dec 2012 12:50:33 +0000 debian/changelog0000644000000000000000000000327112161321757011050 0ustar django-tastypie (0.9.15-1) unstable; urgency=low * new upstream release * Bump Standards-Version to 3.9.4 * updated watch file, thanks to Bart Martens -- Dominique Belhachemi Sat, 22 Jun 2013 09:17:01 -0400 django-tastypie (0.9.10-2) unstable; urgency=low * added runtime dependencies (Closes: #647599) * python-dateutil (>= 1.5) * python-django (>= 1.2) * python-mimeparse (>= 0.1.3) * added Suggests field: python-yaml, python-lxml * added debian/watch * updated debian/copyright file to match format specification -- Dominique Belhachemi Fri, 04 Nov 2011 09:08:01 -0400 django-tastypie (0.9.10-1) unstable; urgency=low * new upstream release * fixes a yaml related security issue in serializers.py (Closes: #647314) * removed debian/patches/python_digest.diff -- Dominique Belhachemi Tue, 01 Nov 2011 16:11:48 -0400 django-tastypie (0.9.9-3) unstable; urgency=low * rename python-django-tastypie to python-tastypie * apply upstream patch ee13e251ac to remove python_digest dependency -- Dominique Belhachemi Thu, 27 Oct 2011 21:02:20 -0400 django-tastypie (0.9.9-2) unstable; urgency=low * Bump Standards-Version to 3.9.2 * Bump debhelper 8 * Switch to dh_python2 -- Dominique Belhachemi Mon, 24 Oct 2011 21:59:16 -0400 django-tastypie (0.9.9-1) unstable; urgency=low * new upstream release -- Dominique Belhachemi Mon, 24 Oct 2011 17:37:39 -0400 django-tastypie (0.9.7-1) unstable; urgency=low * Initial release (Closes: #646179) -- Dominique Belhachemi Tue, 11 Oct 2011 11:43:28 -0400 debian/patches/0000755000000000000000000000000012147223157010621 5ustar debian/patches/series0000644000000000000000000000002512147233547012037 0ustar #python_digest.diff debian/patches/python_digest.diff0000644000000000000000000000421512147223157014335 0ustar Description: Upstreams ee13e251ac patch to remove python_digest dependency --- django-tastypie-0.9.9.orig/setup.py +++ django-tastypie-0.9.9/setup.py @@ -19,12 +19,10 @@ setup( requires=[ 'mimeparse', 'python_dateutil(>=1.5, < 2.0)', - 'python_digest', ], install_requires=[ 'mimeparse', 'python_dateutil >= 1.5, < 2.0', - 'python_digest', ], classifiers=[ 'Development Status :: 4 - Beta', --- django-tastypie-0.9.9.orig/tests/core/tests/authentication.py +++ django-tastypie-0.9.9/tests/core/tests/authentication.py @@ -1,5 +1,4 @@ import base64 -import python_digest from django.contrib.auth.models import User from django.core import mail from django.http import HttpRequest @@ -8,6 +7,12 @@ from tastypie.authentication import Auth from tastypie.http import HttpUnauthorized from tastypie.models import ApiKey +# Be tricky. +from tastypie.authentication import python_digest +if python_digest is None: + import warnings + warnings.warn("Running tests without python_digest! Bad news!") + class AuthenticationTestCase(TestCase): def test_is_authenticated(self): --- django-tastypie-0.9.9.orig/tastypie/authentication.py +++ django-tastypie-0.9.9/tastypie/authentication.py @@ -1,11 +1,11 @@ import base64 import hmac -import python_digest import time import uuid from django.conf import settings from django.contrib.auth import authenticate +from django.core.exceptions import ImproperlyConfigured from tastypie.http import HttpUnauthorized try: @@ -14,6 +14,10 @@ except ImportError: import sha sha1 = sha.sha +try: + import python_digest +except ImportError: + python_digest = None class Authentication(object): """ @@ -187,6 +191,9 @@ class DigestAuthentication(Authenticatio self.backend = backend self.realm = realm + if python_digest is None: + raise ImproperlyConfigured("The 'python_digest' package could not be imported. It is required for use with the 'DigestAuthentication' class.") + def _unauthorized(self): response = HttpUnauthorized() new_uuid = uuid.uuid4()