Porting bitmessageqt to Qt5 #1389

Open
g1itch wants to merge 34 commits from g1itch/qt5-wip into v0.6
g1itch commented 2018-11-05 15:47:56 +01:00 (Migrated from github.com)

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.

Hello! I realized that column width problem in `QTableWidget` was actually the [Qt bug](https://bugreports.qt.io/browse/QTBUG-67131). I mostly finished work in this branch though it still needs some testing.
PeterSurda (Migrated from github.com) reviewed 2018-11-05 15:47:56 +01:00
PeterSurda commented 2018-11-09 13:47:02 +01:00 (Migrated from github.com)

Can we have some sort of fallback qtpy bundled?

Can we have some sort of fallback qtpy bundled?
PeterSurda commented 2018-11-09 13:48:31 +01:00 (Migrated from github.com)

The source doesn't look big, most of it are tests. And it's under MIT license.

The source doesn't look big, most of it are tests. And it's under MIT license.
g1itch commented 2018-11-09 13:51:23 +01:00 (Migrated from github.com)

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.

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](../../../g1itch/PyBitmessage/tree/ui-refactoring).
PeterSurda (Migrated from github.com) reviewed 2018-11-11 18:25:52 +01:00
@ -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.
PeterSurda (Migrated from github.com) commented 2018-11-11 18:25:52 +01:00

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.

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.
PeterSurda (Migrated from github.com) reviewed 2018-11-11 18:26:10 +01:00
@ -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.
PeterSurda (Migrated from github.com) commented 2018-11-11 18:26:10 +01:00

same problem here, should use LooseVersion

same problem here, should use `LooseVersion`
PeterSurda commented 2018-11-11 18:28:54 +01:00 (Migrated from github.com)

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.

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.
hub229ox commented 2018-11-13 10:31:03 +01:00 (Migrated from github.com)

qt4 is being less and less supported by the main distros

qt4 is being less and less supported by the main distros
g1itch commented 2019-02-12 11:39:00 +01:00 (Migrated from github.com)

Perhaps now you can do a review.

Perhaps now you can do a review.
g1itch commented 2019-04-25 11:51:33 +02:00 (Migrated from github.com)

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:

  1. maybe set wordWrap to false also for address book?
  2. #1435
OK, I manually resolved pycodestyle warnings in `bitmessageqt.settings` module. pycodestyle devs [refuse to implement](../../../PyCQA/pycodestyle/issues/381) per file ignore statements. So, except for review, there are two questions remaining for this PR: 1. maybe set wordWrap to false also for address book? 1. #1435
krytarowski commented 2019-10-27 15:19:06 +01:00 (Migrated from github.com)

Ping? I intend to remove pybitmessage from pkgsrc, unless there will be added qt5 support in place.

Ping? I intend to remove pybitmessage from pkgsrc, unless there will be added qt5 support in place.
g1itch commented 2019-10-28 08:20:36 +01:00 (Migrated from github.com)

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 branches ui-refactoring and ui-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?

