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

test_distutils: test_check_metadata_deprecated fails if docutils-0.19 are installed #98634

Open
mgorny opened this issue Oct 25, 2022 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@mgorny
Copy link
Contributor

mgorny commented Oct 25, 2022

Bug report

If docutils-0.19 are installed system-wide while running CPython's test suite, the following test fails:

======================================================================
FAIL: test_check_metadata_deprecated (distutils.tests.test_register.RegisterTestCase.test_check_metadata_deprecated)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mgorny/git/cpython/Lib/distutils/tests/test_register.py", line 296, in test_check_metadata_deprecated
    self.assertEqual(len(w.warnings), 1)
AssertionError: 70 != 1

Apparently it's caused by multiple instances of the following warning:

/home/mgorny/git/cpython/Lib/distutils/command/check.py:128: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
  settings = frontend.OptionParser(components=(Parser,)).get_default_values()
/home/mgorny/git/cpython/Lib/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
  option = self.option_class(*args, **kwargs)

To reproduce

  1. Install docutils-0.19 using the system package manager.
  2. ./configure --prefix=/usr
  3. make -j$(nproc)
  4. make test

Your environment

  • CPython versions tested on: 3.11.0
  • Operating system and architecture: Gentoo/amd64
@mgorny mgorny added the type-bug An unexpected behavior, bug, or error label Oct 25, 2022
@mgorny mgorny changed the title tset_distutils: test_check_metadata_deprecated fails if docutils-0.19 are installed test_distutils: test_check_metadata_deprecated fails if docutils-0.19 are installed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant