Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-django-treebeard for openSUSE:Factory checked in at 2022-12-24 14:52:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-treebeard (Old)
and /work/SRC/openSUSE:Factory/.python-django-treebeard.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-treebeard"
Sat Dec 24 14:52:32 2022 rev:5 rq:1045177 version:4.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-django-treebeard/python-django-treebeard.changes 2022-05-03 21:19:29.337037539 +0200
+++ /work/SRC/openSUSE:Factory/.python-django-treebeard.new.1563/python-django-treebeard.changes 2022-12-24 14:55:21.276703918 +0100
@@ -1,0 +2,6 @@
+Sat Dec 24 08:35:05 UTC 2022 - Matej Cepl
+
+- Add update-tests.patch to fix
+ gh#django-treebeard/django-treebeard#241.
+
+-------------------------------------------------------------------
New:
----
update-tests.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-treebeard.spec ++++++
--- /var/tmp/diff_new_pack.NQkEhk/_old 2022-12-24 14:55:21.696706368 +0100
+++ /var/tmp/diff_new_pack.NQkEhk/_new 2022-12-24 14:55:21.700706392 +0100
@@ -16,7 +16,6 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-django-treebeard
Version: 4.5.1
@@ -26,13 +25,17 @@
Group: Development/Languages/Python
URL: https://github.com/django-treebeard/django-treebeard/
Source: https://files.pythonhosted.org/packages/source/d/django-treebeard/django-treebeard-%{version}.tar.gz
-BuildRequires: %{python_module setuptools}
+# PATCH-FIX-UPSTREAM update-tests.patch gh#django-treebeard/django-treebeard#241 mcepl@suse.com
+# update tests to work with the modern versions of libraries
+Patch0: update-tests.patch
+BuildRequires: %{python_module pip}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-Django >= 2.2
+Requires: python-Django >= 3.2
BuildArch: noarch
# SECTION test requirements
-BuildRequires: %{python_module Django >= 2.2}
+BuildRequires: %{python_module Django >= 3.2}
BuildRequires: %{python_module pytest-django >= 4.0}
BuildRequires: %{python_module pytest}
# /SECTION
@@ -47,16 +50,15 @@
- Nested Sets
%prep
-%setup -q -n django-treebeard-%{version}
-%autopatch -p1
+%autosetup -p1 -n django-treebeard-%{version}
sed -i 's/\r//' CHANGES.md README.md UPDATING
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%{python_expand rm -r %{buildroot}%{$python_sitelib}/treebeard/tests/
%fdupes %{buildroot}%{$python_sitelib}
}
@@ -74,14 +76,14 @@
export DJANGO_SETTINGS_MODULE=treebeard.tests.settings
PYTHONPATH=.
-# Exclusions because of gh#django-treebeard/django-treebeard#241
-%pytest -k 'not (test_result_filtered or test_result_tree or test_result_tree_list or test_result_tree_list_with_action or test_result_tree_list_with_get or test_unicode_result_tree)'
+%pytest
%python_expand rm -r %{buildroot}%{$python_sitelib}/treebeard/tests/
%files %{python_files}
%doc CHANGES.md README.md UPDATING
%license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/treebeard
+%{python_sitelib}/django_treebeard-%{version}*-info
%changelog
++++++ update-tests.patch ++++++
From 868ba56198c456ce3d5f3333329304beaa90e184 Mon Sep 17 00:00:00 2001
From: Samir Shah
Date: Sat, 24 Dec 2022 05:21:12 +0300
Subject: [PATCH] Update supported versions and test matrix.
---
docs/source/tests.rst | 11 +++----
setup.py | 13 ++++----
treebeard/__init__.py | 2 -
treebeard/tests/settings.py | 3 --
treebeard/tests/test_treebeard.py | 57 ++++++++++++++++++++++----------------
5 files changed, 47 insertions(+), 39 deletions(-)
delete mode 100644 .travis.yml
--- a/docs/source/tests.rst
+++ b/docs/source/tests.rst
@@ -41,18 +41,17 @@ tox
``django-treebeard`` uses `tox`_ to run the test suite in all the supported
environments - permutations of:
- - Python 3.6, 3.7 and 3.8
- - Django 2.2, 3.0 and 3.1
+ - Python 3.8 - 3.11
+ - Django 3.2, 4.0 and 4.1
- Sqlite, MySQL and PostgreSQL
-This means that the test suite will run 24 times to test every
-environment supported by ``django-treebeard``. This takes a long time.
-If you want to test only one or a few environments, please use the `-e`
+This means that there are a lot of permutations, which takes a long time.
+If you want to test only one or a few environments, use the `-e`
option in `tox`_, like:
.. code-block:: console
- $ tox -e py36-dj22-pgsql
+ $ tox -e py39-dj32-postgres
.. _pytest: http://pytest.org/
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ setup_args = dict(
long_description=long_description,
long_description_content_type='text/markdown',
python_requires='>=3.6',
- install_requires=['Django>=2.2'],
+ install_requires=['Django>=3.2'],
tests_require=[
'pytest-django>=4.0,<5.0',
@@ -34,13 +34,14 @@ setup_args = dict(
'License :: OSI Approved :: Apache Software License',
'Environment :: Web Environment',
'Framework :: Django',
- 'Framework :: Django :: 2.2',
- 'Framework :: Django :: 3.0',
- 'Framework :: Django :: 3.1',
+ 'Framework :: Django :: 3.2',
+ 'Framework :: Django :: 4.0',
+ 'Framework :: Django :: 4.1',
'Programming Language :: Python',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities'])
--- a/treebeard/__init__.py
+++ b/treebeard/__init__.py
@@ -7,7 +7,7 @@ Release logic:
3. git commit -m 'Bump to <version>'
4. git tag <version>
5. git push
- 6. assure that all tests pass on https://travis-ci.org/django-treebeard/django-treebeard/builds/
+ 6. ensure that all tests pass on Github Actions
7. git push --tags
8. pip install --upgrade pip wheel twine
9. python setup.py clean --all
--- a/treebeard/tests/settings.py
+++ b/treebeard/tests/settings.py
@@ -38,7 +38,7 @@ def get_db_conf():
}
elif database_engine == "mssql":
return {
- 'ENGINE': 'sql_server.pyodbc',
+ 'ENGINE': 'mssql',
'NAME': 'master',
'USER': 'sa',
'PASSWORD': 'Password12!',
@@ -46,7 +46,6 @@ def get_db_conf():
'PORT': '',
'OPTIONS': {
'driver': 'SQL Server Native Client 11.0',
- 'MARS_Connection': 'True',
},
}
--- a/treebeard/tests/test_treebeard.py
+++ b/treebeard/tests/test_treebeard.py
@@ -15,6 +15,7 @@ from django.test import TestCase
from django.test.client import RequestFactory
from django.templatetags.static import static
from django.contrib.admin.options import TO_FIELD_VAR
+from django import VERSION as DJANGO_VERSION
import pytest
@@ -140,6 +141,14 @@ def mpm2muser_model(request):
return request.param
+# Compat helper, and be dropped after Django 3.2 is dropped
+def get_changelist_args(*args):
+ new_args = list(args)
+ if DJANGO_VERSION > (4,):
+ new_args.append("") # New search_help_text arg
+ return new_args
+
+
class TestTreeBase(object):
def got(self, model):
if model in [models.NS_TestNode, models.NS_TestNode_Proxy]:
@@ -2603,7 +2612,7 @@ class TestAdminTree(TestNonEmptyTree):
m = admin_class(model, site)
list_display = m.get_list_display(request)
list_display_links = m.get_list_display_links(request, list_display)
- cl = ChangeList(
+ cl = ChangeList(*get_changelist_args(
request,
model,
list_display,
@@ -2616,8 +2625,8 @@ class TestAdminTree(TestNonEmptyTree):
m.list_max_show_all,
m.list_editable,
m,
- None,
- )
+ [],
+ ))
cl.formset = None
context = Context({"cl": cl, "request": request})
table_output = self.template.render(context)
@@ -2652,7 +2661,7 @@ class TestAdminTree(TestNonEmptyTree):
m = UnicodeModelAdmin(model, site)
list_display = m.get_list_display(request)
list_display_links = m.get_list_display_links(request, list_display)
- cl = ChangeList(
+ cl = ChangeList(*get_changelist_args(
request,
model,
list_display,
@@ -2665,8 +2674,8 @@ class TestAdminTree(TestNonEmptyTree):
m.list_max_show_all,
m.list_editable,
m,
- None,
- )
+ [],
+ ))
cl.formset = None
context = Context({"cl": cl, "request": request})
table_output = self.template.render(context)
@@ -2693,7 +2702,7 @@ class TestAdminTree(TestNonEmptyTree):
m = admin_class(model, site)
list_display = m.get_list_display(request)
list_display_links = m.get_list_display_links(request, list_display)
- cl = ChangeList(
+ cl = ChangeList(*get_changelist_args(
request,
model,
list_display,
@@ -2706,8 +2715,8 @@ class TestAdminTree(TestNonEmptyTree):
m.list_max_show_all,
m.list_editable,
m,
- None,
- )
+ [],
+ ))
cl.formset = None
context = Context({"cl": cl, "request": request})
table_output = self.template.render(context)
@@ -2719,7 +2728,7 @@ class TestAdminTree(TestNonEmptyTree):
request.user = AnonymousUser()
list_display = m.get_list_display(request)
list_display_links = m.get_list_display_links(request, list_display)
- cl = ChangeList(
+ cl = ChangeList(*get_changelist_args(
request,
model,
list_display,
@@ -2732,8 +2741,8 @@ class TestAdminTree(TestNonEmptyTree):
m.list_max_show_all,
m.list_editable,
m,
- None,
- )
+ [],
+ ))
cl.formset = None
context = Context({"cl": cl, "request": request})
table_output = self.template.render(context)
@@ -2745,7 +2754,7 @@ class TestAdminTree(TestNonEmptyTree):
request.user = AnonymousUser()
list_display = m.get_list_display(request)
list_display_links = m.get_list_display_links(request, list_display)
- cl = ChangeList(
+ cl = ChangeList(*get_changelist_args(
request,
model,
list_display,
@@ -2758,8 +2767,8 @@ class TestAdminTree(TestNonEmptyTree):
m.list_max_show_all,
m.list_editable,
m,
- None,
- )
+ [],
+ ))
cl.formset = None
context = Context({"cl": cl, "request": request})
table_output = self.template.render(context)
@@ -2788,7 +2797,7 @@ class TestAdminTreeList(TestNonEmptyTree
m = admin_class(model, site)
list_display = m.get_list_display(request)
list_display_links = m.get_list_display_links(request, list_display)
- cl = ChangeList(
+ cl = ChangeList(*get_changelist_args(
request,
model,
list_display,
@@ -2801,8 +2810,8 @@ class TestAdminTreeList(TestNonEmptyTree
m.list_max_show_all,
m.list_editable,
m,
- None,
- )
+ [],
+ ))
cl.formset = None
context = Context({"cl": cl, "request": request})
table_output = self.template.render(context)
@@ -2821,7 +2830,7 @@ class TestAdminTreeList(TestNonEmptyTree
m = admin_class(model, site)
list_display = m.get_list_display(request)
list_display_links = m.get_list_display_links(request, list_display)
- cl = ChangeList(
+ cl = ChangeList(*get_changelist_args(
request,
model,
list_display,
@@ -2834,8 +2843,8 @@ class TestAdminTreeList(TestNonEmptyTree
m.list_max_show_all,
m.list_editable,
m,
- None,
- )
+ [],
+ ))
cl.formset = None
context = Context({"cl": cl, "request": request, "action_form": True})
table_output = self.template.render(context)
@@ -2864,7 +2873,7 @@ class TestAdminTreeList(TestNonEmptyTree
m = admin_class(model, site)
list_display = m.get_list_display(request)
list_display_links = m.get_list_display_links(request, list_display)
- cl = ChangeList(
+ cl = ChangeList(*get_changelist_args(
request,
model,
list_display,
@@ -2877,8 +2886,8 @@ class TestAdminTreeList(TestNonEmptyTree
m.list_max_show_all,
m.list_editable,
m,
- None,
- )
+ [],
+ ))
cl.formset = None
context = Context({"cl": cl, "request": request})
table_output = self.template.render(context)