Skip to content

PR: Make QtBindingsNotFoundError also inherit from ImportError#413

Merged
dalthviz merged 1 commit intospyder-ide:masterfrom
cbrnr:qtbindingsnotfounderror
Mar 21, 2023
Merged

PR: Make QtBindingsNotFoundError also inherit from ImportError#413
dalthviz merged 1 commit intospyder-ide:masterfrom
cbrnr:qtbindingsnotfounderror

Conversation

@cbrnr
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

PR #414 is now merged! 🎉

@CAM-Gerlach CAM-Gerlach force-pushed the qtbindingsnotfounderror branch from 358ee81 to 2f04efa Compare March 21, 2023 00:39
@CAM-Gerlach
Copy link
Copy Markdown
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
Copy Markdown
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