diff --git a/.codecov.yml b/.codecov.yml index f6272f5f1..22f35d710 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,8 +1,6 @@ +comment: false coverage: status: project: default: enabled: no - patch: - default: - enabled: no diff --git a/.travis.yml b/.travis.yml index 3ceb2e3f2..1b0b104ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index fa0d17315..cd0a59b91 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -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()