[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] [bug] QFontMetrics Regression in 5.13 on Python2
From:       Chris Billington <chrisjbillington () gmail ! com>
Date:       2019-07-11 14:53:48
Message-ID: CAKy3cVurE49_aEvH0pdvu80S=Yo6fYrAUu_NkBThQEe7pf=aWA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Fantastic, thanks very much Phil.

-Chris

On Thu, Jul 11, 2019 at 9:35 AM Phil Thompson <phil@riverbankcomputing.com>
wrote:

> On 08/07/2019 15:18, Chris Billington wrote:
> > The following example raises an exception on Python 2 with PyQt5 5.13.
> > It
> > does not raise an exception on Python 3 or on PyQt5 5.12.3.
> >
> > from PyQt5.QtWidgets import QApplication
> > from PyQt5.QtGui import QFontMetrics
> > app = QApplication([])
> > QFontMetrics(app.font()).inFont(u'\u2605')
> >
> > Traceback (most recent call last):
> >   File "292.py", line 4, in <module>
> >     QFontMetrics(app.font()).inFont(u'\u2605')
> > ValueError: string of length 1 expected
> >
> > This causes tortoisehg to crash for example, as it contains the above
> > QFontMetrics call. u'\u2605' looks like a string of length one to me,
> > so
> > this looks like perhaps confounding byte-length with codepoint-length.
>
> This will be fixed in tonight's snapshot.
>
> It's actually a bad regression (but only affects Python v2) so there
> will be a v5.13.1 release soon.
>
> Thanks,
> Phil
>

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr">Fantastic, thanks very much \
Phil.<div><br></div><div>-Chris</div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Thu, Jul 11, 2019 at 9:35 AM Phil Thompson &lt;<a \
href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px \
solid rgb(204,204,204);padding-left:1ex">On 08/07/2019 15:18, Chris Billington wrote:<br> &gt; \
The following example raises an exception on Python 2 with PyQt5 5.13. <br> &gt; It<br>
&gt; does not raise an exception on Python 3 or on PyQt5 5.12.3.<br>
&gt; <br>
&gt; from PyQt5.QtWidgets import QApplication<br>
&gt; from PyQt5.QtGui import QFontMetrics<br>
&gt; app = QApplication([])<br>
&gt; QFontMetrics(app.font()).inFont(u&#39;\u2605&#39;)<br>
&gt; <br>
&gt; Traceback (most recent call last):<br>
&gt;     File &quot;292.py&quot;, line 4, in &lt;module&gt;<br>
&gt;        QFontMetrics(app.font()).inFont(u&#39;\u2605&#39;)<br>
&gt; ValueError: string of length 1 expected<br>
&gt; <br>
&gt; This causes tortoisehg to crash for example, as it contains the above<br>
&gt; QFontMetrics call. u&#39;\u2605&#39; looks like a string of length one to me, <br>
&gt; so<br>
&gt; this looks like perhaps confounding byte-length with codepoint-length.<br>
<br>
This will be fixed in tonight&#39;s snapshot.<br>
<br>
It&#39;s actually a bad regression (but only affects Python v2) so there <br>
will be a v5.13.1 release soon.<br>
<br>
Thanks,<br>
Phil<br>
</blockquote></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic