Skip to content
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

Add EnumDesktopWindows && stuff #2219

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

CristiFati
Copy link
Contributor

To be merged AFTER #2189 (as this is branched from that one).

EnumDesktopWindows is the main thing, the rest is just a quick win with minimal code changes.

Copy link
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems great but I don't understand the test. Also, could you please add a changelog entry seeing this is a user-visible feature.

self.assertRaises(
ValueError, win32gui.EnumWindows, self.enum_callback_exc, data
)
if sys.version_info[:2] >= (3, 10):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this only works in 3.10 an up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thing you asked, it is just the float value. I return it from the callback and the problem arises when it's converted to long. https://docs.python.org/3/c-api/long.html#c.PyLong_AsLong.

win32/test/test_win32gui.py Outdated Show resolved Hide resolved
win32/test/test_win32gui.py Outdated Show resolved Hide resolved
win32/test/test_win32gui.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants