Hello community,

here is the log from the commit of package python-django-webtest for 
openSUSE:Factory checked in at 2019-06-17 21:34:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-webtest (Old)
 and      /work/SRC/openSUSE:Factory/.python-django-webtest.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-django-webtest"

Mon Jun 17 21:34:39 2019 rev:4 rq:710342 version:1.9.6

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-django-webtest/python-django-webtest.changes  
    2019-06-03 18:57:46.216375445 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-django-webtest.new.4811/python-django-webtest.changes
    2019-06-17 21:35:15.938998202 +0200
@@ -1,0 +2,6 @@
+Mon Jun 17 12:03:44 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.9.6:
+  * rest_framework auth class. Fixed #98 #100
+
+-------------------------------------------------------------------

Old:
----
  django-webtest-1.9.5.tar.gz

New:
----
  django-webtest-1.9.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-django-webtest.spec ++++++
--- /var/tmp/diff_new_pack.POFZQV/_old  2019-06-17 21:35:16.386998100 +0200
+++ /var/tmp/diff_new_pack.POFZQV/_new  2019-06-17 21:35:16.390998099 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-django-webtest
-Version:        1.9.5
+Version:        1.9.6
 Release:        0
 Summary:        Django integration for WebTest
 License:        MIT

++++++ django-webtest-1.9.5.tar.gz -> django-webtest-1.9.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-webtest-1.9.5/CHANGES.rst 
new/django-webtest-1.9.6/CHANGES.rst
--- old/django-webtest-1.9.5/CHANGES.rst        2019-05-31 13:37:54.000000000 
+0200
+++ new/django-webtest-1.9.6/CHANGES.rst        2019-06-07 11:29:28.000000000 
+0200
@@ -2,6 +2,12 @@
 CHANGES
 =======
 
+1.9.6 (2019-06-07)
+------------------
+
+- rest_framework auth class. Fixed #98 #100
+
+
 1.9.5 (2019-05-31)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-webtest-1.9.5/PKG-INFO 
new/django-webtest-1.9.6/PKG-INFO
--- old/django-webtest-1.9.5/PKG-INFO   2019-05-31 13:37:54.000000000 +0200
+++ new/django-webtest-1.9.6/PKG-INFO   2019-06-07 11:29:28.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: django-webtest
-Version: 1.9.5
+Version: 1.9.6
 Summary: Instant integration of Ian Bicking's WebTest 
