Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Skip import of QOpenGLTime* on architectures where not available #333

Merged

Conversation

juliangilbey
Copy link
Contributor

QOpenGLTimeMonitor and QOpenGLTimerQuery do not exist on some architectures such as armhf; the PyQt5 and PySide2 code has a check for whether these should be included in the package. Since they are imported unconditionally, importing qtpy.QtOpenGL fails on those architectures. This patch imports those two classes within a try/except block to allow for this to gracefully fail, and comments out the corresponding assertions in the test suite.

@dalthviz dalthviz changed the title Skip import of QOpenGLTime* on architectures where not available PR: Skip import of QOpenGLTime* on architectures where not available Apr 8, 2022
@dalthviz dalthviz added this to the v2.1.0 milestone Apr 8, 2022
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @juliangilbey thanks for checking into this and submitting a fix! I left some comments regarding the addition of some specific architectures examples for future reference. Otherwise this LGTM 👍

qtpy/QtOpenGL.py Outdated Show resolved Hide resolved
qtpy/QtOpenGL.py Outdated Show resolved Hide resolved
qtpy/tests/test_qtopengl.py Outdated Show resolved Hide resolved
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @juliangilbey !

@dalthviz dalthviz merged commit c762aac into spyder-ide:master Apr 8, 2022
@juliangilbey juliangilbey deleted the conditionally-skip-opengl-time branch April 8, 2022 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants