Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-django for
openSUSE:Factory checked in at 2022-02-23 16:25:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-django (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-django.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-django"
Wed Feb 23 16:25:59 2022 rev:16 rq:956875 version:4.5.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-django/python-pytest-django.changes
2022-01-05 15:44:29.138254352 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-django.new.1958/python-pytest-django.changes
2022-02-23 16:26:42.619509389 +0100
@@ -1,0 +2,6 @@
+Tue Feb 22 18:40:14 UTC 2022 - Matej Cepl <[email protected]>
+
+- Add autoclear_mailbox.patch checking for the existence of the
+ mail.outbox before clearing it (gh#pytest-dev/pytest-django#993).
+
+-------------------------------------------------------------------
New:
----
autoclear_mailbox.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-django.spec ++++++
--- /var/tmp/diff_new_pack.khzA2Q/_old 2022-02-23 16:26:43.243509411 +0100
+++ /var/tmp/diff_new_pack.khzA2Q/_new 2022-02-23 16:26:43.251509412 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-django
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,10 @@
License: BSD-3-Clause
URL: https://github.com/pytest-dev/pytest-django
Source:
https://files.pythonhosted.org/packages/source/p/pytest-django/pytest-django-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM autoclear_mailbox.patch gh#pytest-dev/pytest-django#993
[email protected]
+# Protect against non-existant mail.outbox folder
+# https://stackoverflow.com/q/5424498/164233
+Patch0: autoclear_mailbox.patch
BuildRequires: %{python_module Django}
BuildRequires: %{python_module pytest > 5.4.0}
BuildRequires: %{python_module pytest-xdist}
@@ -56,7 +60,7 @@
* Works with both worlds: Existing unittest-style TestCase's still work
without any modifications.
%prep
-%setup -q -n pytest-django-%{version}
+%autosetup -p1 -n pytest-django-%{version}
%build
%python_build
++++++ autoclear_mailbox.patch ++++++
---
pytest_django/plugin.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/pytest_django/plugin.py
+++ b/pytest_django/plugin.py
@@ -502,7 +502,8 @@ def _dj_autoclear_mailbox() -> None:
from django.core import mail
- del mail.outbox[:]
+ if hasattr(mail, "outbox"):
+ del mail.outbox[:]
@pytest.fixture(scope="function")