Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b11895e

Browse filesBrowse files
gh-95349: Hide a Distutils Warning Filter for test_check_c_globals (GH-95837)
Under certain build conditions, test_check_c_globals fails. This fix takes the same approach as we took for gh-84236 (via gh-20095). We'll be removing use of distutils in the c-analyzer at some point. Until then we'll hide the warning filter. (cherry picked from commit 3ff6d9a) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
1 parent b4f968e commit b11895e
Copy full SHA for b11895e

File tree

1 file changed

+6
-1
lines changed
Filter options

1 file changed

+6
-1
lines changed

‎Lib/test/test_check_c_globals.py

Copy file name to clipboardExpand all lines: Lib/test/test_check_c_globals.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import unittest
22
import test.test_tools
3+
from test.support.warnings_helper import save_restore_warnings_filters
34

45
test.test_tools.skip_if_missing('c-analyzer')
56
with test.test_tools.imports_under_tool('c-analyzer'):
6-
from cpython.__main__ import main
7+
# gh-95349: Save/restore warnings filters to leave them unchanged.
8+
# Importing the c-analyzer imports docutils which imports pkg_resources
9+
# which adds a warnings filter.
10+
with save_restore_warnings_filters():
11+
from cpython.__main__ import main
712

813

914
class ActualChecks(unittest.TestCase):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.