Hello community,
here is the log from the commit of package python-django-reversion for
openSUSE:Factory checked in at 2019-05-22 15:41:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-reversion (Old)
and /work/SRC/openSUSE:Factory/.python-django-reversion.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-reversion"
Wed May 22 15:41:21 2019 rev:10 rq:704709 version:3.0.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-django-reversion/python-django-reversion.changes
2019-05-05 21:22:12.581406368 +0200
+++
/work/SRC/openSUSE:Factory/.python-django-reversion.new.5148/python-django-reversion.changes
2019-05-22 15:42:08.482427028 +0200
@@ -1,0 +2,7 @@
+Wed May 22 10:51:51 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 3.0.4:
+ * Various dependency fixes
+- Upstreamed 0000-Remove-django.contrib.admin-dependency.patch
+
+-------------------------------------------------------------------
Old:
----
0000-Remove-django.contrib.admin-dependency.patch
django-reversion-3.0.3.tar.gz
New:
----
django-reversion-3.0.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-reversion.spec ++++++
--- /var/tmp/diff_new_pack.YDYylW/_old 2019-05-22 15:42:09.706427022 +0200
+++ /var/tmp/diff_new_pack.YDYylW/_new 2019-05-22 15:42:09.714427022 +0200
@@ -18,15 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-django-reversion
-Version: 3.0.3
+Version: 3.0.4
Release: 0
Summary: A Django extension that provides version control for model
instances
License: BSD-3-Clause
Group: Development/Languages/Python
URL: http://github.com/etianen/django-reversion
Source:
https://files.pythonhosted.org/packages/source/d/django-reversion/django-reversion-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM - 0000-Remove-django.contrib.admin-dependency.patch --
https://github.com/etianen/django-reversion/issues/744
-Patch0: 0000-Remove-django.contrib.admin-dependency.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -46,7 +44,6 @@
%prep
%setup -q -n django-reversion-%{version}
-%autopatch -p1
%build
%python_build
++++++ django-reversion-3.0.3.tar.gz -> django-reversion-3.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-reversion-3.0.3/CHANGELOG.rst
new/django-reversion-3.0.4/CHANGELOG.rst
--- old/django-reversion-3.0.3/CHANGELOG.rst 2019-01-24 11:20:24.000000000
+0100
+++ new/django-reversion-3.0.4/CHANGELOG.rst 2019-05-22 10:39:00.000000000
+0200
@@ -3,6 +3,14 @@
django-reversion changelog
==========================
+3.0.4 - 22/05/2019
+------------------
+
+- Remove `django.contrib.admin` dependency from django-reversion (Aitor Ruano).
+- README refactor (@rhenter).
+- Testing against Django 2.2 (@claudep).
+
+
3.0.3 - 24/01/2019
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-reversion-3.0.3/PKG-INFO
new/django-reversion-3.0.4/PKG-INFO
--- old/django-reversion-3.0.3/PKG-INFO 2019-01-24 11:21:11.000000000 +0100
+++ new/django-reversion-3.0.4/PKG-INFO 2019-05-22 10:39:50.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-reversion
-Version: 3.0.3
+Version: 3.0.4
Summary: An extension to the Django web framework that provides version
control for model instances.
Home-page: http://github.com/etianen/django-reversion
Author: Dave Hall
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-reversion-3.0.3/README.rst
new/django-reversion-3.0.4/README.rst
--- old/django-reversion-3.0.3/README.rst 2019-01-24 11:20:24.000000000
+0100
+++ new/django-reversion-3.0.4/README.rst 2019-05-22 10:39:00.000000000
+0200
@@ -1,22 +1,31 @@
+================
django-reversion
================
+|PyPI latest| |PyPI Version| |PyPI License| |TravisCI| |Docs|
+
+
**django-reversion** is an extension to the Django web framework that provides
version control for model instances.
+Requirements
+============
+
+- Python 2.7 or later
+- Django 1.11 or later
+
Features
---------
+========
- Roll back to any point in a model instance's history.
- Recover deleted model instances.
- Simple admin integration.
-
Documentation
--------------
+=============
+
+Check out the latest ``django-reversion`` documentation at `Getting Started
<http://django-reversion.readthedocs.io/>`_
-Please read the `Getting Started <https://django-reversion.readthedocs.io/>`_
-guide for more information.
Issue tracking and source code can be found at the
`main project website <http://github.com/etianen/django-reversion>`_.
@@ -24,37 +33,49 @@
You can keep up to date with the latest announcements by joining the
`django-reversion discussion group
<http://groups.google.com/group/django-reversion>`_.
-
Upgrading
----------
+=========
Please check the `Changelog
<https://github.com/etianen/django-reversion/blob/master/CHANGELOG.rst>`_
before upgrading
your installation of django-reversion.
-
Contributing
-------------
+============
Bug reports, bug fixes, and new features are always welcome. Please raise
issues on the
`django-reversion project site <http://github.com/etianen/django-reversion>`_,
and submit
pull requests for any new code.
-You can run the test suite yourself from within a virtual environment with the
following
-commands. The test suite requires that both MySQL and PostgreSQL be installed.
+1. Fork the `repository <http://github.com/etianen/django-reversion>`_ on
GitHub.
+2. Make a branch off of master and commit your changes to it.
+3. Install requirements.
.. code:: bash
- pip install psycopg2 mysqlclient -e .
- tests/manage.py test tests
+ $ pip install django psycopg2 mysqlclient -e .
+
+4. Run the tests
-The django-reversion project is built on every push with `Travis CI
<https://travis-ci.org/etianen/django-reversion>`_.
+.. code:: bash
-.. image:: https://travis-ci.org/etianen/django-reversion.svg?branch=master
- :target: https://travis-ci.org/etianen/django-reversion
+ $ tests/manage.py test tests
+5. Create a Pull Request with your contribution
Contributors
-------------
+============
The django-reversion project was developed by `Dave Hall
<http://www.etianen.com/>`_ and contributed
to by `many other people
<https://github.com/etianen/django-reversion/graphs/contributors>`_.
+
+
+.. |Docs| image::
https://readthedocs.org/projects/django-reversion/badge/?version=latest
+ :target: http://django-reversion.readthedocs.org/en/latest/?badge=latest
+.. |PyPI Version| image::
https://img.shields.io/pypi/pyversions/django-reversion.svg?maxAge=60
+ :target: https://pypi.python.org/pypi/django-reversion
+.. |PyPI License| image::
https://img.shields.io/pypi/l/django-reversion.svg?maxAge=120
+ :target: https://github.com/rhenter/django-reversion/blob/master/LICENSE
+.. |PyPI latest| image::
https://img.shields.io/pypi/v/django-reversion.svg?maxAge=120
+ :target: https://pypi.python.org/pypi/django-reversion
+.. |TravisCI| image::
https://travis-ci.org/etianen/django-reversion.svg?branch=master
+ :target: https://travis-ci.org/etianen/django-reversion
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-reversion-3.0.3/django_reversion.egg-info/PKG-INFO
new/django-reversion-3.0.4/django_reversion.egg-info/PKG-INFO
--- old/django-reversion-3.0.3/django_reversion.egg-info/PKG-INFO
2019-01-24 11:21:11.000000000 +0100
+++ new/django-reversion-3.0.4/django_reversion.egg-info/PKG-INFO
2019-05-22 10:39:50.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-reversion
-Version: 3.0.3
+Version: 3.0.4
Summary: An extension to the Django web framework that provides version
control for model instances.
Home-page: http://github.com/etianen/django-reversion
Author: Dave Hall
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-reversion-3.0.3/reversion/__init__.py
new/django-reversion-3.0.4/reversion/__init__.py
--- old/django-reversion-3.0.3/reversion/__init__.py 2019-01-24
11:20:24.000000000 +0100
+++ new/django-reversion-3.0.4/reversion/__init__.py 2019-05-22
10:39:00.000000000 +0200
@@ -36,4 +36,4 @@
get_registered_models,
)
-__version__ = VERSION = (3, 0, 3)
+__version__ = VERSION = (3, 0, 4)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-reversion-3.0.3/reversion/models.py
new/django-reversion-3.0.4/reversion/models.py
--- old/django-reversion-3.0.3/reversion/models.py 2019-01-24
11:20:24.000000000 +0100
+++ new/django-reversion-3.0.4/reversion/models.py 2019-05-22
10:39:00.000000000 +0200
@@ -1,21 +1,26 @@
from __future__ import unicode_literals
+
from collections import defaultdict
from itertools import chain, groupby
+
+from django.apps import apps
+from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
-from django.conf import settings
-from django.contrib.admin.models import LogEntry
from django.core import serializers
-from django.core.serializers.base import DeserializationError
from django.core.exceptions import ObjectDoesNotExist
-from django.db import models, IntegrityError, transaction, router, connections
+from django.core.serializers.base import DeserializationError
+from django.db import IntegrityError, connections, models, router, transaction
from django.db.models.deletion import Collector
from django.db.models.expressions import RawSQL
-from django.utils.functional import cached_property
-from django.utils.translation import ugettext_lazy as _, ugettext
from django.utils.encoding import force_text, python_2_unicode_compatible
+from django.utils.functional import cached_property
+from django.utils.translation import ugettext
+from django.utils.translation import ugettext_lazy as _
+
from reversion.errors import RevertError
-from reversion.revisions import _get_options, _get_content_type,
_follow_relations_recursive
+from reversion.revisions import (_follow_relations_recursive,
+ _get_content_type, _get_options)
def _safe_revert(versions):
@@ -61,7 +66,11 @@
)
def get_comment(self):
- return LogEntry(change_message=self.comment).get_change_message()
+ try:
+ LogEntry = apps.get_model('admin.LogEntry')
+ return LogEntry(change_message=self.comment).get_change_message()
+ except LookupError:
+ return self.comment
def revert(self, delete=False):
# Group the models by the database of the serialized model.