[Python-modules-team] Bug#834875: regression: qsettings can no longer save binary strings

2016-09-03 Thread Dmitry Shachnev
On Sun, Aug 28, 2016 at 06:54:35PM +0200, Salvo Tomaselli wrote:
> But now, to work around it, relational pickles and then encodes to
> base64 before storing to QSettings.

That is quite a bad work-around. If your upstream wants to support PyQt v5.7
(as released upstream), it is better to wrap the value in QByteArray.

--
Dmitry Shachnev


signature.asc
Description: PGP signature
___
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

[Python-modules-team] Bug#834875: regression: qsettings can no longer save binary strings

2016-08-27 Thread Dmitry Shachnev
Hi Salvo,

On Sat, Aug 20, 2016 at 09:18:51AM +0200, Salvo Tomaselli wrote:
> in relational, I store the session as a binary string generated with the 
> pickle
> module and save it using QSettings.
> 
> now the functionality is broken, without changing the code in relational, so
> it is a regression in Qt or PyQt.

Now this is fixed. However storing pickled strings in QSettings usually does
not make much sense.

When a non-Qt object (such as bytes) is stored in QSettings, it gets pickled
by PyQt. So in your case there will be double pickling.

You can either store the object directly, or wrap the bytestring into a
QtCore.QByteArray (which is a native Qt object).

-- 
Dmitry Shachnev


signature.asc
Description: PGP signature
___
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

[Python-modules-team] Bug#834875: regression: qsettings can no longer save binary strings

2016-08-20 Thread Salvo Tomaselli
Package: python3-pyqt5
Version: 5.7+dfsg-1
Severity: normal
Tags: upstream

Dear Maintainer,

in relational, I store the session as a binary string generated with the pickle
module and save it using QSettings.

now the functionality is broken, without changing the code in relational, so
it is a regression in Qt or PyQt.

I don't know how to try to replicate the issue in C++, since binary strings are
a python thing, and I couldn't find how to report bugs to riverbanks, so I am
opening this bug in hope that you know best how to proceed about this.

Best

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0d (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-pyqt5 depends on:
ii  libc62.23-4
ii  libgcc1  1:6.1.1-12
ii  libpython3.5 3.5.2-3
ii  libqt5core5a [qtbase-abi-5-6-1]  5.6.1+dfsg-3+b1
ii  libqt5dbus5  5.6.1+dfsg-3+b1
ii  libqt5designer5  5.6.1-2
ii  libqt5gui5   5.6.1+dfsg-3+b1
ii  libqt5help5  5.6.1-2
ii  libqt5network5   5.6.1+dfsg-3+b1
ii  libqt5printsupport5  5.6.1+dfsg-3+b1
ii  libqt5test5  5.6.1+dfsg-3+b1
ii  libqt5widgets5   5.6.1+dfsg-3+b1
ii  libqt5xml5   5.6.1+dfsg-3+b1
ii  libstdc++6   6.1.1-12
ii  python3  3.5.1-4
ii  python3-sip [sip-py3api-11.3]4.18.1+dfsg-1
pn  python3:any  

python3-pyqt5 recommends no packages.

Versions of packages python3-pyqt5 suggests:
pn  python3-pyqt5-dbg  

-- no debconf information

___
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team