sphinxext: Resolve compatibility with Sphinx 4.x

This necessitates bumping the lowest version supported to avoid having
to maintain shims.

Change-Id: I6c324a5a7c2b7296a15aaa57fc8b98491099702c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2021-07-26 16:26:14 +01:00
parent 8597c57219
commit 80bda9053f
3 changed files with 12 additions and 9 deletions

View File

@ -1 +1 @@
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<4.0.0 # BSD
sphinx>=3.0.0 # BSD

View File

@ -1,6 +1,6 @@
transaction
pecan
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<4.0.0 # BSD
sphinx>=3.0.0 # BSD
Flask
flask-restful
nose

View File

@ -5,10 +5,13 @@ import sys
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
from sphinx import addnodes
from sphinx.ext import autodoc
from sphinx.domains.python import PyClasslike, PyClassmember
from sphinx.domains import Domain, ObjType
from sphinx.directives import ObjectDescription
from sphinx.domains import Domain
from sphinx.domains import ObjType
from sphinx.domains.python import PyAttribute
from sphinx.domains.python import PyClasslike
from sphinx.domains.python import PyMethod
from sphinx.ext import autodoc
from sphinx.locale import _
from sphinx.roles import XRefRole
from sphinx.util.docfields import Field
@ -153,7 +156,7 @@ class TypeDirective(PyClasslike):
return ret
class AttributeDirective(PyClassmember):
class AttributeDirective(PyAttribute):
doc_field_types = [
Field('datatype', label=_('Type'), has_arg=False,
names=('type', 'datatype'))
@ -368,7 +371,7 @@ class ServiceDocumenter(autodoc.ClassDocumenter):
return '/' + '/'.join(path)
class FunctionDirective(PyClassmember):
class FunctionDirective(PyMethod):
name = 'function'
objtype = 'function'
@ -592,5 +595,5 @@ def setup(app):
app.add_config_value('wsme_root', None, 'env')
app.add_config_value('wsme_webpath', '/', 'env')
app.add_config_value('wsme_protocols', ['restjson', 'restxml'], 'env')
app.add_javascript('toggle.js')
app.add_stylesheet('toggle.css')
app.add_js_file('toggle.js')
app.add_css_file('toggle.css')