Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jan 30, 2026

Ignore "math.integer" extension if "math" is in
sys.stdlib_module_names.

Ignore "math.integer" extension if "math" is in
sys.stdlib_module_names.

@skip_segfault_on_android
def test_dump_ext_modules(self):
# Disable sys.stdlib_module_names
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just duplicates the below, "Don't filter stdlib module names," IMO we don't need both.

Comment on lines +421 to +422
match = re.search(r'^Extension modules:', stderr, re.MULTILINE)
self.assertIsNone(match)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
match = re.search(r'^Extension modules:', stderr, re.MULTILINE)
self.assertIsNone(match)
self.assertNotIn('Extension modules:', stderr)

Why not just so?

@@ -0,0 +1,3 @@
When :mod:`faulthandler` dumps the list of third-party extension modules,
ignore ``math.integer`` sub-module since ``math`` package is part of
Copy link
Member

@StanFromIreland StanFromIreland Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be more general, e.g. "ignore sub-modules of packages in ..."? Otherwise it makes it seem like only the one specific case is affected.

}
assert(key_len > len);

// Ignore "math.integer" if key starts with "math."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Ignore "math.integer" if key starts with "math."
// Ignore sub-modules of stdlib packages

Same as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants