-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Prevent the occurrence of SyntaxError
in friendly modules.
#533
Prevent the occurrence of SyntaxError
in friendly modules.
#533
Conversation
Redefining the A safer option is to add an argument to When the right time comes to make a backward-incompatible change, I advise to change the method name to reflect that it does more than generate modules. |
Thank you for your feedback. As you pointed out, in reality, modules are not always being generated. However, this behavior of The comtypes/comtypes/client/_generate.py Lines 200 to 243 in b946aca
And for the friendly modules, if comtypes/comtypes/client/_generate.py Lines 158 to 175 in b946aca
comtypes/comtypes/client/_generate.py Lines 20 to 26 in b946aca
When I added refactoring to So,
has been the case from the beginning. I made changes to the code under the recognition that it would have a greater impact to make From Since the friendly module uses the side effects of the code generation of the wrapper module to determine which symbols to import, the newly generated friendly module becomes partial if the friendly module file does not exist and the wrapper module is loaded from the cache. Currently, if such a situation occurs, unlike before, it does not load from the cache, and |
I have added the test to verify that
This is similar to the existing This test involves a complex interplay of context-managers, To clarify the behavior within the fixtures, I've inserted I welcome any feedbacks as well. |
…erator`. Instead, `GetModule` attempts to load the existing modules.
If you mean that Therefore, I have made changes so that the attempt to load existing modules is done within |
Thank you for explaining this to me. My understanding of the code was not complete. I agree that the new responsibility belongs in |
Thank you for your reply. When I first looked at the codebase for Thank you. |
#524
See also #524 (comment) and #524 (comment).
I will wait for feedback from the community, and if there are no objections, I will merge this and release it as
comtypes==1.4.2
in early May.