GeezerVison is showing github.com — configure warnings as errors in the test suite · Issue #128770 · python/cpython
configure warnings as errors in the test suite #128770Activitysobolevn commented on Jan 13, 2025 See #110012 test_socket raises warnings right now. graingert commented on Jan 14, 2025 ContributorAuthor More actions See #128816 test_doctest also has a warning graingert commented on Jan 14, 2025 ContributorAuthor More actions
See #110012 test_socket raises warnings right now.
I'm thinking we mark these as default with catch_warnings in the test for now? added a commit that references this issue on Jan 17, 2025gh-128770: raise warnings as errors in test suite - except for test_s… added a commit that references this issue on Mar 27, 2025gh-128770: raise warnings as errors in test suite - except for test_s… kulikjak commented on Apr 9, 2025 Hi, after this change (specifically #131802), I am seeing the following errors when running test_peg_generator:
======================================================================
ERROR: test_with_stmt_with_paren (test.test_peg_generator.test_c_parser.TestCParser.test_with_stmt_with_paren)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/Python-3.13.3/Lib/test/test_peg_generator/test_c_parser.py", line 113, in setUp
cmd = support.missing_compiler_executable()
File "/build/Python-3.13.3/Lib/test/support/__init__.py", line 1916, in missing_compiler_executable
if spawn.find_executable(cmd[0]) is None:
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/lib/python3.13/vendor-packages/setuptools/_distutils/spawn.py", line 87, in find_executable
warnings.warn(
~~~~~~~~~~~~~^
'Use shutil.which instead of find_executable', DeprecationWarning, stacklevel=2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
DeprecationWarning: Use shutil.which instead of find_executable
I tried replacing spawn.find_executable with shutil.which as the warning suggests, but then I get a different distutils warning and test still fails:
======================================================================
ERROR: test_with_stmt_with_paren (test.test_peg_generator.test_c_parser.TestCParser.test_with_stmt_with_paren)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/Python-3.13.3/Lib/test/test_peg_generator/test_c_parser.py", line 395, in test_with_stmt_with_paren
self.run_test(grammar_source, test_source)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/Python-3.13.3/Lib/test/test_peg_generator/test_c_parser.py", line 134, in run_test
self.build_extension(grammar_source)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/build/Python-3.13.3/Lib/test/test_peg_generator/test_c_parser.py", line 131, in build_extension
generate_parser_c_extension(grammar, Path('.'), library_dir=self.library_dir)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/Python-3.13.3/Tools/peg_generator/pegen/testutil.py", line 107, in generate_parser_c_extension
compile_c_extension(
~~~~~~~~~~~~~~~~~~~^
str(source),
^^^^^^^^^^^^
...<3 lines>...
library_dir=library_dir,
^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/build/Python-3.13.3/Tools/peg_generator/pegen/build.py", line 98, in compile_c_extension
from setuptools._distutils.dep_util import newer_group
File "/usr/lib/python3.13/vendor-packages/setuptools/_distutils/dep_util.py", line 9, in __getattr__
warnings.warn(
~~~~~~~~~~~~~^
"dep_util is Deprecated. Use functions from setuptools instead.",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DeprecationWarning,
^^^^^^^^^^^^^^^^^^^
stacklevel=2,
^^^^^^^^^^^^^
)
^
DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
This is with 3.13 only, which makes sense as that is the only one which we have setuptools for also installed.
I wonder what is different about my setup considering that nobody else reported this? kulikjak commented on May 6, 2025 FYI: both these issues were fixed recently in #132906 and #132921.
I also encountered another issue uncovered by this change and created an issue for it here: #133509 graingert commented on May 19, 2025 ContributorAuthor More actions Reacted by Hugo van Kemenade AmazerThaDik commented on May 19, 2025
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|