Skip to content

Add explicit float -> int conversion for Qt#1041

Merged
corranwebster merged 4 commits into
mainfrom
fix/pyqt5-float-truncation
Apr 18, 2023
Merged

Add explicit float -> int conversion for Qt#1041
corranwebster merged 4 commits into
mainfrom
fix/pyqt5-float-truncation

Conversation

@corranwebster
Copy link
Copy Markdown
Contributor

This was happening implicitly until https://bugs.python.org/issue36048 This makes it explicit, which means things should work with PyQt5 on Python 3.10.

Fixes #1037

@corranwebster corranwebster marked this pull request as ready for review April 18, 2023 15:50
Copy link
Copy Markdown
Member

@jwiggins jwiggins left a comment

Choose a reason for hiding this comment

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

Are these really the only call sites?

@corranwebster
Copy link
Copy Markdown
Contributor Author

Are these really the only call sites?

Quite likely the only ones that have a mismatch between floats and ints. The interface between the toolkit and Enable is fairly thin (here's a control, draw your stuff in it, listen for events; plus the native scrollbar stuff).

On an unrelated note, this seems to have turned the MacOS wx tests back on somehow... I will fix before merging.

@corranwebster corranwebster merged commit 6135fea into main Apr 18, 2023
@corranwebster corranwebster deleted the fix/pyqt5-float-truncation branch April 18, 2023 18:18
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.

PyQt5 on Python 3.10 doesn't cast float to int

2 participants