-
Notifications
You must be signed in to change notification settings - Fork 55
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
remove conditionals on python version #635
Conversation
Codecov Report
@@ Coverage Diff @@
## master #635 +/- ##
==========================================
- Coverage 39.22% 39.19% -0.03%
==========================================
Files 491 491
Lines 26916 26905 -11
Branches 4069 4065 -4
==========================================
- Hits 10557 10545 -12
+ Misses 15903 15901 -2
- Partials 456 459 +3
Continue to review full report at Codecov.
|
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.
Changes LGTM but i'm a little concerned about the changes in pyface.qt.__init__
. Can you hold off on merging this until we can get another pair of eyes on this PR?
Yeah I will hold off, tbh I was a bit unsure myself - was curious for any feedback. |
pyface/qt/__init__.py
Outdated
sip.setapi("QDate", 2) | ||
sip.setapi("QDateTime", 2) | ||
sip.setapi("QString", 2) | ||
sip.setapi("QTextStream", 2) | ||
sip.setapi("QTime", 2) | ||
sip.setapi("QUrl", 2) | ||
sip.setapi("QVariant", 2) |
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.
This code path still gets run in Python 3 with PyQt4. The outcome of this import side effect may not have been well tested, and it would be difficult to track down to this change if this removal should cause issues.
Are there other reasons for removing this apart from the comment and message surrounding it being Python 2 specific?
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.
No, it was simply removed because of the comment and Rahul saying we might be able to remove it on the original issue. To prevent potential additional headaches from its removal, I will add it back in - thanks!
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.
I see. Yes please add it back in. Thank you!
Finger-crossed we won't need to support PyQt4 for much longer so this function is on already the death row - just not quite there yet :)
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.
Should I add back in the places where it was called? The one I'm most unsure about is the one below that was on line 61 as that if statement only occurs if python2 is being used explicitly.
(In the latest commit I added all the code where it was called that had been removed back. If needed I can re-remove it.
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.
You're right - I think the one under if qt_api == "pyqt" and sys.version_info[0] <= 2:
can be safely removed.
fixes #601