Bug 1901925 - python-pyqtgraph fails to build with Python 3.10: QPoint(int, int): argument 1 has unexpected type 'float'
Summary: python-pyqtgraph fails to build with Python 3.10: QPoint(int, int): argument ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyqtgraph
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Scott Talbert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1900524
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-26 12:41 UTC by Tomáš Hrnčiar
Modified: 2021-02-09 16:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-11-26 12:41:55 UTC
python-pyqtgraph fails to build with Python 3.10.0a2.

============================= test session starts ==============================
platform linux -- Python 3.10.0a2, pytest-6.0.2, py-1.9.0, pluggy-0.13.1
rootdir: /builddir/build/BUILD/pyqtgraph-0.10.0
collected 160 items / 7 deselected / 153 selected

examples/test_examples.py .............................................. [ 30%]
................ssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 77%]
ssssss                                                                   [ 81%]
pyqtgraph/dockarea/tests/test_dock.py .                                  [ 81%]
pyqtgraph/exporters/tests/test_csv.py .                                  [ 82%]
pyqtgraph/exporters/tests/test_svg.py F.                                 [ 83%]
pyqtgraph/graphicsItems/ViewBox/tests/test_ViewBox.py .s                 [ 84%]
pyqtgraph/graphicsItems/tests/test_GraphicsItem.py ..                    [ 86%]
pyqtgraph/graphicsItems/tests/test_InfiniteLine.py ..                    [ 87%]
pyqtgraph/graphicsItems/tests/test_ScatterPlotItem.py ..                 [ 88%]
pyqtgraph/imageview/tests/test_imageview.py F                            [ 89%]
pyqtgraph/parametertree/tests/test_parametertypes.py .                   [ 90%]
pyqtgraph/tests/test_exit_crash.py s                                     [ 90%]
pyqtgraph/tests/test_functions.py .....                                  [ 94%]
pyqtgraph/tests/test_qt.py /usr/bin/xvfb-run: line 181:  1552 Segmentation fault      (core dumped) DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
error: Bad exit status from /var/tmp/rpm-tmp.CJLZuv (%check)
    Bad exit status from /var/tmp/rpm-tmp.CJLZuv (%check)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01794473-python-pyqtgraph/

For all our attempts to build python-pyqtgraph with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-pyqtgraph/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Scott Talbert 2020-11-27 03:52:29 UTC
I updated to a new upstream release of pyqtgraph hoping that it might fix this issue - however the new upstream grew some new dependencies on PyQt5 and h5py, and it cannot be built at the moment using the 3.10 COPR.  Can you please ping me again when those packages are available in the COPR?

