* [gentoo-commits] repo/gentoo:master commit in: dev-python/dominate/, dev-python/dominate/files/
@ 2024-08-03 14:33 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2024-08-03 14:33 UTC (permalink / raw
To: gentoo-commits
commit: 316b28ad18abd629b96be98c02be9026f9d41356
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 3 14:10:33 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 3 14:33:24 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=316b28ad
dev-python/dominate: Enable py3.13
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/dominate/dominate-2.9.1.ebuild | 8 +++--
.../dominate/files/dominate-2.9.1-py313.patch | 37 ++++++++++++++++++++++
2 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/dev-python/dominate/dominate-2.9.1.ebuild b/dev-python/dominate/dominate-2.9.1.ebuild
index 85015fef18a1..22722a0e814f 100644
--- a/dev-python/dominate/dominate-2.9.1.ebuild
+++ b/dev-python/dominate/dominate-2.9.1.ebuild
@@ -4,8 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-# py3.13: https://github.com/Knio/dominate/issues/199
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
inherit distutils-r1 pypi
@@ -20,3 +19,8 @@ SLOT="0"
KEYWORDS="amd64 arm64 x86"
distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/Knio/dominate/pull/202
+ "${FILESDIR}/${P}-py313.patch"
+)
diff --git a/dev-python/dominate/files/dominate-2.9.1-py313.patch b/dev-python/dominate/files/dominate-2.9.1-py313.patch
new file mode 100644
index 000000000000..944ad8596336
--- /dev/null
+++ b/dev-python/dominate/files/dominate-2.9.1-py313.patch
@@ -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):
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-03 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-03 14:33 [gentoo-commits] repo/gentoo:master commit in: dev-python/dominate/, dev-python/dominate/files/ Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox