forked from pool/python-django-model-utils
Compare commits
13 Commits
e8b992eb20
...
79131ddca4
Author | SHA256 | Date | |
---|---|---|---|
79131ddca4 | |||
17cc02ea5f | |||
ae7bfb4c74 | |||
b7c93acf33 | |||
0373de9c5c | |||
|
01071a7edd | ||
63e711e680 | |||
|
b6161bdcf8 | ||
431ac4f82c | |||
a6a90873c0 | |||
fea4fd7834 | |||
b9e8c6e789 | |||
9cb48ef2ac |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f22ff583cdd22d1f20a5d1dd755533a791fcfbb1a5e6b9c404e71ac928848538
|
||||
size 56188
|
3
django-model-utils-4.4.0.tar.gz
Normal file
3
django-model-utils-4.4.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7b73179480e4d4a737d0188e7c49da03776bbadedad569a534c4e9f1afc004d4
|
||||
size 74203
|
@@ -1,3 +1,79 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 22 05:01:04 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 4.4.0:
|
||||
* Add support for `Python 3.11`
|
||||
* Add support for `Python 3.12`
|
||||
* Drop support for `Python 3.7`
|
||||
* Add support for `Django 4.2`
|
||||
* Add support for `Django 5.0`
|
||||
* Remove ``SaveSignalHandlingModel``. This model used a modified copy of
|
||||
the internal Django method `Model.save_base()` and had not been updated
|
||||
for upstream bug fixes changes since its addition.
|
||||
* Add Swedish translation
|
||||
* Use proper column name instead of attname
|
||||
* Fix ValueError when calling prefetch_related for tracked ForeignKey fields
|
||||
- Switch to autosetup and pyproject macros.
|
||||
- No more greedy globs in %files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 4 14:46:35 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 4.3.1:
|
||||
* Confirm support for `Django 4.0`
|
||||
* Add Spanish translation
|
||||
* Add French translation
|
||||
* Drop Django 1.7 workaround from `select_subclasses()`
|
||||
* Drop support for `Django < 3.2`
|
||||
* Drop support for `Python 3.6`
|
||||
* Confirm support for `Django 4.1`
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 7 03:47:57 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Skip Tumbleweed Python 3.6 incompatible with Django 4
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 26 04:35:03 UTC 2021 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Update to v4.2.0
|
||||
* Add support for Django 3.2
|
||||
* Drop support for Django 3.0
|
||||
* Add support for Python 3.10
|
||||
* Added urlsafe token field.
|
||||
* Introduce context manager for FieldTracker state reset
|
||||
* Fix performance regression of FieldTracker on FileField subclasses
|
||||
on Django 3.1+
|
||||
- from v4.1.1
|
||||
* Applied isort to codebase
|
||||
* Fix TypeError in save when model inherits from both
|
||||
TimeStampModel and StatusModel.
|
||||
- from v4.1.0
|
||||
* FieldTracker now marks fields as not changed after
|
||||
refresh_from_db respecting fields argument
|
||||
* FieldTracker now respects update_fields changed in overridden
|
||||
save() method
|
||||
* FieldTracker now resets states after pre_save() and not anymore
|
||||
save() signals, possibly altering the behaviour of overridden
|
||||
save() methods
|
||||
* Update InheritanceQuerySetMixin to avoid querying too much tables
|
||||
* TimeStampedModel now automatically adds 'modified' field as an
|
||||
update_fields parameter even if it is forgotten while using save()
|
||||
* Replace ugettext_lazy with gettext_lazy
|
||||
* Add available_objects manager to SoftDeletableModel and add
|
||||
deprecation warning to objects manager.
|
||||
* StatusModel now automatically adds 'status_changed' field during
|
||||
save as an update_fieldsparameter when 'status' is present in it
|
||||
to make sure it is not forgotten.
|
||||
* Drop support for Django 2.1
|
||||
* Add support for Python 3.9
|
||||
* Add support for Django 3.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 2 09:31:45 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Fix test execution
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 7 09:15:17 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-django-model-utils
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,21 +16,22 @@
|
||||
#
|
||||
|
||||
|
||||
%define skip_python2 1
|
||||
Name: python-django-model-utils
|
||||
Version: 4.0.0
|
||||
Version: 4.4.0
|
||||
Release: 0
|
||||
Summary: Django model mixins and utilities
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: http://github.com/carljm/django-model-utils/
|
||||
Source: https://github.com/jazzband/django-model-utils/archive/%{version}.tar.gz#/django-model-utils-%{version}.tar.gz
|
||||
# PATCH-FIX-SUSE switch to sqlite from pgsql during testing
|
||||
URL: https://github.com/jazzband/django-model-utils
|
||||
Source: https://files.pythonhosted.org/packages/source/d/django-model-utils/django-model-utils-%{version}.tar.gz
|
||||
# Upstreamed to https://github.com/jazzband/django-model-utils/pull/516
|
||||
Patch0: use-sqlite.patch
|
||||
BuildRequires: %{python_module Django >= 2.0}
|
||||
BuildRequires: %{python_module base >= 3.8}
|
||||
BuildRequires: %{python_module freezegun}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest-django}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
Requires: python-Django >= 2.0
|
||||
BuildArch: noarch
|
||||
@@ -40,23 +41,25 @@ BuildArch: noarch
|
||||
Django model mixins and utilities.
|
||||
|
||||
%prep
|
||||
%setup -q -n django-model-utils-%{version}
|
||||
%patch0 -p1
|
||||
%autosetup -p1 -n django-model-utils-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
# skip JoinManagerTest tests as they need proper DB (pgsql/mysql)
|
||||
export PYTHONPATH=.
|
||||
export SQLITE=1
|
||||
%pytest -k 'not JoinManagerTest'
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE.txt
|
||||
%doc AUTHORS.rst CHANGES.rst README.rst
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/model_utils
|
||||
%{python_sitelib}/django_model_utils-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
@@ -1,19 +1,46 @@
|
||||
Index: django-model-utils-3.2.0/tests/settings.py
|
||||
===================================================================
|
||||
--- django-model-utils-3.2.0.orig/tests/settings.py
|
||||
+++ django-model-utils-3.2.0/tests/settings.py
|
||||
@@ -5,12 +5,8 @@ INSTALLED_APPS = (
|
||||
commit e6833a2d52849e01dfeb3fe4a88093678fd88d93
|
||||
Author: John Vandenberg <jayvdb@gmail.com>
|
||||
Date: Sun Dec 26 12:31:12 2021 +0800
|
||||
|
||||
Allow running tests using sqlite
|
||||
|
||||
diff --git a/tests/settings.py b/tests/settings.py
|
||||
index 4ead542..83946b3 100644
|
||||
--- a/tests/settings.py
|
||||
+++ b/tests/settings.py
|
||||
@@ -4,16 +4,25 @@ INSTALLED_APPS = (
|
||||
'model_utils',
|
||||
'tests',
|
||||
)
|
||||
DATABASES = {
|
||||
-DATABASES = {
|
||||
- "default": {
|
||||
- "ENGINE": "django.db.backends.postgresql_psycopg2",
|
||||
- "NAME": os.environ.get("DJANGO_DATABASE_NAME_POSTGRES", "modelutils"),
|
||||
- "USER": os.environ.get("DJANGO_DATABASE_USER_POSTGRES", 'postgres'),
|
||||
- "PASSWORD": os.environ.get("DJANGO_DATABASE_PASSWORD_POSTGRES", ""),
|
||||
- "HOST": os.environ.get("DJANGO_DATABASE_HOST_POSTGRES", ""),
|
||||
+ 'default': {
|
||||
+ 'ENGINE': 'django.db.backends.sqlite3'
|
||||
},
|
||||
}
|
||||
- "NAME": os.environ.get("DB_NAME", "modelutils"),
|
||||
- "USER": os.environ.get("DB_USER", 'postgres'),
|
||||
- "PASSWORD": os.environ.get("DB_PASSWORD", ""),
|
||||
- "HOST": os.environ.get("DB_HOST", "localhost"),
|
||||
- "PORT": os.environ.get("DB_PORT", 5432)
|
||||
- },
|
||||
-}
|
||||
+
|
||||
+if os.environ.get('SQLITE'):
|
||||
+ DATABASES = {
|
||||
+ 'default': {
|
||||
+ 'ENGINE': 'django.db.backends.sqlite3',
|
||||
+ },
|
||||
+ }
|
||||
+else:
|
||||
+ DATABASES = {
|
||||
+ "default": {
|
||||
+ "ENGINE": "django.db.backends.postgresql_psycopg2",
|
||||
+ "NAME": os.environ.get("DB_NAME", "modelutils"),
|
||||
+ "USER": os.environ.get("DB_USER", 'postgres'),
|
||||
+ "PASSWORD": os.environ.get("DB_PASSWORD", ""),
|
||||
+ "HOST": os.environ.get("DB_HOST", "localhost"),
|
||||
+ "PORT": os.environ.get("DB_PORT", 5432)
|
||||
+ },
|
||||
+ }
|
||||
+
|
||||
SECRET_KEY = 'dummy'
|
||||
|
||||
CACHES = {
|
||||
|
Reference in New Issue
Block a user