From c7a0ffc7447be5f821df764a273c76ba9425e958 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Thu, 2 Oct 2025 11:16:58 +0200 Subject: [PATCH] make pytest hide sphinx deprecation warnings --- python_basics/score_pytest/pytest.ini | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/python_basics/score_pytest/pytest.ini b/python_basics/score_pytest/pytest.ini index 1c6213c..88d0f80 100644 --- a/python_basics/score_pytest/pytest.ini +++ b/python_basics/score_pytest/pytest.ini @@ -38,4 +38,19 @@ norecursedirs = junit_duration_report = call junit_family = xunit1 -filterwarnings = ignore::pytest.PytestExperimentalApiWarning +filterwarnings = + ignore::pytest.PytestExperimentalApiWarning + + # Silence third-party deprecations from sphinx_needs targeting Python 3.14 removals. + # We'll drop these ignores once sphinx_needs releases a fix. + ignore:.*deprecated.*Python 3\.14.*:DeprecationWarning:sphinx_needs\..* + + # Docutils is deprecating OptionParser in favor of argparse (0.21+). + # This one originates inside sphinx_needs.layout. + # We'll drop these ignores once sphinx/sphinx_needs releases a fix. + ignore:^The frontend\.OptionParser class will be replaced by a subclass of argparse\.ArgumentParser in Docutils 0\.21 or later\.:DeprecationWarning:sphinx_needs\.layout + + # This one bubbles up from stdlib optparse but is *explicitly* a Docutils message. + # We match the full message to avoid silencing unrelated optparse warnings. + # We'll drop these ignores once sphinx/sphinx_needs releases a fix. + ignore:^The frontend\.Option class will be removed in Docutils 0\.21 or later\.:DeprecationWarning:optparse