Porting bitmessageqt to Qt5 #1389
No reviewers
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-12-16#1389
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "g1itch/qt5-wip"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello!
I realized that column width problem in
QTableWidget
was actually the Qt bug.I mostly finished work in this branch though it still needs some testing.
Can we have some sort of fallback qtpy bundled?
The source doesn't look big, most of it are tests. And it's under MIT license.
Probably yes. I thought of it, just forgot. I think it should be slim compatibility layer which just imports PyQt5.
BTW, I decided to finish UI refactoring in separate branch.
@ -383,21 +383,27 @@ def check_pyqt():
Here we are checking for PyQt4 with its version, as for it require
PyQt 4.8 or later.
These tests are wrong as they compare strings and it thinks '4.11.4' < '4.8'. You need to use
from distiutils.version import LooseVersion
and then wrap these comparisons in
LooseVersion
like qtpy does it.@ -383,21 +383,27 @@ def check_pyqt():
Here we are checking for PyQt4 with its version, as for it require
PyQt 4.8 or later.
same problem here, should use
LooseVersion
I tried it, and it runs both with pyqt4 and pyqt5 and you can use the environment variable
QT_API
to override. Well done. I haven't looked at it in detail, but it seems pretty straightforward, just a lot of string replacements of Qt4 to QtPy. Please clean up the linter complaints and I'll try to do a full review asap.qt4 is being less and less supported by the main distros
Perhaps now you can do a review.
OK, I manually resolved pycodestyle warnings in
bitmessageqt.settings
module. pycodestyle devs refuse to implement per file ignore statements.So, except for review, there are two questions remaining for this PR:
Ping? I intend to remove pybitmessage from pkgsrc, unless there will be added qt5 support in place.
Strange decision. The main application of PyBitmessage is daemon, not the bitmessageqt UI.
The main problem of this changeset is handling of
myTableWidgetItem.data()
. I'm trying to debug it in branchesui-refactoring
andui-changes
using PyQt4. Then that changes will be rebased on top of this branch and I will require a review. But if you just need the PyQt5 based UI you may use this branch as qt5 support patch like I do in my ebuild and like gentoo does. What's a problem?I am not turning myself into developer, just a packager that picks tarballs from projects.
@krytarowski – – I never heard of pkgsrc in my life. turns out it is some AUR for NetBSD or sth..
@dimyme, @krytarowski is probably maintaining a Bitmessage package for Arch Linux. Arch Linux uses the latest releases of software pretty much all the time, which makes supporting old libraries like Qt4 difficult. As an Arch Linux user and package maintainer myself, I feel his pain!
Maintainers can apply patches to make software work on Arch Linux but typically the "Arch way" is to use as close to upstream as possible. This is a preview to come for other distributions as Arch Linux usually leads with the way with cutting edge software.
At some point, I'm going to work on a Snap for Bitmessage, which will give linux users another option for install Bitmessage.
it is not – @dmp1ce – that we don't know Qt4 is getting lese and less support. but "someone" gotta actually do the upgrading… so far it is W.I.P.
I just use NetBSD and actually dropped bitmessage from pkgsrc. I can readd it in future once it will support Qt5 out of the box.
Is this ready for a review?
this branch generally worked OK for me but I just ran it briefly – did not fully analyse it.
Yes. You may do a review but there is a known problem with
myTableWidgetItem.data()
which I planned to address in the next part of ui-refactoring PR series.It turns out that on Windows
pyelliptic
uses openssl dll bundled withPyQt4
:I need to allocate a couple of hours for review, and also to update buildbot. It may take a while.
I like that it fixed a lot of code quality bugs.
I will rebase it frequently because I have no more PyQt4 on my working PC.
Needs to investigate how it affects the translation scripts.
How your translation bot is doing? He hasn't been seen for a long time.
It's on a machine that's scheduled to be decommissioned, I haven't monitored it and think it's broken. It needs to be moved to buildbot. But one thing needs to be checked in this PR manually, and that is translating strings with arguments. I don't know if it supports
format
, at least the Qt4 version didn't.Updating: https://travis-ci.org/github/g1itch/PyBitmessage/jobs/759108941#L423
Settings dialog and NetworkStatus tab lost their translations - this is what I see on my desktop.
I faced another bug similar to #1758 in this branch ): https://travis-ci.org/github/g1itch/PyBitmessage/jobs/771253480
It's surely introduced in
49f9620
or one of my quickfix commits, because when I remove them it passes the dry run test: https://travis-ci.org/github/g1itch/PyBitmessage/jobs/771261369But it's harder to find the exact part because
49f9620
is squashed like hell.Can you make separate PRs of the components outside of
bitmessageqt
, if there are any left? If there aren't, then I'll start merging other work.I'll try. But I suspect that most of them are related to the
_translate()
result (Qt API v2).Also, after separating the qidenticon work I changed my mind about the fallback: now I'm going to replace that
from qtpy import ..
byfrom PyQt5 import ..
andfallback.qtpy
byfallback.PyQt5
based on qtpy.Hi @g1itch , I've tested appimage builds of this PR based on instructions of @PeterSurda .
And while testing it on ubuntu 18 & 20 versions, I found that the appimage builds of this PR are not taking keyboard inputs.
I know. I described it in https://github.com/g1itch/PyBitmessage/issues/12