From e596a48ecfe93bc5d7e91fd98e285269d13eddd8e6f57bbf4e6ef7b4f0da5bf4 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 22 Feb 2023 03:11:20 +0000 Subject: [PATCH] - Add patch support-python-311.patch: * Support Python 3.11. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-django-assets?expand=0&rev=7 --- python-django-assets.changes | 6 ++++++ python-django-assets.spec | 11 ++++------- support-python-311.patch | 23 +++++++++++++++++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 support-python-311.patch diff --git a/python-django-assets.changes b/python-django-assets.changes index 971c8f4..0e1fc9b 100644 --- a/python-django-assets.changes +++ b/python-django-assets.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 22 03:10:45 UTC 2023 - Steve Kowalik + +- Add patch support-python-311.patch: + * Support Python 3.11. + ------------------------------------------------------------------- Sun Sep 18 01:32:15 UTC 2022 - John Vandenberg diff --git a/python-django-assets.spec b/python-django-assets.spec index 72a1135..80383c2 100644 --- a/python-django-assets.spec +++ b/python-django-assets.spec @@ -1,7 +1,7 @@ # # spec file for package python-django-assets # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,18 +16,16 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 -%define skip_python36 1 Name: python-django-assets Version: 2.0 Release: 0 Summary: Django asset management to compress and merge CSS and Javascript files License: BSD-2-Clause -Group: Development/Languages/Python URL: https://github.com/miracle2k/django-assets Source: https://files.pythonhosted.org/packages/source/d/django-assets/django-assets-%{version}.tar.gz Patch0: remove-nose.patch +# PATCH-FIX-UPSTREAM gh#miracle2k/django-assets#104 +Patch1: support-python-311.patch BuildRequires: %{python_module setuptools} BuildRequires: dos2unix BuildRequires: fdupes @@ -46,9 +44,8 @@ BuildRequires: %{python_module webassets >= 2.0} Asset management for Django, to compress and merge CSS and Javascript files. %prep -%setup -q -n django-assets-%{version} +%autosetup -p1 -n django-assets-%{version} dos2unix README.rst -%autopatch -p1 %build %python_build diff --git a/support-python-311.patch b/support-python-311.patch new file mode 100644 index 0000000..e0cbc4b --- /dev/null +++ b/support-python-311.patch @@ -0,0 +1,23 @@ +From e57c5c3c02d84069600916fed74f165819393487 Mon Sep 17 00:00:00 2001 +From: Jonatan Heyman +Date: Thu, 10 Nov 2022 23:26:07 +0100 +Subject: [PATCH] Global regex flags must be at the start of regex in Python + 3.11 + +--- + django_assets/glob.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/django_assets/glob.py b/django_assets/glob.py +index 66a9531..73d961c 100644 +--- a/django_assets/glob.py ++++ b/django_assets/glob.py +@@ -121,7 +121,7 @@ def translate(pat): + res = '%s([%s])' % (res, stuff) + else: + res = res + re.escape(c) +- return res + '\Z(?ms)' ++ return '(?ms)' + res + '\Z' + + + """Filename globbing utility."""