Skip to content

Commit b11895e

Browse 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

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Lib/test/test_check_c_globals.py

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy