Merge branch '2.x' into 3.x

This commit is contained in:
Takeshi KOMIYA
2020-03-10 01:14:39 +09:00
3 changed files with 20 additions and 8 deletions

View File

@@ -1,8 +1,6 @@
comment: false
coverage:
status:
project:
default:
enabled: no
patch:
default:
enabled: no

View File

@@ -23,7 +23,9 @@ jobs:
- python: '3.8'
env:
- TOXENV=du15
- PYTEST_ADDOPTS="--cov ./ --cov-append --cov-config setup.cfg"
# Disable codecov temporarily
# refs: https://github.com/sphinx-doc/sphinx/pull/7286#issuecomment-596617853
# - PYTEST_ADDOPTS="--cov ./ --cov-append --cov-config setup.cfg"
- python: 'nightly'
env:
- TOXENV=du16

View File

@@ -443,8 +443,14 @@ class PyModulelevel(PyObject):
"""
def run(self) -> List[Node]:
warnings.warn('PyModulelevel is deprecated.',
RemovedInSphinx40Warning)
for cls in self.__class__.__mro__:
if cls.__name__ != 'DirectiveAdapter':
warnings.warn('PyModulelevel is deprecated. '
'Please check the implementation of %s' % cls,
RemovedInSphinx40Warning)
break
else:
warnings.warn('PyModulelevel is deprecated', RemovedInSphinx40Warning)
return super().run()
@@ -563,8 +569,14 @@ class PyClassmember(PyObject):
"""
def run(self) -> List[Node]:
warnings.warn('PyClassmember is deprecated.',
RemovedInSphinx40Warning)
for cls in self.__class__.__mro__:
if cls.__name__ != 'DirectiveAdapter':
warnings.warn('PyClassmember is deprecated. '
'Please check the implementation of %s' % cls,
RemovedInSphinx40Warning)
break
else:
warnings.warn('PyClassmember is deprecated', RemovedInSphinx40Warning)
return super().run()