Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-135852: Remove out of tree pywin32 dependency for NTEventLogHandler#137860
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sharktide left a comment
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.
Please fix the test fails :)
aisk commentedAug 18, 2025
Sorry, I forgot to check the CI result after the push. |
serhiy-storchaka left a comment
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.
Thank you for your PR@aisk. It look interesting.
Could you please show how can this be used inNTEventLogHandler? Maybe not in this PR, but in a separate PR created on top of this?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
aisk commentedSep 9, 2025
Thanks for the view! I'll create another PR based on this to try to implement the whole feature in the original issue. |
aisk commentedOct 19, 2025
@serhiy-storchaka Hi, I found that using this in |
serhiy-storchaka left a comment
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.
Very well. I have some nitpicks and questions, but mostly LGTM.
NTEventLogHandler only uses a single-string list and don't use a raw_data. Removing these features would simplify the code. But it is fine to keep them for future.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
aisk commentedOct 24, 2025
Hi, thank you for the review! I changed to just to support a single string as event log message to reduce the complexity, and now the codes are ready for review. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka left a comment
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.
LGTM. 👍
3c4429f intopython:mainUh oh!
There was an error while loading.Please reload this page.
serhiy-storchaka commentedDec 31, 2025
Thank you for your contribution,@aisk. 🎄 |
bedevere-bot commentedDec 31, 2025
|
Uh oh!
There was an error while loading.Please reload this page.
Please note that the
lpUserSidparameter inReportEvent don't added because it needs passing a new struct from Python to it, and we don't need this parameter for the usage of implementNTEventLogHandler. If we want add it in the future, we can add it as kwargs.Docuements for these functions:
For the
NTEventLogHandler, there is a implementation detail:The old implementation based on
pywin32, ifdllnameis not specified,pywin32will using a vendored dll in that package, as a log template for the NT event log system.For the new implement in this PR, if the
dllnameis not specified, I decided not to register the dll. As a result, the log still can be send to the NT Event Log System, we can see it in the Event Viewer.But the event will show some thing like this (I just use a picture from the Internet because I'm using a localized Windows which the text is Chinese but they are the same thing):
And I think it's OK because we can check the Detail tab to see the original message, for develop purpose this is enough. For users with production usage, they can provide their own dlls as the message template.
logging.handlers.NTEventLogHandler#135852