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

Differently work around PyQt5 bug with argument types #3777

Merged
merged 2 commits into from
Oct 19, 2020
Merged

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Oct 19, 2020

Qt's getOpenFileUrls() and related Url-based functions are supposed to take a QUrl for the 'directory' argument (starting path), but until PyQt5 5.13.1 the argument was mis-typed as str.

The Windows builders refuse to freeze distutils for some reason, so rather than use distutils.version.LooseVersion for the comparison, we just resort to string compares on PyQt5.QtCore.PYQT_VERSION_STR. Python's string comparison operators typically do the right thing with m.n.o-style version numbers, so it should be fine.

Qt's getOpenFileUrls() and related Url-based functions are supposed to
take a QUrl for the 'directory' argument (starting path), but until
PyQt5 5.13.1 the argument was mis-typed as str.

Fix workaround
@ferdnyc ferdnyc merged commit 372bc87 into develop Oct 19, 2020
@ferdnyc ferdnyc deleted the qurl-file-fix branch October 19, 2020 19:30
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.

1 participant