From 5b19a9286c0e5da1dd9ec33e91ed7d9978330198b4ff07d80e8b40fb5b99b4c4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 17 Nov 2022 15:12:06 +0000 Subject: [PATCH 1/2] Accepting request 1036470 from home:gladiac:branches:devel:languages:python:mailman MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update to version 1.3.7 * Fix a bug where various form(s) allowed setting empty values for delivery_mode and language. (Fixes #540, #522) * Rename labels description and info fields as 'Short Description' and 'Long Description' to signify what they mean. (Fixes #510) * Use date to format the dates in 'List Metrics' section in the List summary page. (Fixes #508) * Sort the list of languages in all Select elements alphabetically so they are easier to naviate with screen readers. (Fixes #498) * Add support for Django 4.0 * A couple of unit tests are now marked expectedFailure due to https://gitlab.com/mailman/mailman/-/merge_requests/997. (See #548) * Translate template names in the “New Templates” page (See #547) * Translate the section names in the MailingList->"Settings" tab. (See #550) * Add support for Django 4.1 * Add support for Python 3.10 * Remove support for Django < 3.2 * Remove support for Python < 3.7 * Replace the use of mock with unittest.mock * Change the way role is selector in the List index page to allow use of the * filtering without javascript enabled dropdowns. It also enhances usability by enabling the roles that are currently active by default. (See #544) * Show the number of files in each Mailman queue under 'System Information' tab for Admins. (Fixes #480) OBS-URL: https://build.opensuse.org/request/show/1036470 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-postorius?expand=0&rev=42 --- postorius-1.3.6.tar.gz | 3 --- postorius-1.3.7.tar.gz | 3 +++ postorius-settings.patch | 12 ++++++------ python-postorius.changes | 28 ++++++++++++++++++++++++++++ python-postorius.spec | 6 +++--- 5 files changed, 40 insertions(+), 12 deletions(-) delete mode 100644 postorius-1.3.6.tar.gz create mode 100644 postorius-1.3.7.tar.gz diff --git a/postorius-1.3.6.tar.gz b/postorius-1.3.6.tar.gz deleted file mode 100644 index 67cf943..0000000 --- a/postorius-1.3.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b0cc453d21f710e983d9bb78cfb85addeaec7fddeda9ce82df4eb6a4fda1a68 -size 3086923 diff --git a/postorius-1.3.7.tar.gz b/postorius-1.3.7.tar.gz new file mode 100644 index 0000000..2cff863 --- /dev/null +++ b/postorius-1.3.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d40a9d025bfdec0fdeb5d320ed2db3fbbffc77bd0dfeb619f39cf345c03a2f0 +size 3197409 diff --git a/postorius-settings.patch b/postorius-settings.patch index 786a477..ecde6ee 100644 --- a/postorius-settings.patch +++ b/postorius-settings.patch @@ -1,8 +1,8 @@ -Index: postorius-1.3.6/example_project/settings.py +Index: postorius-1.3.7/example_project/settings.py =================================================================== ---- postorius-1.3.6.orig/example_project/settings.py 2021-09-19 03:21:45.000000000 +0200 -+++ postorius-1.3.6/example_project/settings.py 2021-11-18 08:48:27.881938336 +0100 -@@ -136,7 +136,7 @@ WSGI_APPLICATION = 'wsgi.application' +--- postorius-1.3.7.orig/example_project/settings.py 2022-10-22 07:10:31.000000000 +0200 ++++ postorius-1.3.7/example_project/settings.py 2022-11-17 16:05:22.163232646 +0100 +@@ -142,7 +142,7 @@ WSGI_APPLICATION = 'wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', @@ -11,7 +11,7 @@ Index: postorius-1.3.6/example_project/settings.py } } -@@ -180,7 +180,7 @@ USE_TZ = True +@@ -190,7 +190,7 @@ USE_TZ = True # Don't put anything in this directory yourself; store your static files # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Example: "/var/www/example.com/static/" @@ -20,7 +20,7 @@ Index: postorius-1.3.6/example_project/settings.py # URL prefix for static files. # Example: "http://example.com/static/", "http://static.example.com/" -@@ -259,7 +259,7 @@ LOGGING = { +@@ -269,7 +269,7 @@ LOGGING = { 'level': 'INFO', #'class': 'logging.handlers.RotatingFileHandler', 'class': 'logging.handlers.WatchedFileHandler', diff --git a/python-postorius.changes b/python-postorius.changes index 5a76c40..6100bd3 100644 --- a/python-postorius.changes +++ b/python-postorius.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Thu Nov 17 15:07:07 UTC 2022 - Andreas Schneider + +- Update to version 1.3.7 + * Fix a bug where various form(s) allowed setting empty values for + delivery_mode and language. (Fixes #540, #522) + * Rename labels description and info fields as 'Short Description' and 'Long + Description' to signify what they mean. (Fixes #510) + * Use date to format the dates in 'List Metrics' section in the List summary + page. (Fixes #508) + * Sort the list of languages in all Select elements alphabetically so they + are easier to naviate with screen readers. (Fixes #498) + * Add support for Django 4.0 + * A couple of unit tests are now marked expectedFailure due to + https://gitlab.com/mailman/mailman/-/merge_requests/997. (See #548) + * Translate template names in the “New Templates” page (See #547) + * Translate the section names in the MailingList->"Settings" tab. (See #550) + * Add support for Django 4.1 + * Add support for Python 3.10 + * Remove support for Django < 3.2 + * Remove support for Python < 3.7 + * Replace the use of mock with unittest.mock + * Change the way role is selector in the List index page to allow use of the + * filtering without javascript enabled dropdowns. It also enhances usability + by enabling the roles that are currently active by default. (See #544) + * Show the number of files in each Mailman queue under 'System Information' + tab for Admins. (Fixes #480) + ------------------------------------------------------------------- Wed Jul 6 14:30:03 UTC 2022 - Andreas Schneider diff --git a/python-postorius.spec b/python-postorius.spec index 0a6d784..08c786e 100644 --- a/python-postorius.spec +++ b/python-postorius.spec @@ -1,7 +1,7 @@ # # spec file for package python-postorius # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -44,7 +44,7 @@ %endif Name: python-postorius -Version: 1.3.6 +Version: 1.3.7 Release: 0 Summary: A web user interface for GNU Mailman License: GPL-3.0-only @@ -112,9 +112,9 @@ A web user interface for GNU Mailman %package -n %{postorius_pkgname}-web Summary: The webroot for GNU Mailman +Requires: %{postorius_pkgname} Requires: acl Requires: openssl -Requires: %{postorius_pkgname} Requires: sudo %description -n %{postorius_pkgname}-web From 7e8868ca9268b3b2332b2a50222103b919ac3270e50c5841b15c81036d89d9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 22 Nov 2022 10:36:45 +0000 Subject: [PATCH 2/2] Accepting request 1037046 from devel:languages:python:mailman:backports Fix the build and tests. OBS-URL: https://build.opensuse.org/request/show/1037046 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-postorius?expand=0&rev=43 --- postorius-fix-django-4.0-compatibility.patch | 83 -------------------- python-postorius.changes | 2 + python-postorius.spec | 14 ++-- 3 files changed, 9 insertions(+), 90 deletions(-) delete mode 100644 postorius-fix-django-4.0-compatibility.patch diff --git a/postorius-fix-django-4.0-compatibility.patch b/postorius-fix-django-4.0-compatibility.patch deleted file mode 100644 index d4812fd..0000000 --- a/postorius-fix-django-4.0-compatibility.patch +++ /dev/null @@ -1,83 +0,0 @@ -From db2bd36a76f21d0637b5b7894f564918161c3185 Mon Sep 17 00:00:00 2001 -From: David Runge -Date: Sun, 20 Feb 2022 18:20:27 +0000 -Subject: [PATCH] Make compatible with django 4.0 - ---- - .gitlab-ci.yml | 14 ++++++++++++-- - setup.py | 2 +- - src/postorius/doc/news.rst | 1 + - src/postorius/forms/fields.py | 11 +++++++++-- - tox.ini | 5 +++-- - 5 files changed, 26 insertions(+), 7 deletions(-) - -Index: postorius-1.3.6/setup.py -=================================================================== ---- postorius-1.3.6.orig/setup.py 2022-02-21 08:32:54.275160495 +0100 -+++ postorius-1.3.6/setup.py 2022-02-21 08:32:56.591175549 +0100 -@@ -54,7 +54,7 @@ setup( - include_package_data=True, - install_requires=[ - 'django-mailman3>=1.3.7', -- 'django>=2.2,<3.3', -+ 'django>=2.2,<4.1', - 'mailmanclient>=3.3.3', - 'readme_renderer[md]', - ], -Index: postorius-1.3.6/src/postorius/forms/fields.py -=================================================================== ---- postorius-1.3.6.orig/src/postorius/forms/fields.py 2022-02-21 08:32:54.275160495 +0100 -+++ postorius-1.3.6/src/postorius/forms/fields.py 2022-02-21 08:32:56.591175549 +0100 -@@ -19,7 +19,14 @@ - - - from django import forms --from django.utils.encoding import smart_text -+ -+ -+try: -+ from django.utils.encoding import smart_str -+except ImportError: -+ # django < 4.0 -+ from django.utils.encoding import smart_text as smart_str -+ - from django.utils.translation import gettext_lazy as _ - - from postorius.utils import with_empty_choice -@@ -62,7 +69,7 @@ class ListOfStringsField(forms.Field): - line = line.strip() - if not line: - continue -- result.append(smart_text(line)) -+ result.append(smart_str(line)) - return result - - -Index: postorius-1.3.6/tox.ini -=================================================================== ---- postorius-1.3.6.orig/tox.ini 2022-02-21 08:32:54.275160495 +0100 -+++ postorius-1.3.6/tox.ini 2022-02-21 08:32:56.591175549 +0100 -@@ -1,5 +1,5 @@ - [tox] --envlist = py{36,37,38,39}-django{22,31,32,-latest},qa -+envlist = py{36,37,38,39,310}-django{22,31,32,-latest},qa - - [testenv] - usedevelop = True -@@ -19,6 +19,7 @@ deps = - django30: Django>=3.0,<3.1 - django31: Django>=3.1,<3.2 - django32: Django>=3.2,<3.3 -+ django40: Django>=4.0,<4.1 - django-latest: https://github.com/django/django/archive/main.tar.gz - commands = - pytest {posargs:../src} -@@ -30,7 +31,7 @@ setenv = - basepython = python3 - deps = - {[testenv]deps} -- Django>=3.2,<3.3 -+ Django>=3.2,<4.1 - coverage - commands = - coverage run -m pytest {posargs:../src/postorius} diff --git a/python-postorius.changes b/python-postorius.changes index 6100bd3..fe06360 100644 --- a/python-postorius.changes +++ b/python-postorius.changes @@ -25,6 +25,8 @@ Thu Nov 17 15:07:07 UTC 2022 - Andreas Schneider by enabling the roles that are currently active by default. (See #544) * Show the number of files in each Mailman queue under 'System Information' tab for Admins. (Fixes #480) +- Removed postorius-fix-django-4.0-compatibility.patch +- Add BR for django debug toolbar ------------------------------------------------------------------- Wed Jul 6 14:30:03 UTC 2022 - Andreas Schneider diff --git a/python-postorius.spec b/python-postorius.spec index 08c786e..6584224 100644 --- a/python-postorius.spec +++ b/python-postorius.spec @@ -59,9 +59,6 @@ Source12: postorius.uwsgi Source20: README.SUSE.md # Patch0: postorius-settings.patch -# Make compatible with django 4.0 -# https://gitlab.com/mailman/postorius/-/commit/db2bd36a76f21d0637b5b7894f564918161c3185 -Patch1: postorius-fix-django-4.0-compatibility.patch # BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} @@ -81,7 +78,9 @@ BuildRequires: mailman3 >= 3.3.5 BuildRequires: %{python_module Django >= 2.2} BuildRequires: %{python_module beautifulsoup4} BuildRequires: %{python_module cmarkgfm} +BuildRequires: %{python_module django-debug-toolbar >= 2.2} BuildRequires: %{python_module django-mailman3 >= 1.3.7} +BuildRequires: %{python_module django-requests-debug-toolbar >= 0.0.3} BuildRequires: %{python_module isort} BuildRequires: %{python_module mailmanclient >= 3.3.3} BuildRequires: %{python_module pytest-django} @@ -97,7 +96,9 @@ A web user interface for GNU Mailman %package -n %{postorius_pkgname} Summary: A web user interface for GNU Mailman Requires: %{mypython}-Django >= 1.11 +Requires: %{mypython}-django-debug-toolbar >= 2.2.0 Requires: %{mypython}-django-mailman3 >= 1.3.7 +Requires: %{mypython}-django-requests-debug-toolbar >= 0.0.3 Requires: %{mypython}-mailmanclient >= 3.3.2 Requires: %{mypython}-readme_renderer %if "%{expand:%%%{mypython}_provides}" == "python3" @@ -199,14 +200,12 @@ install -d -m 0755 %{buildroot}%{_sysconfdir}/uwsgi/vassals install -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/uwsgi/vassals/postorius.ini %check -pushd example_project -export PYTHONPATH='../src' +export PYTHONPATH="$(pwd):$(pwd)/src" export LANG=C.UTF-8 -%pytest .. +%pytest # clean flavored alternatives created by test setup, because we are going to install the example_project as docs rm -rf build/flavorbin rm -rf build/xdgflavorconfig -popd %pre -n %{postorius_pkgname}-web /usr/sbin/groupadd -r postorius &>/dev/null || : @@ -246,6 +245,7 @@ fi %{postorius_basedir}/static/admin %{postorius_basedir}/static/django-mailman3 %{postorius_basedir}/static/postorius +%{postorius_basedir}/static/debug_toolbar %attr(750,root,postorius) %dir %{postorius_etcdir} %attr(640,root,postorius) %config(noreplace) %{postorius_etcdir}/settings_local.py