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: Compatibility fixes for Spyder 6.0.0 beta 1 #457

Merged
merged 9 commits into from
Jun 17, 2024

Conversation

jitseniesen
Copy link
Member

Two commits due to changes in Spyder API, change required version, and changes to make the tests run.

mrclary and others added 7 commits May 28, 2024 07:01
Mirror how config dialogs are tested in main Spyder repo for consistency.
As a side-effect of PR spyder-ide/spyder#21734, a QApplication needs
to be running before importing
spyder.plugins.preferences.widgets.configdialog. Moving the import
inside a function achieves this.
* The test that no console was opened did not work because this can be
  done asynchronously, so instead test for the signal requesting that
  the console be opened.
* The test now only needs the main widget, not the plugin, so move it
  accordingly.
@jitseniesen jitseniesen added this to the v0.6.0 milestone May 28, 2024
@jitseniesen jitseniesen self-assigned this May 28, 2024
@pep8speaks
Copy link

pep8speaks commented May 28, 2024

Hello @jitseniesen! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 117:80: E501 line too long (83 > 79 characters)

Comment last updated at 2024-06-17 07:27:27 UTC

* This is to get Node 20 because older versions are deprecated.
* Also replace Replace mambaforge by miniforge now that conda uses
  the same solver as mamba.
@glaubitz
Copy link

glaubitz commented Jun 12, 2024

I just gave this a try on top of the current 0.5.1 release and it still has one failure:

[   25s] test_new_notebook failed (1 runs remaining out of 3).
[   25s]        <class 'TypeError'>
[   25s]        PluginMainWidget.add_corner_widget() missing 1 required positional argument: 'widget'
[   25s]        [<TracebackEntry /usr/lib/python3.11/site-packages/_pytest/runner.py:341>, <TracebackEntry /usr/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_hooks.py:493>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_manager.py:115>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_callers.py:152>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_result.py:114>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_callers.py:137>, <TracebackEntry /usr/lib/python3.11/site-packages/pytestqt/plugin.py:180>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_callers.py:77>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/runner.py:157>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/runner.py:497>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/runner.py:494>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/python.py:1795>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/fixtures.py:566>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/fixtures.py:585>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/fixtures.py:607>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/fixtures.py:693>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/fixtures.py:1069>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_hooks.py:493>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_manager.py:115>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_callers.py:152>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_result.py:114>, <TracebackEntry /usr/lib/python3.11/site-packages/pluggy/_callers.py:77>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/fixtures.py:1123>, <TracebackEntry /usr/lib/python3.11/site-packages/_pytest/fixtures.py:895>, <TracebackEntry /home/abuild/rpmbuild/BUILD/spyder-notebook-0.5.1/spyder_notebook/widgets/tests/test_main_widget.py:67>, <TracebackEntry /home/abuild/rpmbuild/BUILDROOT/python-spyder-notebook-0.5.1-0.x86_64/usr/lib/python3.11/site-packages/spyder_notebook/widgets/main_widget.py:118>]
[   25s] test_new_notebook failed; it passed 0 out of the required 1 times.

Do you have any clue which patch I am missing to fix this? I'm trying to backport this PR to fix the package in openSUSE Tumblweed.

@jitseniesen
Copy link
Member Author

@glaubitz I don't know. Commit b223dd0 is the obvious candidate, but I don't see how it would give you that error message. What version of Spyder are you testing against?

@glaubitz
Copy link

@glaubitz I don't know. Commit b223dd0 is the obvious candidate, but I don't see how it would give you that error message. What version of Spyder are you testing against?

You're right, openSUSE is still on Spyder 5.5.4, so the testsuite failures I was hoping to fix with this PR are unrelated.

Sorry for the noise.

@jitseniesen jitseniesen mentioned this pull request Jun 17, 2024
@jitseniesen
Copy link
Member Author

I am merging this even though the CI tests do not pass so that I can continue work. I opened an issue so that I don't forget to fix the tests later.

Before, the Spyder source tree was nested inside the plugin source
tree which was messy and may have generated errors.
@jitseniesen jitseniesen merged commit 2268a81 into spyder-ide:master Jun 17, 2024
3 of 9 checks passed
@jitseniesen jitseniesen deleted the spy600b1 branch June 17, 2024 08:17
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.

4 participants