Python v3.10 and Apple Silicon Wheels at PyPI

Damon Lynch damonlynch at gmail.com
Mon Oct 11 19:33:01 BST 2021


On Mon, Oct 11, 2021 at 1:37 PM Scott Talbert <swt at techie.net> wrote:

> On Mon, 11 Oct 2021, Damon Lynch wrote:
> >
> > Has anyone else had a problem where their PyQt5 application fails on
> Fedora
> > 35 beta (which uses Python 3.10) because of exceptions generated when Qt
> > functions that expect ints are passed floats? e.g.:
> > TypeError: setFixedWidth(self, int): argument 1 has unexpected type
> 'float'
>
> Yes, that's a Python 3.10 change whereby you can no longer pass floats
> where ints are expected and there would be a loss of precision.  You'll
> have to convert them to ints.
>
>
Thanks Scott, I clearly missed that in the Python 3.10 changes list.

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.

Off topic, but if only I understood why a simple pickle.dumps() on Fedora's
Python 3.10 can generate this error: SystemError: PY_SSIZE_T_CLEAN macro
must be defined for '#' formats

Damon

-- 
https://damonlynch.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20211011/f3fd6307/attachment.htm>


More information about the PyQt mailing list