-
-
Notifications
You must be signed in to change notification settings - Fork 34k
gh-140824: Fix _Py_DumpExtensionModules() to ignore sub-modules #144339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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 |
There was a problem hiding this comment.
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.
| match = re.search(r'^Extension modules:', stderr, re.MULTILINE) | ||
| self.assertIsNone(match) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 | |||
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Ignore "math.integer" if key starts with "math." | |
| // Ignore sub-modules of stdlib packages |
Same as above.
Ignore "math.integer" extension if "math" is in
sys.stdlib_module_names.