This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients arhadthedev, gvanrossum, hroncok, mark.dickinson, remi.lapeyre, serhiy.storchaka, vstinner
Date 2021-12-09.09:06:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639040813.31.0.906108105254.issue36048@roundup.psfhosted.org>
In-reply-to
Content
@arhadthedev: Thanks for highlighting the issue.

> we need to check if the problem really has place and the PR needs to be retracted until PyQt5 is ported to newer Python C API

I'm not particularly impressed by the arguments from cculianu. This was the right change to make: this is very general machinery, and we've seen many real issues over the years resulting from implicit acceptance of floats or Decimal objects where an integer is expected. 

It may well be that for some *specific* libraries like PyQt5 it makes sense to make a different choice. And indeed, PySide6 has done exactly that:

Python 3.10.0 (default, Nov 12 2021, 12:32:57) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide6.QtCore import QPoint
>>> QPoint(2, 3)
PySide6.QtCore.QPoint(2, 3)
>>> QPoint(2.1, 3.3)
PySide6.QtCore.QPoint(2, 3)

So no, I don't believe this change should be reverted. At best, we could re-introduce the deprecation warnings and delay the full implementation of the change. But the deprecation warnings were present since Python 3.8, and so either the PyQt5 developers noticed them but didn't want to make the change, or didn't notice them. Either way, it's difficult to see what difference extending the deprecation warning period would make. Moreover, the new behaviour is already released, in Python 3.10.0 and 3.10.1, and the code churn would likely be more annoying than helpful.

I would suggest to cculianu that they take this up with the PyQt5 developers.
History
Date User Action Args
2021-12-09 09:06:53mark.dickinsonsetrecipients: + mark.dickinson, gvanrossum, vstinner, serhiy.storchaka, hroncok, remi.lapeyre, arhadthedev
2021-12-09 09:06:53mark.dickinsonsetmessageid: <1639040813.31.0.906108105254.issue36048@roundup.psfhosted.org>
2021-12-09 09:06:53mark.dickinsonlinkissue36048 messages
2021-12-09 09:06:53mark.dickinsoncreate