forked from pool/python39
case quadratic complexity when processing certain crafted malformed inputs with HTMLParser (CVE-2025-6069, bsc#1244705). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python39?expand=0&rev=238
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
---
|
|
Doc/tools/extensions/pyspecific.py | 10 ++++++++--
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
--- a/Doc/tools/extensions/pyspecific.py
|
|
+++ b/Doc/tools/extensions/pyspecific.py
|
|
@@ -28,7 +28,13 @@ try:
|
|
except ImportError:
|
|
from sphinx.environment import NoUri
|
|
from sphinx.locale import _ as sphinx_gettext
|
|
-from sphinx.util import status_iterator, logging
|
|
+try:
|
|
+ from sphinx.util.display import status_iterator
|
|
+except ImportError:
|
|
+ # This method was moved into sphinx.util.display in Sphinx 6.1.0. Before
|
|
+ # that it resided in sphinx.util.
|
|
+ from sphinx.util import status_iterator
|
|
+from sphinx.util import logging
|
|
from sphinx.util.nodes import split_explicit_title
|
|
from sphinx.writers.text import TextWriter, TextTranslator
|
|
from sphinx.writers.latex import LaTeXTranslator
|
|
@@ -338,7 +344,7 @@ class PyAbstractMethod(PyMethod):
|
|
def expand_version_arg(argument, release):
|
|
"""Expand "next" to the current version"""
|
|
if argument == 'next':
|
|
- return translators['sphinx'].gettext('{} (unreleased)').format(release)
|
|
+ return sphinx_gettext('{} (unreleased)').format(release)
|
|
return argument
|
|
|
|
|