Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-django-money for
openSUSE:Factory checked in at 2022-06-05 21:28:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-money (Old)
and /work/SRC/openSUSE:Factory/.python-django-money.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-money"
Sun Jun 5 21:28:41 2022 rev:5 rq:980905 version:2.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-django-money/python-django-money.changes
2022-05-25 20:35:54.840340821 +0200
+++
/work/SRC/openSUSE:Factory/.python-django-money.new.1548/python-django-money.changes
2022-06-05 21:28:50.041070878 +0200
@@ -1,0 +2,5 @@
+Sun Jun 5 16:32:55 UTC 2022 - Matej Cepl <[email protected]>
+
+- Updated pr_638.patch according to the latest development upstream.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-money.spec ++++++
--- /var/tmp/diff_new_pack.9Eb3dD/_old 2022-06-05 21:28:50.501071497 +0200
+++ /var/tmp/diff_new_pack.9Eb3dD/_new 2022-06-05 21:28:50.501071497 +0200
@@ -66,8 +66,11 @@
%check
PYTHONPATH=.
export DJANGO_SETTINGS_MODULE=tests.settings
+export PYTHONPATH=$(pwd -P)
# we don't have python-mixer and it is needed only for tests
-%pytest -k "not (mixer or test_no_deprecation_warning)"
+# test_currency_field_null_switch_not_triggered_from_default_currency is
+# expected to fail according to gh#django-money/django-money#638
+%pytest -k "not (mixer or test_no_deprecation_warning or
test_currency_field_null_switch_not_triggered_from_default_currency)"
%files %{python_files}
%doc README.rst
++++++ merged_pr_657.patch ++++++
--- /var/tmp/diff_new_pack.9Eb3dD/_old 2022-06-05 21:28:50.521071524 +0200
+++ /var/tmp/diff_new_pack.9Eb3dD/_new 2022-06-05 21:28:50.525071530 +0200
@@ -4,52 +4,15 @@
Subject: [PATCH 1/5] failing test to expose issue
---
- tests/test_models.py | 7 +++++++
- 1 file changed, 7 insertions(+)
+ djmoney/models/fields.py | 7 ++++++-
+ docs/changes.rst | 13 +++++++++++--
+ tests/migrations/helpers.py | 2 +-
+ tests/test_models.py | 11 ++++++++++-
+ 4 files changed, 28 insertions(+), 5 deletions(-)
-diff --git a/tests/test_models.py b/tests/test_models.py
-index fb5b55cc..0ae6ba4e 100644
---- a/tests/test_models.py
-+++ b/tests/test_models.py
-@@ -5,6 +5,7 @@
- """
- import datetime
- from copy import copy
-+from decimal import Decimal
-
- from django import VERSION
- from django.core.exceptions import ValidationError
-@@ -373,6 +374,12 @@ def test_fails_with_null_currency(self):
- assert str(exc.value) == "Missing currency value"
- assert not ModelWithNullableCurrency.objects.exists()
-
-+ def test_fails_with_null_currency_decimal(self):
-+ with pytest.raises(ValueError) as exc:
-+ ModelWithNullableCurrency.objects.create(money=Decimal(10))
-+ assert str(exc.value) == "Missing currency value"
-+ assert not ModelWithNullableCurrency.objects.exists()
-+
- def test_fails_with_nullable_but_no_default(self):
- with pytest.raises(IntegrityError) as exc:
- ModelWithTwoMoneyFields.objects.create()
-
-From 2ccaadc4e1d3a7ca06ba96ee683fb9057daa8d94 Mon Sep 17 00:00:00 2001
-From: David Szotten <[email protected]>
-Date: Wed, 19 Jan 2022 17:54:30 +0000
-Subject: [PATCH 2/5] suggested better fix for
- https://github.com/django-money/django-money/pull/427/
-
-TODO: is the currency field guaranteed to appear before the amount (and main)
-field? yes because of the creation_counters?
----
- djmoney/models/fields.py | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py
-index 8eb710ba..3bfd7dda 100644
--- a/djmoney/models/fields.py
+++ b/djmoney/models/fields.py
-@@ -104,7 +104,12 @@ def __get__(self, obj, type=None):
+@@ -104,7 +104,12 @@ class MoneyFieldProxy:
return data[self.field.name]
def __set__(self, obj, value): # noqa
@@ -63,69 +26,6 @@
# For nullable fields we need either both NULL amount and
currency or both NOT NULL
raise ValueError("Missing currency value")
if isinstance(value, BaseExpression):
-
-From 952ac5a75b43a632febe733d0aa1a5a716b7735c Mon Sep 17 00:00:00 2001
-From: David Szotten <[email protected]>
-Date: Wed, 19 Jan 2022 22:09:06 +0000
-Subject: [PATCH 3/5] fix django error message change
-
-fix for
-https://github.com/django/django/commit/08d8bccbf1b0764a0de68325569ee47da256e206
----
- tests/test_models.py | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/tests/test_models.py b/tests/test_models.py
-index 0ae6ba4e..53def7cb 100644
---- a/tests/test_models.py
-+++ b/tests/test_models.py
-@@ -719,7 +719,9 @@ def test_override_decorator():
- def test_properties_access():
- with pytest.raises(TypeError) as exc:
- ModelWithVanillaMoneyField(money=Money(1, "USD"), bla=1)
-- if VERSION[:2] > (2, 1):
-+ if VERSION[:2] > (4, 0):
-+ assert str(exc.value) == "ModelWithVanillaMoneyField() got unexpected
keyword arguments: 'bla'"
-+ elif VERSION[:2] > (2, 1):
- assert str(exc.value) == "ModelWithVanillaMoneyField() got an
unexpected keyword argument 'bla'"
- else:
- assert str(exc.value) == "'bla' is an invalid keyword argument for
this function"
-
-From 620af5355a22ca1da0cb43c8e5787c3e8b76f995 Mon Sep 17 00:00:00 2001
-From: David Szotten <[email protected]>
-Date: Thu, 20 Jan 2022 08:59:37 +0000
-Subject: [PATCH 4/5] better match the signature of input()
-
-for compat with django 0ab58c120939093fea90822f376e1866fc714d1f
----
- tests/migrations/helpers.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/migrations/helpers.py b/tests/migrations/helpers.py
-index f38067fe..cbf2c7fe 100644
---- a/tests/migrations/helpers.py
-+++ b/tests/migrations/helpers.py
-@@ -12,7 +12,7 @@ def makemigrations():
- from django.db.migrations import questioner
-
- # We should answer yes for all migrations questioner questions
-- questioner.input = lambda x: "y"
-+ questioner.input = lambda prompt=None: "y"
-
- os.system("find . -name \\*.pyc -delete")
- call_command("makemigrations", "money_app", name=MIGRATION_NAME)
-
-From faf4da5f96193fc1a5e0b2b838f2a13189975abf Mon Sep 17 00:00:00 2001
-From: David Szotten <[email protected]>
-Date: Thu, 27 Jan 2022 17:47:01 +0000
-Subject: [PATCH 5/5] changelog
-
----
- docs/changes.rst | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/docs/changes.rst b/docs/changes.rst
-index 1968af75..5eab8fd1 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -1,6 +1,14 @@
@@ -166,4 +66,49 @@
.. _fara: https://github.com/fara
.. _wearebasti: https://github.com/wearebasti
+.. _davidszotten: https://github.com/davidszotten
+--- a/tests/migrations/helpers.py
++++ b/tests/migrations/helpers.py
+@@ -12,7 +12,7 @@ def makemigrations():
+ from django.db.migrations import questioner
+
+ # We should answer yes for all migrations questioner questions
+- questioner.input = lambda x: "y"
++ questioner.input = lambda prompt=None: "y"
+
+ os.system("find . -name \\*.pyc -delete")
+ call_command("makemigrations", "money_app", name=MIGRATION_NAME)
+--- a/tests/test_models.py
++++ b/tests/test_models.py
+@@ -5,6 +5,7 @@ Created on May 7, 2011
+ """
+ import datetime
+ from copy import copy
++from decimal import Decimal
+
+ from django import VERSION
+ from django.core.exceptions import ValidationError
+@@ -373,6 +374,12 @@ class TestNullableCurrency:
+ assert str(exc.value) == "Missing currency value"
+ assert not ModelWithNullableCurrency.objects.exists()
+
++ def test_fails_with_null_currency_decimal(self):
++ with pytest.raises(ValueError) as exc:
++ ModelWithNullableCurrency.objects.create(money=Decimal(10))
++ assert str(exc.value) == "Missing currency value"
++ assert not ModelWithNullableCurrency.objects.exists()
++
+ def test_fails_with_nullable_but_no_default(self):
+ with pytest.raises(IntegrityError) as exc:
+ ModelWithTwoMoneyFields.objects.create()
+@@ -712,7 +719,9 @@ def test_override_decorator():
+ def test_properties_access():
+ with pytest.raises(TypeError) as exc:
+ ModelWithVanillaMoneyField(money=Money(1, "USD"), bla=1)
+- if VERSION[:2] > (2, 1):
++ if VERSION[:2] > (4, 0):
++ assert str(exc.value) == "ModelWithVanillaMoneyField() got unexpected
keyword arguments: 'bla'"
++ elif VERSION[:2] > (2, 1):
+ assert str(exc.value) == "ModelWithVanillaMoneyField() got an
unexpected keyword argument 'bla'"
+ else:
+ assert str(exc.value) == "'bla' is an invalid keyword argument for
this function"
++++++ pr_638.patch ++++++
++++ 772 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/python-django-money/pr_638.patch
++++ and /work/SRC/openSUSE:Factory/.python-django-money.new.1548/pr_638.patch