Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address some deprecation warnings #103

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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.19,<0.21
restructuredtext-lint>=0.7
stevedore
tomli; python_version < '3.11'
Expand Down
2 changes: 1 addition & 1 deletion src/doc8/checks.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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