Skip to content

Commit

Permalink
Address some deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jul 27, 2022
1 parent a3638de commit d03d458
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions pytest.ini
@@ -0,0 +1,5 @@
[pytest]
filterwarnings =
error
# docutils planned change in 0.21 without clear solution yet
ignore:The frontend.*:DeprecationWarning
6 changes: 4 additions & 2 deletions setup.cfg
Expand Up @@ -16,7 +16,7 @@ author_email = openstack-discuss@lists.openstack.org
maintainer = PyCQA
maintainer_email = code-quality@python.org
license = Apache 2.0
license_file = LICENSE
license_files = LICENSE
classifiers =
Development Status :: 5 - Production/Stable

Expand Down Expand Up @@ -60,7 +60,9 @@ include_package_data = True
zip_safe = False
# These are required in actual runtime:
install_requires =
docutils
# Ceiled due to DeprecationWarning: The frontend.OptionParser class will be
# replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
docutils < 0.21
restructuredtext-lint>=0.7
stevedore
tomli; python_version < '3.11'
Expand Down
2 changes: 1 addition & 1 deletion src/doc8/checks.py
Expand Up @@ -160,7 +160,7 @@ def extract_lines(node, start_line):

def gather_lines(node):
lines = []
for n in node.traverse(include_self=True):
for n in node.findall(include_self=True):
lines.extend(extract_lines(n, find_line(n)))
return lines

Expand Down
2 changes: 1 addition & 1 deletion src/doc8/utils.py
Expand Up @@ -57,7 +57,7 @@ def path_ignorable(path):


def filtered_traverse(document, filter_func):
for n in document.traverse(include_self=True):
for n in document.findall(include_self=True):
if filter_func(n):
yield n

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -6,7 +6,7 @@ isolated_build = True
[testenv]
deps =
-r{toxinidir}/test-requirements.txt
commands = pytest {posargs}
commands = pytest -v {posargs}
whitelist_externals =
rm
sh
Expand Down

0 comments on commit d03d458

Please sign in to comment.