Activity log for bug #1956547

Date Who What changed Old value New value Message
2022-01-06 03:08:11 FeRD (Frank Dana) bug added bug
2022-01-06 03:08:11 FeRD (Frank Dana) attachment added Patch 1: Call toString() on the QDateTime value in infodialog.py https://bugs.launchpad.net/bugs/1956547/+attachment/5551893/+files/0001-Info-dlg-Use-QDateTime.toString.patch
2022-01-06 03:08:57 FeRD (Frank Dana) attachment added Patch 2: Handle QDateTime in value_str() under Python 3 https://bugs.launchpad.net/hplip/+bug/1956547/+attachment/5551894/+files/0002-value_str-Handle-QDateTime-correctly.patch
2022-01-06 03:12:24 FeRD (Frank Dana) description Under Python 3 with PyQt5, the string representation of PyQt5.QtCore.QDateTime is not a formatted string. So, the "Date/Time" column of the Device Information dialog's Status History tab is displaying values like: PyQt5.QtCore.QDateTime(2022,1,5,21,51,53) There are two possible fixes for this, I'm attaching patches for both approaches. They are compatible with each other and could be applied together, but only one is necessary. Patch 1: To fix the display of this particular column, only, the call to value_str(dt) in ui5/infodialog.py can be changed to value_str(dt.toString()). Patch 2: To fix this for all QDateTime values in the system, value_str can be made to detect the type and apply data.toString() even when running under Python 3. (It will always apply data.toString(), under Python 2.) Under Python 3 with PyQt5, the string representation of PyQt5.QtCore.QDateTime is not a formatted string. So, the "Date/Time" column of the Device Information dialog's Status History tab is displaying values like: PyQt5.QtCore.QDateTime(2022,1,5,21,51,53) There are two possible fixes for this, I'm attaching patches for both approaches. They are compatible with each other and could be applied together, but only one is necessary. Patch 1: To fix the display of this particular column, only, the call to value_str(dt) in ui5/infodialog.py can be changed to value_str(dt.toString()) Patch 2: To fix this for all QDateTime values in the system, value_str can be made to detect the type and apply data.toString() even when running under Python 3. (It will always apply data.toString(), under Python 2.)
2022-01-23 18:50:44 FeRD (Frank Dana) description Under Python 3 with PyQt5, the string representation of PyQt5.QtCore.QDateTime is not a formatted string. So, the "Date/Time" column of the Device Information dialog's Status History tab is displaying values like: PyQt5.QtCore.QDateTime(2022,1,5,21,51,53) There are two possible fixes for this, I'm attaching patches for both approaches. They are compatible with each other and could be applied together, but only one is necessary. Patch 1: To fix the display of this particular column, only, the call to value_str(dt) in ui5/infodialog.py can be changed to value_str(dt.toString()) Patch 2: To fix this for all QDateTime values in the system, value_str can be made to detect the type and apply data.toString() even when running under Python 3. (It will always apply data.toString(), under Python 2.) Under Python 3 with PyQt5, the string representation of PyQt5.QtCore.QDateTime is not a formatted string. So, the "Date/Time" column of the Device Information dialog's Status History tab is displaying values like: PyQt5.QtCore.QDateTime(2022,1,5,21,51,53) There are two possible fixes for this, I'm attaching patches for both approaches. They are compatible with each other and could be applied together, but either patch alone is sufficient to fix the problem. Patch 1: To fix the display of this particular column, only, the call to value_str(dt) in ui5/infodialog.py can be changed to value_str(dt.toString()) Patch 2: To fix this for all QDateTime values in the system, value_str can be made to detect the type and apply data.toString() even when running under Python 3. (It will always apply data.toString(), under Python 2.)