Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-django-extensions for 
openSUSE:Factory checked in at 2022-05-06 18:59:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-extensions (Old)
 and      /work/SRC/openSUSE:Factory/.python-django-extensions.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-django-extensions"

Fri May  6 18:59:32 2022 rev:13 rq:975280 version:3.1.5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-django-extensions/python-django-extensions.changes
        2022-01-11 21:24:01.277159358 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-django-extensions.new.1538/python-django-extensions.changes
      2022-05-06 18:59:41.761379969 +0200
@@ -1,0 +2,9 @@
+Fri May  6 05:19:17 UTC 2022 - Steve Kowalik <[email protected]>
+
+- Add patch remove-mock.patch:
+  * Use stdlib mock.
+- Remove BuildRequires on mock
+- Add patch support-werkzeug-2-1.patch:
+  * Support Werkzeug >= 2.1.0 
+
+-------------------------------------------------------------------

New:
----
  remove-mock.patch
  support-werkzeug-2-1.patch

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

Other differences:
------------------
++++++ python-django-extensions.spec ++++++
--- /var/tmp/diff_new_pack.ereGRe/_old  2022-05-06 18:59:42.405380673 +0200
+++ /var/tmp/diff_new_pack.ereGRe/_new  2022-05-06 18:59:42.413380681 +0200
@@ -26,6 +26,9 @@
 Source:         
https://github.com/django-extensions/django-extensions/archive/%{version}.tar.gz#/django-extensions-%{version}.tar.gz
 # https://github.com/django-extensions/django-extensions/pull/1698
 Patch0:         pr_1698.patch
+Patch1:         remove-mock.patch
+# https://github.com/django-extensions/django-extensions/pull/1718
+Patch2:         support-werkzeug-2-1.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 Requires:       python-Django >= 2.2
@@ -49,7 +52,6 @@
 BuildRequires:  %{python_module django-json-widget}
 BuildRequires:  %{python_module djangorestframework >= 3.0.0}
 BuildRequires:  %{python_module factory_boy}
-BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pydot}
 BuildRequires:  %{python_module pygraphviz}
@@ -66,8 +68,7 @@
 additions for Django projects.
 
 %prep
-%setup -q -n django-extensions-%{version}
-%patch0 -p1
+%autosetup -p1 -n django-extensions-%{version}
 rm setup.cfg
 
 # Most PipCheckerTests tests fail when using network to connect to PyPI

++++++ remove-mock.patch ++++++
Index: django-extensions-3.1.5/tests/db/fields/test_uniq_field_mixin_compat.py
===================================================================
--- django-extensions-3.1.5.orig/tests/db/fields/test_uniq_field_mixin_compat.py
+++ django-extensions-3.1.5/tests/db/fields/test_uniq_field_mixin_compat.py
@@ -1,10 +1,6 @@
 # -*- coding: utf-8 -*-
-try:
-    from unittest import mock
-except ImportError:
-    import mock
+from unittest import mock
 
-import six
 from django.db import models
 from django.test import TestCase
 from tests.testapp.models import (
@@ -20,7 +16,7 @@ class UniqFieldMixinCompatTestCase(TestC
 
         class MockField(UniqueFieldMixin):
             def __init__(self, **kwargs):
-                for key, value in six.iteritems(kwargs):
+                for key, value in kwargs.items():
                     setattr(self, key, value)
 
         self.uniq_field = MockField(
Index: django-extensions-3.1.5/tests/management/commands/test_clear_cache.py
===================================================================
--- django-extensions-3.1.5.orig/tests/management/commands/test_clear_cache.py
+++ django-extensions-3.1.5/tests/management/commands/test_clear_cache.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-import mock
+from unittest import mock
 import os
 from io import StringIO
 
Index: django-extensions-3.1.5/tests/test_management_command.py
===================================================================
--- django-extensions-3.1.5.orig/tests/test_management_command.py
+++ django-extensions-3.1.5/tests/test_management_command.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 import os
-import mock
+from unittest import mock
 import logging
 import importlib
 
Index: django-extensions-3.1.5/tests/test_sqldiff.py
===================================================================
--- django-extensions-3.1.5.orig/tests/test_sqldiff.py
+++ django-extensions-3.1.5/tests/test_sqldiff.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-import mock
+from unittest import mock
 import pytest
 from io import StringIO
 

++++++ support-werkzeug-2-1.patch ++++++
>From 9214d5ff5b7ef608c7264a42593c93befacb3a94 Mon Sep 17 00:00:00 2001
From: David Schmitt <[email protected]>
Date: Thu, 14 Apr 2022 10:27:58 +0100
Subject: [PATCH] Fix KeyError: 'werkzeug.server.shutdown' in runserver_plus

Exception:

```
Exception happened during processing of request from ('172.20.0.5', 34456)
Traceback (most recent call last):
  File "/usr/lib/python3.7/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
    self.handle()
  File 
"/opt/cloudsmith/deps/venv/lib/python3.7/site-packages/werkzeug/serving.py", 
line 347, in handle
    super().handle()
  File "/usr/lib/python3.7/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
    method()
  File 
"/opt/cloudsmith/deps/venv/lib/python3.7/site-packages/werkzeug/serving.py", 
line 243, in run_wsgi
    self.environ = environ = self.make_environ()
  File 
"/opt/cloudsmith/deps/venv/lib/python3.7/site-packages/django_extensions/management/commands/runserver_plus.py",
 line 326, in make_environ
    del environ['werkzeug.server.shutdown']
KeyError: 'werkzeug.server.shutdown'
```

Fixes: #1715, https://github.com/pallets/werkzeug/issues/2387
---
 django_extensions/management/commands/runserver_plus.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django_extensions/management/commands/runserver_plus.py 
b/django_extensions/management/commands/runserver_plus.py
index 2c9af4384..867e85fb4 100644
--- a/django_extensions/management/commands/runserver_plus.py
+++ b/django_extensions/management/commands/runserver_plus.py
@@ -322,7 +322,7 @@ def inner_run(self, options):
         class WSGIRequestHandler(_WSGIRequestHandler):
             def make_environ(self):
                 environ = super().make_environ()
-                if not options['keep_meta_shutdown_func']:
+                if not options['keep_meta_shutdown_func'] and 
'werkzeug.server.shutdown' in environ:
                     del environ['werkzeug.server.shutdown']
                 return environ
 

Reply via email to