Import django-reversion_2.0.12-1.debian.tar.xz

[dgit import tarball django-reversion 2.0.12-1 django-reversion_2.0.12-1.debian.tar.xz]
This commit is contained in:
Michael Fladischer 2017-12-08 19:55:32 +01:00
commit 76bf0a6548
18 changed files with 910 additions and 0 deletions

209
changelog Normal file
View File

@ -0,0 +1,209 @@
django-reversion (2.0.12-1) unstable; urgency=low
* New upstream release (Closes: #873910).
* Refresh patches.
* Bump Standards-Version to 4.1.1.
* Run wrap-and-sort -bast to reduce diff size of future changes.
* Enable autopkgtest-pkg-python testsuite.
-- Michael Fladischer <fladi@debian.org> Fri, 08 Dec 2017 19:55:32 +0100
django-reversion (2.0.10-1) unstable; urgency=low
* New upstream release.
* Refresh patches after git-dpm to gbp pq conversion
* Bump Standards-Version to 4.1.0.
-- Michael Fladischer <fladi@debian.org> Thu, 31 Aug 2017 21:21:22 +0200
django-reversion (2.0.9-1) unstable; urgency=low
* New upstream release.
* Bump Standards-Version to 4.0.0.
* Add patch to fix babel build isues.
-- Michael Fladischer <fladi@debian.org> Thu, 22 Jun 2017 10:10:46 +0200
django-reversion (2.0.8-1) unstable; urgency=low
* New upstream release.
* Update d/watch to match new upstream versioning scheme.
* Drop intersphinx patch as upstream no longer uses it in their
documentation.
* Adapt d/rules to new upstream source layout.
* Add python(3)-mock to Build-Depends as they are required to run the
tests.
* Change name of upstream changelog to CHANGELOG.rst.
* Use https:// for copyright-format 1.0 URL.
-- Michael Fladischer <fladi@debian.org> Tue, 29 Nov 2016 23:05:36 +0100
django-reversion (1.10.2-1) unstable; urgency=low
[ Ondřej Nový ]
* Fixed VCS URL (https)
[ Michael Fladischer ]
* New upstream release.
* Switch to python3-sphinx and drop versioned Build-Depends.
* Bump Standards-Version to 3.9.8.
-- Michael Fladischer <fladi@debian.org> Fri, 22 Apr 2016 22:36:16 +0200
django-reversion (1.10.0-1) unstable; urgency=low
[ Michael Fladischer ]
* New upstream release.
* Update Source filed in d/copyright to point to github repository.
* CHANGELOG.rst has been renamed to CHANGELOG.md.
[ SVN-Git Migration ]
* git-dpm config
* Update Vcs fields for git migration
-- Michael Fladischer <fladi@debian.org> Fri, 04 Dec 2015 17:22:55 +0100
django-reversion (1.9.3-1) unstable; urgency=low
* New upstream release.
* Use pybuild to execute tests.
* Add python(3)-setuptools to Build-Depends.
* Clean metadata files to allow two builds in a row.
* Bump debhelper compatibility level to 9.
-- Michael Fladischer <fladi@debian.org> Tue, 11 Aug 2015 09:31:12 +0200
django-reversion (1.8.7-1) unstable; urgency=medium
* New upstream release.
-- Michael Fladischer <fladi@debian.org> Tue, 02 Jun 2015 08:38:51 +0200
django-reversion (1.8.6-1) unstable; urgency=medium
* New upstream release.
* Add intersphinx.patch to use local Python objects.inv for
documentation.
* Drop unnecessary versioned dependency on python3-django.
* Change my email address to fladi@debian.org.
-- Michael Fladischer <fladi@debian.org> Tue, 19 May 2015 10:32:11 +0200
django-reversion (1.8.4-1) unstable; urgency=medium
* New upstream release (Closes: #755612).
* Add dh-python to Build-Depends.
* Switch buildsystem to pybuild.
* Remove superfluous install file.
* Add Python3 support.
* Bump Build-Depends and Depends for python(3)-django to (>= 1.7).
* Bump Standards-Version to 3.9.6.
* Fix the way upstream tests are run during build.
* Add lintian override for missing PGP signature on upstream tarballs.
* Remove PHONY target declarations in d/rules.
-- Michael Fladischer <FladischerMichael@fladi.at> Mon, 22 Sep 2014 08:32:54 +0200
django-reversion (1.8-2) unstable; urgency=low
* Use correct BSD-3-clause license in d/copyright.
-- Michael Fladischer <FladischerMichael@fladi.at> Fri, 22 Nov 2013 07:27:22 +0100
django-reversion (1.8-1) unstable; urgency=low
* New upstream release.
* Bump django to >= 1.6 in Depends and Build-Depends.
* Bump Standards version to 3.9.5.
* Add a spearate package for the upstream documentation.
+ Add python-sphinx (>= 1.0.7+dfsg) to Build-Depends.
+ Load sphinxdoc addon for debhelper.
+ Build documentation with sphinx.
+ Clean up documentation after build.
+ Suggest python-django-reversion-doc from python-django-reversion
package.
* Change upstream changelog name to CHANGELOG.rst.
* Change upstream readme name to README.rst.
-- Michael Fladischer <FladischerMichael@fladi.at> Thu, 07 Nov 2013 13:07:55 +0100
django-reversion (1.7.1-1) unstable; urgency=low
* New upstream release (Closes: #702080).
* Bump Depends and Build-Depends on python-django to >= 1.5.
* Bump Standards version to 3.9.4.
* Bump Build-Depends on debhelper to >= 8.1.0 to satisfy build-arch
and build-indep targets.
* Change python-pybabel to python-babel in Build-Depends.
* Drop versioned Build-Depends on python-all as no prior versions are
available in Wheezy.
* Update homepage URL in d/control (Closes: #702078).
* Remove testproject directory to allow two builds in a row.
-- Michael Fladischer <FladischerMichael@fladi.at> Mon, 04 Nov 2013 14:34:46 +0100
django-reversion (1.6.6-1) unstable; urgency=low
[ Michael Fladischer ]
* New upstream release.
* Use github tags directly in d/watch.
* Run tests with django-admin and manage.py.
* Bump dependency on django to >= 1.4.4.
* Drop temporary fix for PKG-INFO.
* Update years in d/copyright.
[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.
-- Michael Fladischer <FladischerMichael@fladi.at> Thu, 24 Jan 2013 07:54:56 +0100
django-reversion (1.6-1) unstable; urgency=low
* New upstream release.
* Bump Standards-Version to 3.9.3.
* Update years in d/copyright.
* Update DEP-5 URL to 1.0.
* Increase dependency on python-django to >= 1.4.
* Add python-django-south to B-D and Recommends.
* Drop our own test project and use the one shipped by upstream.
* Add 'set -e' to for loop in override_dh_auto_build.
* Fix indent in d/copyright.
* Remove d/s/local-options.
-- Michael Fladischer <FladischerMichael@fladi.at> Thu, 05 Apr 2012 07:30:17 +0200
django-reversion (1.5.1-1) unstable; urgency=low
* New upstream release.
* Set PMPT as maintainer and myself as uploader.
* Build .mo i18n files during build.
* Use DEP5 for copyright file.
* Drop debian/pyversions in favour of XS-Python-Version.
* Update debian/watch to use http://githubredir.debian.net/.
* Bumped Standards-Version to 3.9.2 (no change necessary).
* Include upstream changelog.
* Simplify debian/rules by using a static settings.py.
* Update settings.py to Django-1.3 DATABASES format.
* Bumped python-django dependency to (>= 1.3).
* Add local-options to debian/source.
* Streamlined files in debian/ with `wrap-and-sort`.
* README has been renamed to README.markdown.
* Update format URL in d/copyright.
* Change order of my name.
* Switch to dh_python2.
* Temporary fix for Metadata-Version in django_reversion-1.5.1.egg-
info.
-- Michael Fladischer <FladischerMichael@fladi.at> Wed, 28 Dec 2011 22:01:29 +0100
django-reversion (1.3.1-2) unstable; urgency=low
* Update to Debian policy 3.9.0.
-- Fladischer Michael <FladischerMichael@fladi.at> Mon, 05 Jul 2010 12:54:45 +0200
django-reversion (1.3.1-1) unstable; urgency=low
* Initial release (Closes: #581926)
-- Fladischer Michael <FladischerMichael@fladi.at> Mon, 17 May 2010 10:53:38 +0200

7
clean Normal file
View File

@ -0,0 +1,7 @@
reversion/locale/*/LC_MESSAGES/django.mo
django_reversion.egg-info/PKG-INFO
django_reversion.egg-info/SOURCES.txt
django_reversion.egg-info/dependency_links.txt
django_reversion.egg-info/not-zip-safe
django_reversion.egg-info/requires.txt
django_reversion.egg-info/top_level.txt

1
compat Normal file
View File

@ -0,0 +1 @@
9

95
control Normal file
View File

@ -0,0 +1,95 @@
Source: django-reversion
Section: python
Priority: optional
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Uploaders:
Michael Fladischer <fladi@debian.org>,
Build-Depends:
debhelper (>= 9),
dh-python,
python-all,
python-babel,
python-django (>= 1.7),
python-mock,
python-setuptools,
python3-all,
python3-babel,
python3-django,
python3-mock,
python3-setuptools,
python3-sphinx,
Standards-Version: 4.1.1
X-Python-Version: >= 2.5
X-Python3-Version: >= 3.2
Homepage: https://github.com/etianen/django-reversion
Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/django-reversion.git
Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/django-reversion.git
Testsuite: autopkgtest-pkg-python
Package: python-django-reversion
Architecture: all
Depends:
python-django (>= 1.7),
${misc:Depends},
${python:Depends},
Suggests:
python-django-reversion-doc,
Description: Provides comprehensive version control facilities for Django
Reversion is an extension to the Django web framework that provides
comprehensive version control facilities.
.
Features:
* Roll back to any point in a model's history - an unlimited undo facility!
* Recover deleted models - never lose data again!
* Admin integration for maximum usability.
* Group related changes into revisions that can be rolled back in a single
transaction.
* Automatically save a new version whenever your model changes using Django's
flexible signalling framework.
* Automate your revision management with easy-to-use middleware.
Package: python-django-reversion-doc
Section: doc
Architecture: all
Depends:
${misc:Depends},
${sphinxdoc:Depends},
Description: Provides comprehensive version control facilities for Django (Documentation)
Reversion is an extension to the Django web framework that provides
comprehensive version control facilities.
.
Features:
* Roll back to any point in a model's history - an unlimited undo facility!
* Recover deleted models - never lose data again!
* Admin integration for maximum usability.
* Group related changes into revisions that can be rolled back in a single
transaction.
* Automatically save a new version whenever your model changes using Django's
flexible signalling framework.
* Automate your revision management with easy-to-use middleware.
.
This package contains the documentation.
Package: python3-django-reversion
Architecture: all
Depends:
python3-django,
${misc:Depends},
${python3:Depends},
Suggests:
python-django-reversion-doc,
Description: Provides comprehensive version control facilities for Django (Python3 version)
Reversion is an extension to the Django web framework that provides
comprehensive version control facilities.
.
Features:
* Roll back to any point in a model's history - an unlimited undo facility!
* Recover deleted models - never lose data again!
* Admin integration for maximum usability.
* Group related changes into revisions that can be rolled back in a single
transaction.
* Automatically save a new version whenever your model changes using Django's
flexible signalling framework.
* Automate your revision management with easy-to-use middleware.
.
This package contains the Python 3 version of the library.

38
copyright Normal file
View File

@ -0,0 +1,38 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: django-reversion
Upstream-Contact: David Hall <david@etianen.com>
Source: https://github.com/etianen/django-reversion
Files: *
Copyright: 2009-2013, David Hall <david@etianen.com>
License: BSD-3-clause
Files: debian/*
Copyright: 2010-2015, Michael Fladischer <fladi@debian.org>
License: BSD-3-clause
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
.
2. 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.
.
3. Neither the name of David Hall 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 THE COPYRIGHT OWNER OR CONTRIBUTORS 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.

2
gbp.conf Normal file
View File

@ -0,0 +1,2 @@
[DEFAULT]
debian-branch=debian/master

View File

@ -0,0 +1,312 @@
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Tue, 29 Nov 2016 13:34:15 +0100
Subject: Skip postgresql and mysql tests.
---
tests/test_app/tests/test_api.py | 15 +++++++++++++++
tests/test_app/tests/test_commands.py | 18 ++++++++++++++++++
tests/test_app/tests/test_models.py | 24 ++++++++++++++++++++++++
tests/test_project/settings.py | 27 +++++++++++++++++++++------
4 files changed, 78 insertions(+), 6 deletions(-)
diff --git a/tests/test_app/tests/test_api.py b/tests/test_app/tests/test_api.py
index e12b102..f2a54ee 100644
--- a/tests/test_app/tests/test_api.py
+++ b/tests/test_app/tests/test_api.py
@@ -1,3 +1,4 @@
+import unittest
from datetime import timedelta
from django.contrib.auth.models import User
from django.db import models
@@ -12,6 +13,16 @@ try:
except ImportError:
from mock import MagicMock
+try:
+ import psycopg2
+except ImportError:
+ psycopg2 = None
+
+try:
+ import MySQLdb
+except ImportError:
+ MySQLdb = None
+
class SaveTest(TestModelMixin, TestBase):
@@ -159,6 +170,8 @@ class CreateRevisionManageManuallyTest(TestModelMixin, TestBase):
class CreateRevisionDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testCreateRevisionMultiDb(self):
with reversion.create_revision(using="mysql"), reversion.create_revision(using="postgres"):
obj = TestModel.objects.create()
@@ -319,6 +332,8 @@ class AddMetaTest(TestModelMixin, TestBase):
with self.assertRaises(reversion.RevisionManagementError):
reversion.add_meta(TestMeta, name="meta v1")
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testAddMetaMultDb(self):
with reversion.create_revision(using="mysql"), reversion.create_revision(using="postgres"):
obj = TestModel.objects.create()
diff --git a/tests/test_app/tests/test_commands.py b/tests/test_app/tests/test_commands.py
index bb950ad..0cc406f 100644
--- a/tests/test_app/tests/test_commands.py
+++ b/tests/test_app/tests/test_commands.py
@@ -1,3 +1,4 @@
+import unittest
from datetime import timedelta
from django.core.management import CommandError
from django.utils import timezone
@@ -5,6 +6,16 @@ import reversion
from test_app.models import TestModel
from test_app.tests.base import TestBase, TestModelMixin
+try:
+ import psycopg2
+except ImportError:
+ psycopg2 = None
+
+try:
+ import MySQLdb
+except ImportError:
+ MySQLdb = None
+
class CreateInitialRevisionsTest(TestModelMixin, TestBase):
@@ -52,12 +63,14 @@ class CreateInitialRevisionsAppLabelTest(TestModelMixin, TestBase):
class CreateInitialRevisionsDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testCreateInitialRevisionsDb(self):
obj = TestModel.objects.create()
self.callCommand("createinitialrevisions", using="postgres")
self.assertNoRevision()
self.assertSingleRevision((obj,), comment="Initial version.", using="postgres")
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testCreateInitialRevisionsDbMySql(self):
obj = TestModel.objects.create()
self.callCommand("createinitialrevisions", using="mysql")
@@ -67,6 +80,7 @@ class CreateInitialRevisionsDbTest(TestModelMixin, TestBase):
class CreateInitialRevisionsModelDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testCreateInitialRevisionsModelDb(self):
obj = TestModel.objects.db_manager("postgres").create()
self.callCommand("createinitialrevisions", model_db="postgres")
@@ -125,18 +139,21 @@ class DeleteRevisionsAppLabelTest(TestModelMixin, TestBase):
class DeleteRevisionsDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testDeleteRevisionsDb(self):
with reversion.create_revision(using="postgres"):
TestModel.objects.create()
self.callCommand("deleterevisions", using="postgres")
self.assertNoRevision(using="postgres")
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testDeleteRevisionsDbMySql(self):
with reversion.create_revision(using="mysql"):
TestModel.objects.create()
self.callCommand("deleterevisions", using="mysql")
self.assertNoRevision(using="mysql")
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testDeleteRevisionsDbNoMatch(self):
with reversion.create_revision():
obj = TestModel.objects.create()
@@ -146,6 +163,7 @@ class DeleteRevisionsDbTest(TestModelMixin, TestBase):
class DeleteRevisionsModelDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testDeleteRevisionsModelDb(self):
with reversion.create_revision():
TestModel.objects.db_manager("postgres").create()
diff --git a/tests/test_app/tests/test_models.py b/tests/test_app/tests/test_models.py
index 80f893d..04ca1aa 100644
--- a/tests/test_app/tests/test_models.py
+++ b/tests/test_app/tests/test_models.py
@@ -1,9 +1,20 @@
+import unittest
from django.utils.encoding import force_text
import reversion
from reversion.models import Version
from test_app.models import TestModel, TestModelRelated, TestModelParent
from test_app.tests.base import TestBase, TestModelMixin, TestModelParentMixin
+try:
+ import psycopg2
+except ImportError:
+ psycopg2 = None
+
+try:
+ import MySQLdb
+except ImportError:
+ MySQLdb = None
+
class GetForModelTest(TestModelMixin, TestBase):
@@ -15,11 +26,13 @@ class GetForModelTest(TestModelMixin, TestBase):
class GetForModelDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testGetForModelDb(self):
with reversion.create_revision(using="postgres"):
obj = TestModel.objects.create()
self.assertEqual(Version.objects.using("postgres").get_for_model(obj.__class__).count(), 1)
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testGetForModelDbMySql(self):
with reversion.create_revision(using="mysql"):
obj = TestModel.objects.create()
@@ -57,12 +70,14 @@ class GetForObjectTest(TestModelMixin, TestBase):
class GetForObjectDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testGetForObjectDb(self):
with reversion.create_revision(using="postgres"):
obj = TestModel.objects.create()
self.assertEqual(Version.objects.get_for_object(obj).count(), 0)
self.assertEqual(Version.objects.using("postgres").get_for_object(obj).count(), 1)
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testGetForObjectDbMySql(self):
with reversion.create_revision(using="mysql"):
obj = TestModel.objects.create()
@@ -72,6 +87,7 @@ class GetForObjectDbTest(TestModelMixin, TestBase):
class GetForObjectModelDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testGetForObjectModelDb(self):
with reversion.create_revision():
obj = TestModel.objects.db_manager("postgres").create()
@@ -128,6 +144,7 @@ class GetForObjectReferenceTest(TestModelMixin, TestBase):
class GetForObjectReferenceDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testGetForObjectReferenceModelDb(self):
with reversion.create_revision(using="postgres"):
obj = TestModel.objects.create()
@@ -137,12 +154,14 @@ class GetForObjectReferenceDbTest(TestModelMixin, TestBase):
class GetForObjectReferenceModelDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testGetForObjectReferenceModelDb(self):
with reversion.create_revision():
obj = TestModel.objects.db_manager("postgres").create()
self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk).count(), 0)
self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk, model_db="postgres").count(), 1)
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testGetForObjectReferenceModelDbMySql(self):
with reversion.create_revision():
obj = TestModel.objects.db_manager("mysql").create()
@@ -177,6 +196,7 @@ class GetDeletedTest(TestModelMixin, TestBase):
self.assertEqual(Version.objects.get_deleted(TestModel)[0].object_id, force_text(pk_2))
self.assertEqual(Version.objects.get_deleted(TestModel)[1].object_id, force_text(pk_1))
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testGetDeletedPostgres(self):
with reversion.create_revision(using="postgres"):
obj = TestModel.objects.using("postgres").create()
@@ -185,6 +205,7 @@ class GetDeletedTest(TestModelMixin, TestBase):
obj.delete()
self.assertEqual(Version.objects.using("postgres").get_deleted(TestModel, model_db="postgres").count(), 1)
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testGetDeletedMySQL(self):
with reversion.create_revision(using="mysql"):
obj = TestModel.objects.using("mysql").create()
@@ -196,6 +217,7 @@ class GetDeletedTest(TestModelMixin, TestBase):
class GetDeletedDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testGetDeletedDb(self):
with reversion.create_revision(using="postgres"):
obj = TestModel.objects.create()
@@ -203,6 +225,7 @@ class GetDeletedDbTest(TestModelMixin, TestBase):
self.assertEqual(Version.objects.get_deleted(TestModel).count(), 0)
self.assertEqual(Version.objects.using("postgres").get_deleted(TestModel).count(), 1)
+ @unittest.skipIf(not MySQLdb, "MySQLdb not installed")
def testGetDeletedDbMySql(self):
with reversion.create_revision(using="mysql"):
obj = TestModel.objects.create()
@@ -213,6 +236,7 @@ class GetDeletedDbTest(TestModelMixin, TestBase):
class GetDeletedModelDbTest(TestModelMixin, TestBase):
+ @unittest.skipIf(not psycopg2, "psycopg2 not installed")
def testGetDeletedModelDb(self):
with reversion.create_revision():
obj = TestModel.objects.db_manager("postgres").create()
diff --git a/tests/test_project/settings.py b/tests/test_project/settings.py
index 2df52e2..79191fb 100644
--- a/tests/test_project/settings.py
+++ b/tests/test_project/settings.py
@@ -13,6 +13,17 @@ https://docs.djangoproject.com/en/dev/ref/settings/
import os
import getpass
+try:
+ import psycopg2
+except ImportError:
+ psycopg2 = None
+
+try:
+ import MySQLdb
+except ImportError:
+ MySQLdb = None
+
+
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -80,20 +91,24 @@ DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
- },
- "postgres": {
+ }
+}
+
+if psycopg2:
+ DATABASES["postgres"] = {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": os.environ.get("DJANGO_DATABASE_NAME_POSTGRES", "test_project"),
"USER": os.environ.get("DJANGO_DATABASE_USER_POSTGRES", getpass.getuser()),
"PASSWORD": os.environ.get("DJANGO_DATABASE_PASSWORD_POSTGRES", ""),
- },
- "mysql": {
+ }
+
+if MySQLdb:
+ DATABASES["mysql"] = {
"ENGINE": "django.db.backends.mysql",
"NAME": os.environ.get("DJANGO_DATABASE_NAME_MYSQL", "test_project"),
"USER": os.environ.get("DJANGO_DATABASE_USER_MYSQL", getpass.getuser()),
"PASSWORD": os.environ.get("DJANGO_DATABASE_PASSWORD_MYSQL", ""),
- },
-}
+ }
# Password validation

View File

@ -0,0 +1,184 @@
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Thu, 22 Jun 2017 10:06:02 +0200
Subject: Set missing Language property on catalogs.
This prevents babel from failing to compile during build.
---
reversion/locale/ar/LC_MESSAGES/django.po | 2 +-
reversion/locale/cs/LC_MESSAGES/django.po | 1 +
reversion/locale/da/LC_MESSAGES/django.po | 2 +-
reversion/locale/de/LC_MESSAGES/django.po | 1 +
reversion/locale/he/LC_MESSAGES/django.po | 1 +
reversion/locale/it/LC_MESSAGES/django.po | 1 +
reversion/locale/nb/LC_MESSAGES/django.po | 2 +-
reversion/locale/pt_BR/LC_MESSAGES/django.po | 1 +
reversion/locale/ru/LC_MESSAGES/django.po | 1 +
reversion/locale/sk/LC_MESSAGES/django.po | 2 +-
reversion/locale/sv/LC_MESSAGES/django.po | 2 +-
reversion/locale/zh_CN/LC_MESSAGES/django.po | 2 +-
reversion/locale/zh_Hans/LC_MESSAGES/django.po | 2 +-
13 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/reversion/locale/ar/LC_MESSAGES/django.po b/reversion/locale/ar/LC_MESSAGES/django.po
index 07ebf72..7213596 100644
--- a/reversion/locale/ar/LC_MESSAGES/django.po
+++ b/reversion/locale/ar/LC_MESSAGES/django.po
@@ -11,7 +11,7 @@ msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/cs/LC_MESSAGES/django.po b/reversion/locale/cs/LC_MESSAGES/django.po
index 94bc354..95497d5 100644
--- a/reversion/locale/cs/LC_MESSAGES/django.po
+++ b/reversion/locale/cs/LC_MESSAGES/django.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/da/LC_MESSAGES/django.po b/reversion/locale/da/LC_MESSAGES/django.po
index 074b908..bcae256 100644
--- a/reversion/locale/da/LC_MESSAGES/django.po
+++ b/reversion/locale/da/LC_MESSAGES/django.po
@@ -12,7 +12,7 @@ msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/de/LC_MESSAGES/django.po b/reversion/locale/de/LC_MESSAGES/django.po
index dee2e8f..adaed4e 100644
--- a/reversion/locale/de/LC_MESSAGES/django.po
+++ b/reversion/locale/de/LC_MESSAGES/django.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2009-02-03 08:41+0100\n"
"Last-Translator: Jannis Leidel <jannis@leidel.info>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/he/LC_MESSAGES/django.po b/reversion/locale/he/LC_MESSAGES/django.po
index 3624f02..a346736 100644
--- a/reversion/locale/he/LC_MESSAGES/django.po
+++ b/reversion/locale/he/LC_MESSAGES/django.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2009-12-10 10:45+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: he\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/it/LC_MESSAGES/django.po b/reversion/locale/it/LC_MESSAGES/django.po
index 13a1526..545ee5f 100644
--- a/reversion/locale/it/LC_MESSAGES/django.po
+++ b/reversion/locale/it/LC_MESSAGES/django.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2009-08-29 13:44+0100\n"
"Last-Translator: Marco Beri <marcoberi@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/nb/LC_MESSAGES/django.po b/reversion/locale/nb/LC_MESSAGES/django.po
index 5de5ded..16a6aae 100644
--- a/reversion/locale/nb/LC_MESSAGES/django.po
+++ b/reversion/locale/nb/LC_MESSAGES/django.po
@@ -10,7 +10,7 @@ msgstr ""
"PO-Revision-Date: 2011-10-17 10:17+0100\n"
"Last-Translator: Sindre Sorhus <sindresorhus@gmail.com>\n"
"Language-Team: \n"
-"Language: \n"
+"Language: nb\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/pt_BR/LC_MESSAGES/django.po b/reversion/locale/pt_BR/LC_MESSAGES/django.po
index 76c4679..f5319d2 100644
--- a/reversion/locale/pt_BR/LC_MESSAGES/django.po
+++ b/reversion/locale/pt_BR/LC_MESSAGES/django.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2009-08-29 13:44+0100\n"
"Last-Translator: Partec <beto@tangerinalab.com>\n"
"Language-Team: Tangerina Lab <beto@tangerinalab.com>\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/ru/LC_MESSAGES/django.po b/reversion/locale/ru/LC_MESSAGES/django.po
index 68f15ca..8757d28 100644
--- a/reversion/locale/ru/LC_MESSAGES/django.po
+++ b/reversion/locale/ru/LC_MESSAGES/django.po
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2009-10-14 22:21+0300\n"
"Last-Translator: Alexander Yakovlev <ayakovlev@rambler.ru>\n"
"Language-Team: Russian <ru@li.org>\n"
+"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/sk/LC_MESSAGES/django.po b/reversion/locale/sk/LC_MESSAGES/django.po
index f6750fb..a1b7d28 100644
--- a/reversion/locale/sk/LC_MESSAGES/django.po
+++ b/reversion/locale/sk/LC_MESSAGES/django.po
@@ -12,7 +12,7 @@ msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Juraj Bubniak <translations@jbub.eu>\n"
"Language-Team: Slovak <LL@li.org>\n"
-"Language: \n"
+"Language: sk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/sv/LC_MESSAGES/django.po b/reversion/locale/sv/LC_MESSAGES/django.po
index 9e696fe..44d7955 100644
--- a/reversion/locale/sv/LC_MESSAGES/django.po
+++ b/reversion/locale/sv/LC_MESSAGES/django.po
@@ -12,7 +12,7 @@ msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/zh_CN/LC_MESSAGES/django.po b/reversion/locale/zh_CN/LC_MESSAGES/django.po
index 75e7231..567e0b8 100644
--- a/reversion/locale/zh_CN/LC_MESSAGES/django.po
+++ b/reversion/locale/zh_CN/LC_MESSAGES/django.po
@@ -12,7 +12,7 @@ msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/reversion/locale/zh_Hans/LC_MESSAGES/django.po b/reversion/locale/zh_Hans/LC_MESSAGES/django.po
index 75e7231..284f980 100644
--- a/reversion/locale/zh_Hans/LC_MESSAGES/django.po
+++ b/reversion/locale/zh_Hans/LC_MESSAGES/django.po
@@ -12,7 +12,7 @@ msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

2
patches/series Normal file
View File

@ -0,0 +1,2 @@
0001-Skip-postgresql-and-mysql-tests.patch
0002-Set-missing-Language-property-on-catalogs.patch

View File

@ -0,0 +1,8 @@
Document: python-django-reversion-doc
Title: django-reversion documentation
Author: Dave Hall <dave@etianen.com>
Section: Programming/Python
Format: HTML
Index: /usr/share/doc/python-django-reversion-doc/html/index.html
Files: /usr/share/doc/python-django-reversion-doc/html/*.html

View File

@ -0,0 +1 @@
docs/.build/html

View File

@ -0,0 +1 @@
usr/share/doc/python-django-reversion-doc/html/_sources usr/share/doc/python-django-reversion-doc/rst

View File

@ -0,0 +1 @@
README.rst

27
rules Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/make -f
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PYBUILD_NAME=django-reversion
%:
dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
override_dh_auto_test:
PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="python{version} tests/manage.py test tests" dh_auto_test
override_dh_auto_build:
set -e; \
for loc in reversion/locale/*; do \
python setup.py compile_catalog --directory reversion/locale/ --locale $$(basename $$loc) --domain django; \
done
dh_auto_build
PYTHONPATH=. sphinx-build -b html -d docs/.build/.doctrees -N docs docs/.build/html
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.rst
override_dh_clean:
dh_clean
rm -rf docs/.build

16
settings.py Normal file
View File

@ -0,0 +1,16 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'testproject/test.db3'
}
}
INSTALLED_APPS = ["reversion",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.admin",
"django.contrib.sites",
"django.contrib.sessions",
]
SITE_ID = 1
ROOT_URLCONF = "testproject.urls"
SECRET_KEY = "1"

1
source/format Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

2
source/lintian-overrides Normal file
View File

@ -0,0 +1,2 @@
# Upstream does not provide detached PGP signatures for their source tarballs.
django-reversion source: debian-watch-may-check-gpg-signature

3
watch Normal file
View File

@ -0,0 +1,3 @@
version=3
https://github.com/etianen/django-reversion/tags \
/etianen/django-reversion/archive/(?:release-|v)([\d\.]+)\.tar\.gz