(http://docs.pylonsproject.org/projects/webtest/) with django's testing 
framework.
 Home-page: https://github.com/django-webtest/django-webtest
 Author: Mikhail Korobov
@@ -194,6 +194,12 @@
         CHANGES
         =======
         
+        1.9.6 (2019-06-07)
+        ------------------
+        
+        - rest_framework auth class. Fixed #98 #100
+        
+        
         1.9.5 (2019-05-31)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-webtest-1.9.5/django_webtest/__init__.py 
new/django-webtest-1.9.6/django_webtest/__init__.py
--- old/django-webtest-1.9.5/django_webtest/__init__.py 2019-05-31 
13:37:54.000000000 +0200
+++ new/django-webtest-1.9.6/django_webtest/__init__.py 2019-06-07 
11:29:28.000000000 +0200
@@ -288,9 +288,17 @@
         settings.AUTHENTICATION_BACKENDS.insert(0, backend_name)
 
     def _setup_auth_class(self):
-        class_name = 'django_webtest.rest_framework.WebtestAuthentication'
-        auth_classes = 
settings.REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES']
-        auth_classes.insert(0, class_name)
+        class_name = 'django_webtest.rest_framework_auth.WebtestAuthentication'
+        drf_settings = settings.REST_FRAMEWORK
+        try:
+            classes = drf_settings['DEFAULT_AUTHENTICATION_CLASSES']
+        except KeyError:
+            classes = []
+        if class_name not in classes:
+            if isinstance(classes, tuple):
+                classes = list(classes)
+            classes.insert(0, class_name)
+            drf_settings['DEFAULT_AUTHENTICATION_CLASSES'] = classes
 
     @property
     def middleware_setting_name(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/django-webtest-1.9.5/django_webtest/rest_framework.py 
new/django-webtest-1.9.6/django_webtest/rest_framework.py
--- old/django-webtest-1.9.5/django_webtest/rest_framework.py   2019-05-31 
13:37:54.000000000 +0200
+++ new/django-webtest-1.9.6/django_webtest/rest_framework.py   1970-01-01 
01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-from django.contrib.auth import authenticate
-
-from rest_framework import authentication
-
-
-class WebtestAuthentication(authentication.BaseAuthentication):
-    """Bridge between webtest and django-rest-framework."""
-
-    header = 'WEBTEST_USER'
-
-    def authenticate(self, request):
-        value = request.META.get(self.header)
-        if value:
-            account = authenticate(django_webtest_user=value)
-            if account and account.is_active:
-                return (account, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/django-webtest-1.9.5/django_webtest/rest_framework_auth.py 
new/django-webtest-1.9.6/django_webtest/rest_framework_auth.py
--- old/django-webtest-1.9.5/django_webtest/rest_framework_auth.py      
1970-01-01 01:00:00.000000000 +0100
+++ new/django-webtest-1.9.6/django_webtest/rest_framework_auth.py      
2019-06-07 11:29:28.000000000 +0200
@@ -0,0 +1,16 @@
+from django.contrib.auth import authenticate
+
+from rest_framework import authentication
+
+
+class WebtestAuthentication(authentication.BaseAuthentication):
+    """Bridge between webtest and django-rest-framework."""
+
+    header = 'WEBTEST_USER'
+
+    def authenticate(self, request):
+        value = request.META.get(self.header)
+        if value:
+            account = authenticate(django_webtest_user=value)
+            if account and account.is_active:
+                return (account, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/django-webtest-1.9.5/django_webtest.egg-info/PKG-INFO 
new/django-webtest-1.9.6/django_webtest.egg-info/PKG-INFO
--- old/django-webtest-1.9.5/django_webtest.egg-info/PKG-INFO   2019-05-31 
13:37:54.000000000 +0200
+++ new/django-webtest-1.9.6/django_webtest.egg-info/PKG-INFO   2019-06-07 
11:29:28.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: django-webtest
-Version: 1.9.5
+Version: 1.9.6
 Summary: Instant integration of Ian Bicking's WebTest 
(http://docs.pylonsproject.org/projects/webtest/) with django's testing 
framework.
 Home-page: https://github.com/django-webtest/django-webtest
 Author: Mikhail Korobov
@@ -194,6 +194,12 @@
         CHANGES
         =======
         
+        1.9.6 (2019-06-07)
+        ------------------
+        
+        - rest_framework auth class. Fixed #98 #100
+        
+        
         1.9.5 (2019-05-31)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/django-webtest-1.9.5/django_webtest.egg-info/SOURCES.txt 
new/django-webtest-1.9.6/django_webtest.egg-info/SOURCES.txt
--- old/django-webtest-1.9.5/django_webtest.egg-info/SOURCES.txt        
2019-05-31 13:37:54.000000000 +0200
+++ new/django-webtest-1.9.6/django_webtest.egg-info/SOURCES.txt        
2019-06-07 11:29:28.000000000 +0200
@@ -12,7 +12,7 @@
 django_webtest/middleware.py
 django_webtest/pytest_plugin.py
 django_webtest/response.py
-django_webtest/rest_framework.py
+django_webtest/rest_framework_auth.py
 django_webtest.egg-info/PKG-INFO
 django_webtest.egg-info/SOURCES.txt
 django_webtest.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-webtest-1.9.5/setup.py 
new/django-webtest-1.9.6/setup.py
--- old/django-webtest-1.9.5/setup.py   2019-05-31 13:37:54.000000000 +0200
+++ new/django-webtest-1.9.6/setup.py   2019-06-07 11:29:28.000000000 +0200
@@ -4,7 +4,7 @@
 from setuptools import setup
 
 
-version = '1.9.5'
+version = '1.9.6'
 
 
 def _read(name):


Reply via email to