Accepting request 1228132 from devel:languages:python:django
- Add patch do-not-use-is-dst.patch: * Support Django 5.1 changes. OBS-URL: https://build.opensuse.org/request/show/1228132 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-django-seed?expand=0&rev=6
This commit is contained in:
commit
0c53e0dca5
23
do-not-use-is-dst.patch
Normal file
23
do-not-use-is-dst.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From d4b6c2795485190bad02226740706ae7696a25b3 Mon Sep 17 00:00:00 2001
|
||||
From: rg3915 <regis42santos@gmail.com>
|
||||
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
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 05:16:58 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch do-not-use-is-dst.patch:
|
||||
* Support Django 5.1 changes.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 13 12:02:55 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user