<div dir="ltr">Investigating a bit more, I tried to diff PyQt5 5.12.3 and 5.13.0 and if I'm understanding correctly, the two source tarballs are identical, meaning the difference is just which version of Qt it is built with. This makes me think that the problem I'm seeing must be due to a change in Qt itself rather than PyQt, though I suspect the required solution would be in PyQt still, since the problem is only present on Python 2.<div><br></div><div>-Chris<br><div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 8, 2019 at 10:18 AM Chris Billington <<a href="mailto:chrisjbillington@gmail.com">chrisjbillington@gmail.com</a>> 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"><div dir="ltr">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.<div><br></div><div>from PyQt5.QtWidgets import QApplication<br>from PyQt5.QtGui import QFontMetrics<br>app = QApplication([])<br>QFontMetrics(app.font()).inFont(u'\u2605')<br></div><div><br></div><div>Traceback (most recent call last):<br>  File "292.py", line 4, in <module><br>    QFontMetrics(app.font()).inFont(u'\u2605')<br>ValueError: string of length 1 expected<br></div><div><br></div><div>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.</div><div><br></div><div>regards,</div><div><br></div><div>Chris</div><div><br></div><div><br></div></div>
</blockquote></div>