<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 11, 2021 at 1:37 PM Scott Talbert <<a href="mailto:swt@techie.net">swt@techie.net</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">On Mon, 11 Oct 2021, Damon Lynch wrote:<br>

> <br>
> Has anyone else had a problem where their PyQt5 application fails on Fedora<br>
> 35 beta (which uses Python 3.10) because of exceptions generated when Qt<br>
> functions that expect ints are passed floats? e.g.:<br>
> TypeError: setFixedWidth(self, int): argument 1 has unexpected type 'float'<br>
<br>
Yes, that's a Python 3.10 change whereby you can no longer pass floats <br>
where ints are expected and there would be a loss of precision.  You'll <br>
have to convert them to ints.<br>
<br clear="all"></blockquote></div><div><br></div><div>Thanks Scott, I clearly missed that in the Python 3.10 changes list. <br></div><div><br></div><div>Personally my app uses floats in addition to ints for widget calculations because Qt recommends floats for dealing with High DPI support. Yet things like QRectF cannot be used everywhere QRect can be (for instance), necessitating the use of the older int based variants. <br></div><div><br></div><div>Off topic, but if only I understood why a simple pickle.dumps() on Fedora's Python 3.10 can generate this error: 
<span style="font-family:monospace">SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

</span></div><div><br></div><div>Damon<br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><a href="https://damonlynch.net" target="_blank">https://damonlynch.net</a><br></div></div></div>