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

Deprecation warning with docutils frontend.OptionParser #2904

Open
LecrisUT opened this issue May 5, 2024 · 0 comments
Open

Deprecation warning with docutils frontend.OptionParser #2904

LecrisUT opened this issue May 5, 2024 · 0 comments

Comments

@LecrisUT
Copy link
Contributor

LecrisUT commented May 5, 2024

I just got hit by a bunch of deprecation warnings coming from:

tmt/tmt/utils.py

Lines 7359 to 7364 in 78742f9

def parse_rst(text: str) -> docutils.nodes.document:
""" Parse a ReST document into docutils tree of nodes """
parser = docutils.parsers.rst.Parser()
components = (docutils.parsers.rst.Parser,)
settings = docutils.frontend.OptionParser(components=components).get_default_values()

warning : /usr/lib/python3.12/site-packages/tmt/utils.py:7003: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
  settings = docutils.frontend.OptionParser(components=components).get_default_values()

I was only doing pytest --help 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant