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: Make QtBindingsNotFoundError also inherit from ImportError #413

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Mar 17, 2023

In addition to PythonQtError, QtBindingsNotFoundError now also inherits from ImportError. This should be easier to catch from outside than a generic RuntimeError.

Fixes #412.

@ccordoba12 ccordoba12 changed the title QtBindingsNotFoundError inherits ImportError PR: Make QtBindingsNotFoundError inherit from ImportError Mar 17, 2023
@CAM-Gerlach
Copy link
Member

Seems like the tests are failing because QtPositioning is no longer included in qt-main as of 6.4.3, unrelated to this PR of course. @dalthviz , should we just skip the test or is there something else we should do about it? It seems unlikely stuff is using it as it seems to be mostly for mobile device sensors and such.

@dalthviz
Copy link
Member

I think is okay to skip it 👍 We could use as validation for the skip the using_conda function, so something like:

@pytest.mark.skipif(
PYSIDE2 or PYSIDE6 or using_conda(),
reason="Qsci bindings not available under PySide 2/6 and conda installations",
)
def test_qsci():

And adding in the reason the link to the PR you shared.

Would you like to help adding the skip @CAM-Gerlach ?

@CAM-Gerlach
Copy link
Member

Opened as PR #414 ; @cbrnr once that is merged, this PR can be rebase-ed on master to fix the test here with

git fetch upstream
git switch qtbindingsnotfounderror
git rebase upstream/master
git push --force-with-lease

@dalthviz
Copy link
Member

PR #414 is now merged! 🎉

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Mar 21, 2023

I've gone ahead and used GItHub's built-in "Update Branch" button to update this. @cbrnr , if you need to pull the changes locally, you'll need to do:

git fetch origin
git reset --hard origin/qtbindingsnotfounderror

@CAM-Gerlach CAM-Gerlach changed the title PR: Make QtBindingsNotFoundError inherit from ImportError PR: Make QtBindingsNotFoundError also inherit from ImportError Mar 21, 2023
@CAM-Gerlach CAM-Gerlach mentioned this pull request Mar 21, 2023
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.

Thank you @cbrnr ! LGTM 👍

@dalthviz dalthviz merged commit 3abce78 into spyder-ide:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to catch QtBindingsNotFoundError
3 participants