Error: 
 Problem 1: cannot install the best candidate for the job
  - nothing provides libQt5Quick.so.5(Qt_5.15.2_PRIVATE_API)(64bit) needed by python3-qt5-5.15.0-3.fc34.x86_64
 Problem 2: cannot install both python3-numpy-1:1.19.4-1.fc34.x86_64 and python3-numpy-1:1.19.4-2.fc34.x86_64
  - package python3-h5py-3.1.0-1.fc34.x86_64 requires python3.9dist(numpy) >= 1.19.3, but none of the providers can be installed
  - cannot install the best candidate for the job
  - conflicting requests
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Comment 2 Tomáš Hrnčiar 2020-11-27 07:21:34 UTC
Thank you for looking into this. In the meantime, PyQt5 started to build https://copr.fedorainfracloud.org/coprs/g/python/python3.10/build/1796361/. 
h5py depends on python-pytest-mpi (rhbz#1900524).

Comment 3 Scott Talbert 2021-02-06 18:05:24 UTC
This is now blocked on scipy:
Error: 
 Problem: package python3-scipy-1.6.0-3.fc34.x86_64 requires python(abi) = 3.9, but none of the providers can be installed
  - package python3-devel-3.10.0~a5-1.fc34.x86_64 conflicts with python3 < 3.10.0~a5-1.fc34 provided by python3-3.9.1-5.fc34.i686
  - package python3-devel-3.10.0~a5-1.fc34.x86_64 conflicts with python3 < 3.10.0~a5-1.fc34 provided by python3-3.9.1-5.fc34.x86_64
  - cannot install the best candidate for the job
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

I don't see an open bug for scipy, which seems to be segfaulting during build, although it's not clear to me exactly what's segfaulting.  The python interpreter?

Comment 4 Miro Hrončok 2021-02-06 18:09:32 UTC
We have *just now* updated to 3.10.0a5. The segfault is likely caused by some of the imported extension module built with a4. We'll need to bootstrap it over, give it a couple of days.

Comment 5 Miro Hrončok 2021-02-07 10:26:33 UTC
Scipy built fine.

Comment 6 Scott Talbert 2021-02-07 14:32:17 UTC
Looks like sphinx-build is now segfaulting for pyqtgraph:

+ make -C doc html
make: Entering directory '/builddir/build/BUILD/pyqtgraph-0.11.1/doc'
sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v3.4.3
make: *** [Makefile:40: html] Segmentation fault (core dumped)
make: Leaving directory '/builddir/build/BUILD/pyqtgraph-0.11.1/doc'
error: Bad exit status from /var/tmp/rpm-tmp.lTsVsP (%build)

It appears that python-sphinx has already been rebuilt with 3.10.0a5 though?

Comment 7 Miro Hrončok 2021-02-07 16:55:53 UTC
python-sphinx is noarch, this is usually a problem with extension module (arched package) that's imported in the process.

If you work locally, make sure to scrub the mock's dnf cache. E.g. mock -r fedora-rawhide-python310 --scrub=dnf-cache

Comment 8 Miro Hrončok 2021-02-07 16:59:27 UTC
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/h5py/ hasn't been built with a5 yet. maybe that's it.

I'll try to do more rounds of everyhting.

Comment 9 Miro Hrončok 2021-02-07 17:15:04 UTC
And that allowed the build to go past the sphinx failure.

Comment 10 Miro Hrončok 2021-02-07 17:59:13 UTC
=================================== FAILURES ===================================
__________________ testExamples[ JoystickButton.py - PyQt5 ] ___________________


Python 3.10.0a5 (default, Feb  3 2021, 14:01:21) 
[GCC 11.0.0 20210130 (Red Hat 11.0.0-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> >>> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)

libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)

Traceback (most recent call last):
  File "<stdin>", line 6, in <module>
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/examples/JoystickButton.py", line 27, in <module>
    jb = pg.JoystickButton()
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/pyqtgraph/widgets/JoystickButton.py", line 14, in __init__
    self.setState(0,0)
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/pyqtgraph/widgets/JoystickButton.py", line 59, in setState
    self.spotPos = QtCore.QPoint(w2*(1+xy[0]), h2*(1-xy[1]))
TypeError: arguments did not match any overloaded call:
  QPoint(): too many arguments
  QPoint(int, int): argument 1 has unexpected type 'float'
  QPoint(QPoint): argument 1 has unexpected type 'float'
>>> 

Failed JoystickButton Example Test Located in JoystickButton.py 
----------------------------- Captured stdout call -----------------------------
JoystickButton 

Python 3.10.0a5 (default, Feb  3 2021, 14:01:21) 
[GCC 11.0.0 20210130 (Red Hat 11.0.0-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> >>> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)

libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)

Traceback (most recent call last):
  File "<stdin>", line 6, in <module>
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/examples/JoystickButton.py", line 27, in <module>
    jb = pg.JoystickButton()
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/pyqtgraph/widgets/JoystickButton.py", line 14, in __init__
    self.setState(0,0)
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/pyqtgraph/widgets/JoystickButton.py", line 59, in setState
    self.spotPos = QtCore.QPoint(w2*(1+xy[0]), h2*(1-xy[1]))
TypeError: arguments did not match any overloaded call:
  QPoint(): too many arguments
  QPoint(int, int): argument 1 has unexpected type 'float'
  QPoint(QPoint): argument 1 has unexpected type 'float'
>>> 

__________________ testExamples[ relativity_demo.py - PyQt5 ] __________________


Python 3.10.0a5 (default, Feb  3 2021, 14:01:21) 
[GCC 11.0.0 20210130 (Red Hat 11.0.0-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> >>> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)

libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/examples/relativity/relativity.py", line 159, in treeChanged
    self.setAnimation(self.params['Animate'])
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/examples/relativity/relativity.py", line 134, in setAnimation
    self.animTimer.start(self.animDt*1000)
TypeError: arguments did not match any overloaded call:
  start(self, int): argument 1 has unexpected type 'float'
  start(self): too many arguments

Failed Special relativity Example Test Located in relativity_demo.py 
----------------------------- Captured stdout call -----------------------------
Special relativity 

Python 3.10.0a5 (default, Feb  3 2021, 14:01:21) 
[GCC 11.0.0 20210130 (Red Hat 11.0.0-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> >>> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)

libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/examples/relativity/relativity.py", line 159, in treeChanged
    self.setAnimation(self.params['Animate'])
  File "/builddir/build/BUILD/pyqtgraph-0.11.1/examples/relativity/relativity.py", line 134, in setAnimation
    self.animTimer.start(self.animDt*1000)
TypeError: arguments did not match any overloaded call:
  start(self, int): argument 1 has unexpected type 'float'
  start(self): too many arguments





I've seen this before in different places. Round the float.

Comment 11 Miro Hrončok 2021-02-07 18:01:34 UTC
I believe the cause is https://bugs.python.org/issue37999

Comment 12 Ben Cotton 2021-02-09 15:28:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.


Note You need to log in before you can comment on or make changes to this bug.