-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix issues in Python3/PyQt5.5 #2576
Conversation
@@ -93,14 +93,14 @@ def clear_breakpoint(filename, lineno): | |||
class EditorConfigPage(PluginConfigPage): | |||
def get_name(self): | |||
return _("Editor") | |||
|
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.
Ok, first comment: please revert all this blank space changes :-) This makes merging other PRs really, really hard.
… Error in Python3/PyQt5.5
I have reverted the changes about spaces. |
if event.delta() < 0: | ||
self.zoom_out.emit() | ||
elif event.delta() > 0: | ||
self.zoom_in.emit() |
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.
Why this change? I say it because it's not related to QByteArray
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.
It's another bug related to PyQt5.5 . I fixed it and created a new pull request. I don't know why it is shown here.
Should I create a new branch for this?
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.
Don't worry, let's consolidate all PyQt5.5 issues here
Thanks for your work @cy18! I'm going to merge this so we can release our first beta of Spyder 3.0 ;-) Please open new PRs if you find more issues with PyQt5.5 |
Fix issues in Python3/PyQt5.5
Fixes #2573
Fix issue that codes like QByteArray().fromHex(str(state)) raise Type Error in Python3/PyQt5.5
A Type Error is raised when codes like QByteArray().fromHex(str(state)) are called.
It seems the error is because in python3, str(state) will return an string while the QByteArray().fromHex expect an hex array.
I search the whole project of spyder and modifed codes like QByteArray().fromHex(str(state)) to QByteArray().fromHex(str(state).encode('utf-8')). The encode method of string will return a byte array in python3 and a string in python2.
I'm not familiar with PyQt and the source code of spyder. Feel free to reject my pull request if you have a better solution for this issue.