> 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 branches `ui-refactoring` and `ui-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](../../../g1itch/altcoins-overlay/blob/master/net-p2p/pybitmessage/pybitmessage-0.6.3.2_p20191018-r1.ebuild#L62) and like [gentoo does](../../../gentoo/gentoo/blob/master/net-p2p/pybitmessage/pybitmessage-0.6.3.2_p20180521.ebuild#L16). What's a problem?
krytarowski commented 2019-10-29 04:17:03 +01:00 (Migrated from github.com)

I am not turning myself into developer, just a packager that picks tarballs from projects.

I am not turning myself into developer, just a packager that picks tarballs from projects.
dimyme commented 2019-11-15 01:20:03 +01:00 (Migrated from github.com)

Ping? I intend to remove pybitmessage from pkgsrc, unless there will be added qt5 support in place.

@krytarowski – – I never heard of pkgsrc in my life. turns out it is some AUR for NetBSD or sth..

> Ping? I intend to remove pybitmessage from pkgsrc, unless there will be added qt5 support in place. @krytarowski – – I never heard of pkgsrc in my life. turns out it is some AUR for NetBSD or sth..
dmp1ce commented 2019-11-15 17:23:12 +01:00 (Migrated from github.com)

@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.

@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.
dimyme commented 2019-11-15 17:37:53 +01:00 (Migrated from github.com)

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.

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.
krytarowski commented 2019-11-15 18:09:14 +01:00 (Migrated from github.com)

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.

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.
PeterSurda commented 2019-11-16 10:10:20 +01:00 (Migrated from github.com)

Is this ready for a review?

Is this ready for a review?
dimyme commented 2019-11-16 22:21:39 +01:00 (Migrated from github.com)

this branch generally worked OK for me but I just ran it briefly – did not fully analyse it.

this branch generally worked OK for me but I just ran it briefly – did not fully analyse it.
g1itch commented 2019-11-18 11:48:27 +01:00 (Migrated from github.com)

Is this ready for a review?

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.

> Is this ready for a review? 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.
g1itch commented 2020-10-19 14:06:08 +02:00 (Migrated from github.com)

It turns out that on Windows pyelliptic uses openssl dll bundled with PyQt4:

>>> from ctypes.util import find_library
>>> find_library('libeay32')
'C:\\Python27\\Lib\\site-packages\\PyQt4\\libeay32.dll'
It turns out that on Windows `pyelliptic` uses openssl dll bundled with `PyQt4`: ``` >>> from ctypes.util import find_library >>> find_library('libeay32') 'C:\\Python27\\Lib\\site-packages\\PyQt4\\libeay32.dll' ```
PeterSurda commented 2021-01-25 10:46:51 +01:00 (Migrated from github.com)

I need to allocate a couple of hours for review, and also to update buildbot. It may take a while.

I need to allocate a couple of hours for review, and also to update buildbot. It may take a while.
PeterSurda commented 2021-01-25 10:47:54 +01:00 (Migrated from github.com)

I like that it fixed a lot of code quality bugs.

I like that it fixed a lot of code quality bugs.
g1itch commented 2021-02-04 17:59:44 +01:00 (Migrated from github.com)

I will rebase it frequently because I have no more PyQt4 on my working PC.

I will rebase it frequently because I have no more PyQt4 on my working PC.
PeterSurda commented 2021-02-15 19:37:57 +01:00 (Migrated from github.com)

Needs to investigate how it affects the translation scripts.

Needs to investigate how it affects the translation scripts.
g1itch commented 2021-02-15 19:43:36 +01:00 (Migrated from github.com)

Needs to investigate how it affects the translation scripts.

How your translation bot is doing? He hasn't been seen for a long time.

> Needs to investigate how it affects the translation scripts. How your translation bot is doing? He hasn't been seen for a long time.
PeterSurda commented 2021-02-15 20:24:02 +01:00 (Migrated from github.com)

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.

> 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.
g1itch commented 2021-02-15 21:53:58 +01:00 (Migrated from github.com)

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.

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.
g1itch commented 2021-05-15 22:10:04 +02:00 (Migrated from github.com)

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/771261369
But it's harder to find the exact part because 49f9620 is squashed like hell.

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/771261369 But it's harder to find the exact part because 49f9620 is squashed like hell.
PeterSurda commented 2021-08-30 10:08:25 +02:00 (Migrated from github.com)

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.

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.
g1itch commented 2021-08-30 19:39:23 +02:00 (Migrated from github.com)

Can you make separate PRs of the components outside of bitmessageqt, if there are any left?

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 .. by from PyQt5 import .. and fallback.qtpy by fallback.PyQt5 based on qtpy.

> Can you make separate PRs of the components outside of `bitmessageqt`, if there are any left? 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 ..` by `from PyQt5 import ..` and `fallback.qtpy` by `fallback.PyQt5` based on qtpy.
kdcis commented 2021-09-20 12:39:45 +02:00 (Migrated from github.com)

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.

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.
g1itch commented 2021-09-20 15:16:52 +02:00 (Migrated from github.com)

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

> 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
This repo is archived. You cannot comment on pull requests.
No description provided.