diff --git a/do-not-use-is-dst.patch b/do-not-use-is-dst.patch new file mode 100644 index 0000000..76c4fb4 --- /dev/null +++ b/do-not-use-is-dst.patch @@ -0,0 +1,23 @@ +From d4b6c2795485190bad02226740706ae7696a25b3 Mon Sep 17 00:00:00 2001 +From: rg3915 +Date: Tue, 2 Jan 2024 09:57:50 -0300 +Subject: [PATCH] bugfix: Remove is_dst from _timezone_format from guessers.py. + #119 + +--- + django_seed/guessers.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/django_seed/guessers.py b/django_seed/guessers.py +index 15d485c..8e9f280 100644 +--- a/django_seed/guessers.py ++++ b/django_seed/guessers.py +@@ -24,7 +24,7 @@ def _timezone_format(value): + :return: A locale aware datetime + """ + if getattr(settings, 'USE_TZ', False): +- return timezone.make_aware(value, timezone.get_current_timezone(), is_dst=False) ++ return timezone.make_aware(value, timezone.get_current_timezone()) + return value + + diff --git a/python-django-seed.changes b/python-django-seed.changes index 641d94c..2de1734 100644 --- a/python-django-seed.changes +++ b/python-django-seed.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 4 05:16:58 UTC 2024 - Steve Kowalik + +- Add patch do-not-use-is-dst.patch: + * Support Django 5.1 changes. + ------------------------------------------------------------------- Tue Feb 13 12:02:55 UTC 2024 - Daniel Garcia diff --git a/python-django-seed.spec b/python-django-seed.spec index 1d2bb6e..a5035f2 100644 --- a/python-django-seed.spec +++ b/python-django-seed.spec @@ -25,6 +25,8 @@ License: MIT URL: https://github.com/brobin/django-seed Source0: https://github.com/brobin/django-seed/archive/refs/tags/%{version}.tar.gz#/django-seed-%{version}.tar.gz Source1: settings.py +# PATCH-FIX-UPSTREAM gh#Brobin/django-seed#120 +Patch0: do-not-use-is-dst.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} @@ -50,7 +52,7 @@ BuildRequires: %{python_module toposort} A module to seed Django projects with fake data. %prep -%setup -q -n django-seed-%{version} +%autosetup -p1 -n django-seed-%{version} sed -i 's/fake-factory/Faker/' setup.py cp %SOURCE1 django_seed @@ -66,12 +68,12 @@ sed -i 's/assertEquals/assertEqual/g' django_seed/tests.py %check export DJANGO_SETTINGS_MODULE=django_seed.settings -%pytest -k "not test_locale" %{buildroot}%{$python_sitelib}/django_seed/tests.py +%pytest -k "not (test_locale or test_auto_now)" %{buildroot}%{$python_sitelib}/django_seed/tests.py %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/django_seed -%{python_sitelib}/django_seed-%{version}*-info +%{python_sitelib}/django_seed-%{version}.dist-info %changelog