消息 [408077]
The reporter gave more details (<https://github.com/python/cpython/pull/11952#issuecomment-989430968>):
> Literally this is ok in C++ with Qt:
>
> float x = 2.3, y = 1.1;
> auto p = QPoint(x, y); // QPoint only takes 2 int params.. this works in C++; floats can be always be implicitly converted to int
>
> Same code, more or less, in Python3.10 is now broken:
>
> x = 2.3
> y = 1.1
> p = QPoint(x, y) # This fails, where previously it worked on every Python version since the age of the dinosaurs...
>
> Note that most of the API for PyQt5 is auto-generated from the function signatures of the C++. So in this case QPoint takes 2 ints for its c'tor (just like in C++).. and breaks on Python 3.10 if given floats, when previously it worked just fine with either ints or floats. This is just 1 example. But many codebases that use PyQt5 are hit by breakages like this one now. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2021-12-09 07:32:08 | arhadthedev | 修改 | recipients:
+ arhadthedev, gvanrossum, mark.dickinson, vstinner, serhiy.storchaka, hroncok, remi.lapeyre |
| 2021-12-09 07:32:08 | arhadthedev | 修改 | messageid: <1639035128.8.0.138839423689.issue36048@roundup.psfhosted.org> |
| 2021-12-09 07:32:08 | arhadthedev | 链接 | issue36048 messages |
| 2021-12-09 07:32:08 | arhadthedev | 创建 | |
|