Hello community,
here is the log from the commit of package python-django-guardian for
openSUSE:Factory checked in at 2019-05-06 21:17:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-guardian (Old)
and /work/SRC/openSUSE:Factory/.python-django-guardian.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-guardian"
Mon May 6 21:17:26 2019 rev:14 rq:701065 version:1.5.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-django-guardian/python-django-guardian.changes
2019-03-01 16:47:48.409790404 +0100
+++
/work/SRC/openSUSE:Factory/.python-django-guardian.new.5148/python-django-guardian.changes
2019-05-06 21:17:27.993106313 +0200
@@ -1,0 +2,7 @@
+Mon May 6 11:36:39 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.5.1:
+ * Restore compatibility with Python 2.7
+- Remove merged patch no-maxsplit.patch
+
+-------------------------------------------------------------------
Old:
----
django-guardian-1.5.0.tar.gz
no-maxsplit.patch
New:
----
django-guardian-1.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-guardian.spec ++++++
--- /var/tmp/diff_new_pack.jcDFcc/_old 2019-05-06 21:17:29.069109111 +0200
+++ /var/tmp/diff_new_pack.jcDFcc/_new 2019-05-06 21:17:29.073109122 +0200
@@ -18,14 +18,13 @@
%define pypi_package_name django-guardian
Name: python-%{pypi_package_name}
-Version: 1.5.0
+Version: 1.5.1
Release: 0
Url: http://github.com/lukaszb/django-guardian
Summary: Implementation of per object permissions for Django
License: BSD-3-Clause
Group: Development/Languages/Python
Source:
https://pypi.python.org/packages/source/d/django-guardian/django-guardian-%{version}.tar.gz
-Patch0: no-maxsplit.patch
BuildRequires: %{python_module Django >= 1.8}
BuildRequires: %{python_module django-environ}
BuildRequires: %{python_module mock}
@@ -44,7 +43,6 @@
%prep
%setup -q -n django-guardian-%{version}
-%patch0 -p1
%build
%python_build
++++++ django-guardian-1.5.0.tar.gz -> django-guardian-1.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-guardian-1.5.0/CHANGES
new/django-guardian-1.5.1/CHANGES
--- old/django-guardian-1.5.0/CHANGES 2019-01-31 12:18:26.000000000 +0100
+++ new/django-guardian-1.5.1/CHANGES 2019-05-02 11:57:04.000000000 +0200
@@ -1,7 +1,15 @@
+Release 1.5.1 (May 2, 2019)
+==========================
+
+* Restore compatibility with Python 2.7
+
+.. important::
+ The 1.5.x release line will be the last one that has support
for Python 2.7.
+
Release 1.5.0 (Jan 31, 2019)
==========================
-* Updates for compatibility with latest Python and Django versions.
+* Updates for compatibility with latest Python and Django versions.
Release 1.4.9 (Jul 01, 2017)
============================
@@ -50,7 +58,7 @@
* Moved queryset support in remove_perms to its own function
* Consolidated {User,Group}ObjectPermissionManager, move logic of bulk_*_perm
to managers
-* `assign_perm` and `remove_perm` shortcuts accept `Permission`
+* `assign_perm` and `remove_perm` shortcuts accept `Permission`
instance as `perm` and `QuerySet` as `obj` too.
* Consolidated bulk_assign_perm to assign_perm and bulk_remove_perm to
remove_perm
* Upgraded Grappelli templates breadcrumbs block to new Django 1.9 and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-guardian-1.5.0/PKG-INFO
new/django-guardian-1.5.1/PKG-INFO
--- old/django-guardian-1.5.0/PKG-INFO 2019-01-31 12:27:43.000000000 +0100
+++ new/django-guardian-1.5.1/PKG-INFO 2019-05-02 11:59:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-guardian
-Version: 1.5.0
+Version: 1.5.1
Summary: Implementation of per object permissions for Django.
Home-page: http://github.com/django-guardian/django-guardian
Author: Lukasz Balcerzak
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-guardian-1.5.0/django_guardian.egg-info/PKG-INFO
new/django-guardian-1.5.1/django_guardian.egg-info/PKG-INFO
--- old/django-guardian-1.5.0/django_guardian.egg-info/PKG-INFO 2019-01-31
12:27:43.000000000 +0100
+++ new/django-guardian-1.5.1/django_guardian.egg-info/PKG-INFO 2019-05-02
11:59:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-guardian
-Version: 1.5.0
+Version: 1.5.1
Summary: Implementation of per object permissions for Django.
Home-page: http://github.com/django-guardian/django-guardian
Author: Lukasz Balcerzak
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-guardian-1.5.0/docs/userguide/admin-integration.rst
new/django-guardian-1.5.1/docs/userguide/admin-integration.rst
--- old/django-guardian-1.5.0/docs/userguide/admin-integration.rst
2017-11-28 19:20:27.000000000 +0100
+++ new/django-guardian-1.5.1/docs/userguide/admin-integration.rst
2019-05-02 11:55:11.000000000 +0200
@@ -33,7 +33,7 @@
class Meta:
permissions = (
- ('view_post', 'Can view post'),
+ ('hide_post', 'Can hide post'),
)
get_latest_by = 'created_at'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-guardian-1.5.0/docs/userguide/assign.rst
new/django-guardian-1.5.1/docs/userguide/assign.rst
--- old/django-guardian-1.5.0/docs/userguide/assign.rst 2017-11-28
19:20:27.000000000 +0100
+++ new/django-guardian-1.5.1/docs/userguide/assign.rst 2019-05-02
11:55:11.000000000 +0200
@@ -19,7 +19,7 @@
reported_by = models.ForeignKey(User, on_delete=models.CASCADE)
created_at = models.DateTimeField(auto_now_add=True)
-... and we want to be able to set custom permission *view_task*. We let Django
+... and we want to be able to set custom permission *assign_task*. We let
Django
know to do so by adding ``permissions`` tuple to ``Meta`` class and our final
model could look like:
@@ -33,11 +33,11 @@
class Meta:
permissions = (
- ('view_task', 'View task'),
+ ('assign_task', 'Assign task'),
)
After we call management commands ``makemigrations`` and ``migrate``
-our *view_task* permission would be added to default set of permissions.
+our *assign_task* permission would be added to default set of permissions.
.. note::
By default, Django adds 3 permissions for each registered model:
@@ -45,11 +45,17 @@
- *add_modelname*
- *change_modelname*
- *delete_modelname*
+ - *view_modelname* (since Django 2.1)
(where *modelname* is a simplified name of our model's class). See
https://docs.djangoproject.com/en/dev/topics/auth/default/#default-permissions
for
more detail.
+.. note::
+ When upgrading to Django 2.1 custom created *view_modelname* permissions
+ clash with the newly built-in ones. The simplest way to fix this is to
+ add ``default_permissions = ('add', 'change', 'delete')`` to ``Meta``.
+
There is nothing new here since creation of permissions is
`handled by django <http://docs.djangoproject.com/en/1.2/topics/auth/#id1>`_.
Now we can move to :ref:`assigning object permissions <assign-obj-perms>`.
@@ -65,7 +71,7 @@
For user
~~~~~~~~
-Continuing our example we now can allow Joe user to view some task:
+Continuing our example we now can allow Joe user to assign some task:
.. code-block:: python
@@ -73,7 +79,7 @@
>>> boss = User.objects.create(username='Big Boss')
>>> joe = User.objects.create(username='joe')
>>> task = Task.objects.create(summary='Some job', content='',
reported_by=boss)
- >>> joe.has_perm('view_task', task)
+ >>> joe.has_perm('assign_task', task)
False
Well, not so fast Joe, let us create an object permission finally:
@@ -81,8 +87,8 @@
.. code-block:: python
>>> from guardian.shortcuts import assign_perm
- >>> assign_perm('view_task', joe, task)
- >>> joe.has_perm('view_task', task)
+ >>> assign_perm('assign_task', joe, task)
+ >>> joe.has_perm('assign_task', task)
True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-guardian-1.5.0/guardian/__init__.py
new/django-guardian-1.5.1/guardian/__init__.py
--- old/django-guardian-1.5.0/guardian/__init__.py 2019-01-31
12:19:15.000000000 +0100
+++ new/django-guardian-1.5.1/guardian/__init__.py 2019-05-02
11:57:50.000000000 +0200
@@ -7,7 +7,7 @@
default_app_config = 'guardian.apps.GuardianConfig'
# PEP 396: The __version__ attribute's value SHOULD be a string.
-__version__ = '1.5.0'
+__version__ = '1.5.1'
# Compatibility to eg. django-rest-framework
VERSION = tuple(int(x) for x in __version__.split('.')[:3])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-guardian-1.5.0/guardian/backends.py
new/django-guardian-1.5.1/guardian/backends.py
--- old/django-guardian-1.5.0/guardian/backends.py 2019-01-31
12:18:26.000000000 +0100
+++ new/django-guardian-1.5.1/guardian/backends.py 2019-05-02
11:55:11.000000000 +0200
@@ -82,7 +82,7 @@
return False
if '.' in perm:
- app_label, _ = perm.split('.', maxsplit=1)
+ app_label, _ = perm.split('.', 1)
if app_label != obj._meta.app_label:
# Check the content_type app_label when permission
# and obj app labels don't match.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-guardian-1.5.0/guardian/core.py
new/django-guardian-1.5.1/guardian/core.py
--- old/django-guardian-1.5.0/guardian/core.py 2019-01-31 12:18:26.000000000
+0100
+++ new/django-guardian-1.5.1/guardian/core.py 2019-05-02 11:55:11.000000000
+0200
@@ -74,7 +74,7 @@
elif self.user and self.user.is_superuser:
return True
if '.' in perm:
- _, perm = perm.split('.', maxsplit=1)
+ _, perm = perm.split('.', 1)
return perm in self.get_perms(obj)
def get_group_filters(self, obj):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-guardian-1.5.0/setup.cfg
new/django-guardian-1.5.1/setup.cfg
--- old/django-guardian-1.5.0/setup.cfg 2019-01-31 12:27:43.000000000 +0100
+++ new/django-guardian-1.5.1/setup.cfg 2019-05-02 11:59:12.000000000 +0200
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 1.5.0
+current_version = 1.5.1
[build_sphinx]
source-dir = docs/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-guardian-1.5.0/setup.py
new/django-guardian-1.5.1/setup.py
--- old/django-guardian-1.5.0/setup.py 2019-01-31 12:20:15.000000000 +0100
+++ new/django-guardian-1.5.1/setup.py 2019-05-02 11:57:50.000000000 +0200
@@ -3,7 +3,7 @@
from extras import RunFlakesCommand
-version = '1.5.0'
+version = '1.5.1'
readme_file = os.path.join(os.path.dirname(__file__), 'README.rst')
with open(readme_file, 'r') as f: