Matej Cepl
e77cbb0e48
- Renamed patch for assigned CVE: * bpo43075-fix-ReDoS-in-request.patch -> CVE-2021-3733-fix-ReDoS-in-request.patch (boo#1189287, CVE-2021-3733) - Fix python-doc build (bpo#35293): * sphinx-update-removed-function.patch - Update documentation formatting for Sphinx 3.0 (bpo#40204). OBS-URL: https://build.opensuse.org/request/show/913777 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=298
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
--- a/Doc/tools/extensions/pyspecific.py
|
|
+++ b/Doc/tools/extensions/pyspecific.py
|
|
@@ -103,7 +103,11 @@ class ImplementationDetail(Directive):
|
|
# Support for documenting decorators
|
|
|
|
from sphinx import addnodes
|
|
-from sphinx.domains.python import PyModulelevel, PyClassmember
|
|
+try:
|
|
+ from sphinx.domains.python import PyFunction, PyMethod
|
|
+except ImportError:
|
|
+ from sphinx.domains.python import PyClassmember as PyMethod
|
|
+ from sphinx.domains.python import PyModulelevel as PyFunction
|
|
|
|
class PyDecoratorMixin(object):
|
|
def handle_signature(self, sig, signode):
|
|
@@ -114,16 +118,16 @@ class PyDecoratorMixin(object):
|
|
def needs_arglist(self):
|
|
return False
|
|
|
|
-class PyDecoratorFunction(PyDecoratorMixin, PyModulelevel):
|
|
+class PyDecoratorFunction(PyDecoratorMixin, PyFunction):
|
|
def run(self):
|
|
# a decorator function is a function after all
|
|
self.name = 'py:function'
|
|
- return PyModulelevel.run(self)
|
|
+ return PyFunction.run(self)
|
|
|
|
-class PyDecoratorMethod(PyDecoratorMixin, PyClassmember):
|
|
+class PyDecoratorMethod(PyDecoratorMixin, PyMethod):
|
|
def run(self):
|
|
self.name = 'py:method'
|
|
- return PyClassmember.run(self)
|
|
+ return PyMethod.run(self)
|
|
|
|
|
|
# Support for building "topic help" for pydoc
|
|
--- /dev/null
|
|
+++ b/Misc/NEWS.d/next/Documentation/2020-09-12-17-37-13.bpo-35293._cOwPD.rst
|
|
@@ -0,0 +1 @@
|
|
+Fix RemovedInSphinx40Warning when building the documentation. Patch by Dong-hee Na.
|