Python v3.10 and Apple Silicon Wheels at PyPI

Scott Talbert swt at techie.net
Mon Oct 11 19:43:01 BST 2021


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.

Yes, it wasn't very clear in the documentation.  :(

> 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

That seems strange.  Do you have a complete reproducer for that?  Which 
exact python3 package version?

Scott


More information about the PyQt mailing list