Commit 6585e9f
Make strict modules appear as normal modules
Summary:
There's a big perf difference when getting the source info for a strict module vs a normal module: https://fb.workplace.com/groups/653235072286882/permalink/1791930228417355/
This is because `getmodule` gets a lot more complicated when things aren't modules: https://www.internalfb.com/code/fbsource/[630a7e128132fa049cea4b73d9d9eb079e0608d6]/third-party/python/3.12/Lib/inspect.py?lines=988
This does the same strict to make our StrictModule test as a normal module for `isinstance` that we use with generators.
Reviewed By: alexmalyshev
Differential Revision: D79454110
fbshipit-source-id: b1b5d4e8680ae354a46fa584fd9f79287786ee791 parent 1c5638f commit 6585e9f
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
447 | | - | |
| 446 | + | |
448 | 447 | | |
449 | 448 | | |
450 | 449 | | |
| |||
0 commit comments