Repository navigation
TST: Replace pywin32 with ctypes wrapper - #31358
Merged
Merged
Conversation
We only use `pywin32` for one function, and while taking care of all the wrapping is nice, it's easy to just take the information from the MSDN docs [1] and pass it through `ctypes` instead. This avoids the dependency entirely, helping to fix package conflicts with pixi [2]. [1] https://learn.microsoft.com/en-us/windows/console/generateconsolectrlevent [2] matplotlib#30877 (comment)
Member
Author
|
Looking at the Azure logs, all Qt backends are skipped, so we have to wait for AppVeyor to confirm. |
Member
Author
|
On AppVeyor, PyQt6, PySide6, and PySide2 are skipped, but not PyQt5. And that passes, so this does appear to have worked. |
QuLogic
marked this pull request as ready for review
March 24, 2026 01:39
jklymak
approved these changes
Mar 24, 2026
timhoffm
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
We only use
pywin32for one function, and while taking care of all the wrapping is nice, it's easy to just take the information from the MSDN docs [1] and pass it throughctypesinstead.This avoids the dependency entirely, helping to fix package conflicts with pixi [2].
[1] https://learn.microsoft.com/en-us/windows/console/generateconsolectrlevent
[2] #30877 (comment)
AI Disclosure
None
PR checklist