Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 4871a8e91f | |||
| b54d921d08 |
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 30 04:17:09 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- 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 <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
37
support-python-313.patch
Normal file
37
support-python-313.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From 58f7d7fdb171f80ed6ce97e6ca4409723975c47f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
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):
|
||||
Reference in New Issue
Block a user