diff --git a/python-dominate.changes b/python-dominate.changes index 21f268f..6a91c4c 100644 --- a/python-dominate.changes +++ b/python-dominate.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Oct 30 04:17:09 UTC 2024 - Steve Kowalik + +- Switch to autosetup macro. +- Add patch support-python-313.patch: + * Support Python 3.13 deindenting changes. + ------------------------------------------------------------------- Sat Jan 6 20:45:36 UTC 2024 - Dirk Müller diff --git a/python-dominate.spec b/python-dominate.spec index 6fb1167..964d1e3 100644 --- a/python-dominate.spec +++ b/python-dominate.spec @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-dominate Version: 2.9.1 Release: 0 @@ -24,6 +23,8 @@ Summary: Python library for creating and manipulating HTML documents License: GPL-3.0-only URL: https://github.com/Knio/dominate/ Source: https://files.pythonhosted.org/packages/source/d/dominate/dominate-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#Knio/dominate#202 +Patch0: support-python-313.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest >= 2.7.3} BuildRequires: %{python_module setuptools} @@ -42,7 +43,7 @@ which eliminates the need to learn another template language, and lets you take advantage of the more powerful features of Python. %prep -%setup -q -n dominate-%{version} +%autosetup -p1 -n dominate-%{version} %build %pyproject_wheel diff --git a/support-python-313.patch b/support-python-313.patch new file mode 100644 index 0000000..5e66905 --- /dev/null +++ b/support-python-313.patch @@ -0,0 +1,37 @@ +From 58f7d7fdb171f80ed6ce97e6ca4409723975c47f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 3 Aug 2024 16:07:38 +0200 +Subject: [PATCH] Update tests for docstring dedenting in Python 3.13 + +Update the `get_expected()` function to account for the fact that +Python 3.13 automatically dedents all the docstrings, and therefore +does not require explicitly removing the indent (which effectively +removes too much indent). + +Fixes #199 +--- + tests/test_svg.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tests/test_svg.py b/tests/test_svg.py +index e5bbec3..ea7d98f 100644 +--- a/tests/test_svg.py ++++ b/tests/test_svg.py +@@ -1,3 +1,5 @@ ++import sys ++ + import dominate.svg + from dominate.tags import * + from dominate.svg import * +@@ -14,7 +16,10 @@ def base(): + + + def get_expected(func): +- return func.__doc__.replace('\n ', '\n').strip() ++ doc = func.__doc__ ++ if sys.version_info < (3, 13): ++ doc = doc.replace('\n ', '\n') ++ return doc.strip() + + + def output_test(func):