Hello community,

here is the log from the commit of package spyder3 for openSUSE:Factory checked 
in at 2020-03-29 14:25:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/spyder3 (Old)
 and      /work/SRC/openSUSE:Factory/.spyder3.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "spyder3"

Sun Mar 29 14:25:57 2020 rev:30 rq:789177 version:4.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/spyder3/spyder3.changes  2020-03-20 
23:54:22.848831102 +0100
+++ /work/SRC/openSUSE:Factory/.spyder3.new.3160/spyder3.changes        
2020-03-29 14:26:14.822114429 +0200
@@ -1,0 +2,45 @@
+Fri Mar 20 23:49:36 UTC 2020 - Benjamin Greiner <c...@bnavigator.de>
+
+- update to version 4.1.1
+  * Add file path completions to the Editor. This works by writing the
+    beginning of a file path, either absolute or relative, inside a
+    string and pressing `Tab` or `Ctrl+Space` to get completions for
+    it.
+  * Add a new command line option called `--report-segfault` to be
+   able to send segmentation fault reports to Github.
+  * Fix a critical error when starting kernels on Windows.
+- changelog from version 4.1.0
+  * Several improvements to the interface and user experience of the Plots 
pane.
+  * Show hidden files in Files and Project panes.
+  * Allow automatic introduction of docstrings in the Sphinx format.
+  * Implicitly create a project when Spyder is launched with a folder path as
+    argument in the command line
+  * Re-add the ability to run IPython magics inside of cells.
+  * Allow running PyQt applications multiple times.
+  * Make adjustable the maximum number of recent projects in the Projects
+  * Disable code folding and indent guides when files have more than 2000 lines
+    for performance reasons.
+  * Critical performance improvements to the Editor and Files.
+  * Several fixes to the autosave mechanism.
+  * Preserve creation time when saving files.
+  * Don't corrupt symlinks when saving files associated to them.
+  * Improve the code completion experience in the Editor.
+  * Start kernels in a thread to avoid freezing the entire interface.
+  * Correctly update the debugging panel in the Editor when debugging in
+    multiple consoles.
+  * Make the Code Analysis pane to read the nearest pylintrc file, according to
+    the hierarchy defined by Pylint.
+- See full list of issues and pull requests in the CHANGELOG.md on 
+  github#spyder-ide/spyder
+- remove patches merged upstream
+  0001-fix-hanging-test-when-not-in-git-repository.patch
+  0001-only-test-for-git-when-in-git.patch  
+- spyder3-pr11704-fixpytestargs.patch to call pytest directly
+  (upstream PR#11704, issue#11870)
+- spyder3-pr11899-fixdeprecation.patch to pass test_arrayeditor_with_inf_array
+  (upstream PR#11889, issue#11885)
+- remove the compileall calls for tests because they are not installed anymore
+- singlespec macros
+- remove source language files from lang package
+  
+-------------------------------------------------------------------

Old:
----
  0001-fix-hanging-test-when-not-in-git-repository.patch
  0001-only-test-for-git-when-in-git.patch
  spyder-4.0.1.tar.gz

New:
----
  spyder-4.1.1.tar.gz
  spyder3-pr11704-fixpytestargs.patch
  spyder3-pr11899-fixdeprecation.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ spyder3.spec ++++++
--- /var/tmp/diff_new_pack.vur42f/_old  2020-03-29 14:26:15.914114987 +0200
+++ /var/tmp/diff_new_pack.vur42f/_new  2020-03-29 14:26:15.918114990 +0200
@@ -23,15 +23,15 @@
 %endif
 %define skip_python2 1
 Name:           spyder3
-Version:        4.0.1
+Version:        4.1.1
 Release:        0
 Summary:        The Scientific Python Development Environment
 License:        MIT
 URL:            https://www.spyder-ide.org/
 Source:         
https://github.com/spyder-ide/spyder/archive/v%{version}.tar.gz#/spyder-%{version}.tar.gz
 Source1:        spyder3-rpmlintrc
-Patch0:         0001-fix-hanging-test-when-not-in-git-repository.patch
-Patch1:         0001-only-test-for-git-when-in-git.patch
+Patch0:         spyder3-pr11704-fixpytestargs.patch
+Patch1:         spyder3-pr11899-fixdeprecation.patch
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildRequires:  python3-Pygments >= 2.0
@@ -136,6 +136,7 @@
 BuildRequires:  python3-scipy
 BuildRequires:  python3-spyder-kernels >= 1.8.1
 BuildRequires:  python3-sympy
+BuildRequires:  python3-xarray
 BuildRequires:  xdpyinfo
 %endif
 
@@ -223,22 +224,23 @@
 
 %prep
 %setup -q -n spyder-%{version}
+%patch0 -p1
+%patch1 -p1
 # Fix wrong-file-end-of-line-encoding RPMLint warning
 sed -i 's/\r$//' spyder/app/restart.py
 sed -i 's/\r$//' LICENSE.txt CHANGELOG.md
 # Fix non-executable-script RPMLint warning
 sed -i -e '/^#!\//, 1d' spyder/app/restart.py
 sed -i -e '/^#!\//, 1d' spyder/utils/external/github.py
-%patch0 -p1
-%patch1 -p1
+sed -i -e '/^#!\//, 1d' 
spyder/plugins/ipythonconsole/scripts/conda-activate.sh 
 # remove specific jedi dependency, as it triggers an annoying warning on 
startup
 sed -i "s|JEDI_REQVER = '=0.14.1'|JEDI_REQVER = None|" spyder/dependencies.py
 
 %build
-%python3_build
+%python_build
 
 %install
-%python3_install
+%python_install
 
 # remove windows stuff
 rm %{buildroot}%{_bindir}/spyder_win_post_install.py
@@ -247,7 +249,7 @@
 mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
 mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
 pushd %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
-ln -s %{python3_sitelib}/spyder/images/spyder.svg %{name}.svg
+ln -s %{python_sitelib}/spyder/images/spyder.svg %{name}.svg
 popd
 pushd %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
 ln -s %{_datadir}/icons/%{name}.png %{name}.png
@@ -255,21 +257,12 @@
 
 # get the language files
 %find_lang spyder %{name}.lang
+# remove source language files
+find %{buildroot}%{python_sitelib}/spyder/locale -name '*.po' -delete
+find %{buildroot}%{python_sitelib}/spyder/locale -name '*.pot' -delete
 
 %suse_update_desktop_file -r %{name} Development Science IDE NumericalAnalysis
-%fdupes %{buildroot}%{python3_sitelib}
-
-# Deduplicating files can generate a RPMLINT warning for pyc mtime
-python3    -m compileall -d %{python3_sitelib} 
%{buildroot}%{python3_sitelib}/spyder/plugins/tests/
-python3 -O -m compileall -d %{python3_sitelib} 
%{buildroot}%{python3_sitelib}/spyder/plugins/tests/
-python3    -m compileall -d %{python3_sitelib} 
%{buildroot}%{python3_sitelib}/spyder/utils/*/tests/
-python3 -O -m compileall -d %{python3_sitelib} 
%{buildroot}%{python3_sitelib}/spyder/utils/*/tests/
-python3    -m compileall -d %{python3_sitelib} 
%{buildroot}%{python3_sitelib}/spyder/widgets/*/tests/
-python3 -O -m compileall -d %{python3_sitelib} 
%{buildroot}%{python3_sitelib}/spyder/widgets/*/tests/
-python3    -m compileall -d %{python3_sitelib} 
%{buildroot}%{python3_sitelib}/spyder/widgets/tests/
-python3 -O -m compileall -d %{python3_sitelib} 
%{buildroot}%{python3_sitelib}/spyder/widgets/tests/
-
-%fdupes %{buildroot}%{python3_sitelib}
+%fdupes %{buildroot}%{python_sitelib}
 
 %if %{with test}
 %check
@@ -280,7 +273,7 @@
 # times out on armv7l, and is skipped on upstream CI
 # with reason "It makes other tests to segfault in our CIs"
 skiptests="$skiptests or test_introspection"
-# segfaults on obs (?)
+# segfaults in xvfb
 skiptests="$skiptests or test_arrayeditor_edit_complex_array"
 # this test runs into timeouts and is skipped on some of the
 # upstream CIs for the same reason
@@ -288,9 +281,9 @@
 # tests not suitable for CIs or OBS as evident from the last assert which 
fails here
 skiptests="$skiptests or 
test_connection_dialog_remembers_input_with_ssh_passphrase"
 skiptests="$skiptests or test_connection_dialog_remembers_input_with_password"
-# test relies on IPythonConsole behaving well on OBS (which does not..)
-skiptests="$skiptests or test_dbg_input"
-# same for the whole ipythonconsole plugin
+# tests fail on CIs
+skiptests="$skiptests or test_comment or test_tab_copies_find_to_replace"
+# tests rely on IPythonConsole behaving well on OBS (which does not..)
 ipythonplugin="spyder/plugins/ipythonconsole"
 ignoretestfiles="--ignore=$ipythonplugin/tests/test_ipythonconsole.py
                  --ignore=$ipythonplugin/comms/tests/test_comms.py"
@@ -302,14 +295,14 @@
 %license LICENSE.txt
 %{_bindir}/%{name}
 %{_datadir}/applications/%{name}.desktop
-%{python3_sitelib}/spyder/
-%{python3_sitelib}/spyder-%{version}-py*.egg-info
-%exclude %{python3_sitelib}/spyder/locale/
-%exclude %{python3_sitelib}/spyder/plugins/breakpoints/
-%exclude %{python3_sitelib}/spyder/plugins/io_dcm/
-%exclude %{python3_sitelib}/spyder/plugins/io_hdf5/
-%exclude %{python3_sitelib}/spyder/plugins/profiler/
-%exclude %{python3_sitelib}/spyder/plugins/pylint/
+%{python_sitelib}/spyder/
+%{python_sitelib}/spyder-%{version}-py*.egg-info
+%exclude %{python_sitelib}/spyder/locale/
+%exclude %{python_sitelib}/spyder/plugins/breakpoints/
+%exclude %{python_sitelib}/spyder/plugins/io_dcm/
+%exclude %{python_sitelib}/spyder/plugins/io_hdf5/
+%exclude %{python_sitelib}/spyder/plugins/profiler/
+%exclude %{python_sitelib}/spyder/plugins/pylint/
 %dir %{_datadir}/icons/hicolor/128x128
 %dir %{_datadir}/icons/hicolor/scalable
 %dir %{_datadir}/icons/hicolor/128x128/apps
@@ -322,26 +315,28 @@
 
 %files breakpoints
 %license LICENSE.txt
-%{python3_sitelib}/spyder/plugins/breakpoints/
+%{python_sitelib}/spyder/plugins/breakpoints/
 
 %files dicom
 %license LICENSE.txt
-%{python3_sitelib}/spyder/plugins/io_dcm/
+%{python_sitelib}/spyder/plugins/io_dcm/
 
 %files hdf5
 %license LICENSE.txt
-%{python3_sitelib}/spyder/plugins/io_hdf5/
+%{python_sitelib}/spyder/plugins/io_hdf5/
 
 %files profiler
 %license LICENSE.txt
-%{python3_sitelib}/spyder/plugins/profiler/
+%{python_sitelib}/spyder/plugins/profiler/
 
 %files pylint
 %license LICENSE.txt
-%{python3_sitelib}/spyder/plugins/pylint/
+%{python_sitelib}/spyder/plugins/pylint/
 
 %files lang -f %{name}.lang
 %license LICENSE.txt
-%{python3_sitelib}/spyder/locale/
+%dir %{python_sitelib}/spyder/locale/
+%dir %{python_sitelib}/spyder/locale/*
+%dir %{python_sitelib}/spyder/locale/*/LC_MESSAGES
 
 %changelog

++++++ spyder-4.0.1.tar.gz -> spyder-4.1.1.tar.gz ++++++
/work/SRC/openSUSE:Factory/spyder3/spyder-4.0.1.tar.gz 
/work/SRC/openSUSE:Factory/.spyder3.new.3160/spyder-4.1.1.tar.gz differ: char 
16, line 1

++++++ spyder3-pr11704-fixpytestargs.patch ++++++
>From 958cc2b0d5cc17d0e5440196a579951e4008f449 Mon Sep 17 00:00:00 2001
From: "C.A.M. Gerlach" <cam.gerl...@gerlach.cam>
Date: Mon, 2 Mar 2020 21:06:19 -0600
Subject: [PATCH 1/3] Fix, improve and cleanup runtests.py script arg parsing

---
 runtests.py | 48 +++++++++++++++++++++++-------------------------
 1 file changed, 23 insertions(+), 25 deletions(-)

diff --git a/runtests.py b/runtests.py
index 7d16848cb2..5760e9a7fe 100644
--- a/runtests.py
+++ b/runtests.py
@@ -9,18 +9,18 @@
 """
 
 # Standard library imports
-import os
-import sys
 import argparse
+import os
 
-# To activate/deactivate certain things for pytest's only
+# To activate/deactivate certain things for pytests only
 # NOTE: Please leave this before any other import here!!
 os.environ['SPYDER_PYTEST'] = 'True'
 
 # Third party imports
 # NOTE: This needs to be imported before any QApplication.
 # Don't remove it or change it to a different location!
-from qtpy import QtWebEngineWidgets
+# pylint: disable=wrong-import-position
+from qtpy import QtWebEngineWidgets  # pylint: disable=unused-import
 import pytest
 
 
@@ -29,30 +29,24 @@
 RUN_SLOW = os.environ.get('RUN_SLOW', None) == 'true'
 
 
-def main(run_slow=False, extra_args=None):
-    """
-    Run pytest tests for Spyder.
-    """
-    pytest_args = ['spyder',
-                   '-vv',
-                   '-rw',
-                   '--durations=10']
+def run_pytest(run_slow=False, extra_args=None):
+    """Run pytest tests for Spyder."""
+    pytest_args = ['-vv', '-rw', '--durations=10']
 
     if CI:
         # Exit on first failure and show coverage
         pytest_args += ['-x', '--cov=spyder', '--no-cov-on-fail']
 
-        # Run slow tests only
-        if RUN_SLOW:
-            pytest_args += ['--run-slow']
-
         # To display nice tests resume in Azure's web page
         if os.environ.get('AZURE', None) is not None:
             pytest_args += ['--cache-clear', '--junitxml=result.xml']
-    elif run_slow:
+    if run_slow or RUN_SLOW:
         pytest_args += ['--run-slow']
-    elif extra_args:
+    # Allow user to pass a custom test path to pytest to e.g. run just one test
+    if extra_args:
         pytest_args += extra_args
+    else:
+        pytest_args += ['spyder']
 
     print("Pytest Arguments: " + str(pytest_args))
     errno = pytest.main(pytest_args)
@@ -64,13 +58,17 @@ def main(run_slow=False, extra_args=None):
         raise SystemExit(errno)
 
 
-if __name__ == '__main__':
+def main():
+    """Parse args then run the pytest suite for Spyder."""
     test_parser = argparse.ArgumentParser(
-        usage='python runtests.py [--run-slow] [-- pytest_args]')
-    test_parser.add_argument('--run-slow', action='store_true',
-                             default=False,
+        description="Helper script to run Spyder's test suite")
+    test_parser.add_argument('--run-slow', action='store_true', default=False,
                              help='Run the slow tests')
-    test_parser.add_argument('pytest_args', nargs='*',
-                             help="Args to pass to pytest")
+    test_parser.add_argument('pytest_args', nargs=argparse.REMAINDER,
+                             metavar="...", help="Args to pass to pytest")
     test_args = test_parser.parse_args()
-    main(run_slow=test_args.run_slow, extra_args=test_args.pytest_args)
+    run_pytest(run_slow=test_args.run_slow, extra_args=test_args.pytest_args)
+
+
+if __name__ == '__main__':
+    main()

>From b83a72e4e7db2fa173fa16b8c69ad6830ed2fefa Mon Sep 17 00:00:00 2001
From: "C.A.M. Gerlach" <cam.gerl...@gerlach.cam>
Date: Mon, 2 Mar 2020 21:07:30 -0600
Subject: [PATCH 2/3] Ignore pytest args properly in Spyder mainwindow setup

---
 spyder/app/mainwindow.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
index 71f9f4ed94..a3847c84c0 100644
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -104,7 +104,12 @@
 from spyder.app.cli_options import get_options
 
 # Get CLI options/args and make them available for future use
-CLI_OPTIONS, CLI_ARGS = get_options()
+# Ignore args if running tests or Spyder will try and fail to parse pytests's
+if bool(os.environ.get('SPYDER_PYTEST')):
+    sys_argv = [sys.argv[0]]
+else:
+    sys_argv = sys.argv
+CLI_OPTIONS, CLI_ARGS = get_options(sys_argv)
 
 # **** Set OpenGL implementation to use ****
 if CLI_OPTIONS.opengl_implementation:

>From 1a0caedbc4864b5c257097a435d9ad290e7c9b15 Mon Sep 17 00:00:00 2001
From: "C.A.M. Gerlach" <cam.gerl...@gerlach.cam>
Date: Mon, 2 Mar 2020 21:10:53 -0600
Subject: [PATCH 3/3] Add .pylint.d to gitignore

---
 .gitignore | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index b407abc4d8..a1ef21c876 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,4 +34,7 @@ spyder_crash.log
 # Rope project folders
 .ropeproject/
 .vscode/
-result.xml
\ No newline at end of file
+result.xml
+
+# Pylint dirs/files
+.pylint.d/
++++++ spyder3-pr11899-fixdeprecation.patch ++++++
>From 945f9a5b690ec9506d19284dcfadae64549b2473 Mon Sep 17 00:00:00 2001
From: bnavigator <c...@bnavigator.de>
Date: Fri, 20 Mar 2020 20:30:02 +0100
Subject: [PATCH 1/7] fix deprecation warning: plugins/editor

---
 spyder/plugins/editor/panels/scrollflag.py           |  4 ++--
 .../plugins/editor/panels/tests/test_scrollflag.py   | 12 ++++++------
 spyder/plugins/editor/widgets/recover.py             |  4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/spyder/plugins/editor/panels/scrollflag.py 
b/spyder/plugins/editor/panels/scrollflag.py
index 6143f42404..6e064434fa 100644
--- a/spyder/plugins/editor/panels/scrollflag.py
+++ b/spyder/plugins/editor/panels/scrollflag.py
@@ -313,7 +313,7 @@ def mousePressEvent(self, event):
         if self.slider and event.button() == Qt.LeftButton:
             vsb = self.editor.verticalScrollBar()
             value = self.position_to_value(event.pos().y())
-            vsb.setValue(value-vsb.pageStep()/2)
+            vsb.setValue(int(value-vsb.pageStep()/2))
 
     def keyReleaseEvent(self, event):
         """Override Qt method."""
@@ -376,7 +376,7 @@ def get_scale_factor(self):
     def value_to_position(self, y, scale_factor, offset):
         """Convert value to position in pixels"""
         vsb = self.editor.verticalScrollBar()
-        return (y - vsb.minimum()) * scale_factor + offset
+        return int((y - vsb.minimum()) * scale_factor + offset)
 
     def position_to_value(self, y):
         """Convert position in pixels to value"""
diff --git a/spyder/plugins/editor/panels/tests/test_scrollflag.py 
b/spyder/plugins/editor/panels/tests/test_scrollflag.py
index 38515b6e94..cc6a2e5319 100644
--- a/spyder/plugins/editor/panels/tests/test_scrollflag.py
+++ b/spyder/plugins/editor/panels/tests/test_scrollflag.py
@@ -167,8 +167,8 @@ def test_range_indicator_visible_on_hover_only(editor_bot, 
qtbot):
     # that the slider range indicator remains hidden. The slider range
     # indicator should remains hidden at all times when the vertical scrollbar
     # of the editor is not visible.
-    x = sfa.width()/2
-    y = sfa.height()/2
+    x = int(sfa.width()/2)
+    y = int(sfa.height()/2)
     qtbot.mouseMove(sfa, pos=QPoint(x, y), delay=-1)
 
     assert sfa._range_indicator_is_visible is False
@@ -181,16 +181,16 @@ def 
test_range_indicator_visible_on_hover_only(editor_bot, qtbot):
     # that the slider range indicator is now shown. When the vertical scrollbar
     # of the editor is visible, the slider range indicator should be visible
     # only when the mouse cursor hover above the scrollflagarea.
-    x = sfa.width()/2
-    y = sfa.height()/2
+    x = int(sfa.width()/2)
+    y = int(sfa.height()/2)
     qtbot.mouseMove(sfa, pos=QPoint(x, y), delay=-1)
 
     assert sfa._range_indicator_is_visible is True
 
     # Move the mouse cursor outside of the scrollflagarea and assert that the
     # slider range indicator becomes hidden.
-    x = editor.width()/2
-    y = editor.height()/2
+    x = int(editor.width()/2)
+    y = int(editor.height()/2)
     qtbot.mouseMove(editor, pos=QPoint(x, y), delay=-1)
     qtbot.waitUntil(lambda: not sfa._range_indicator_is_visible)
 
diff --git a/spyder/plugins/editor/widgets/recover.py 
b/spyder/plugins/editor/widgets/recover.py
index bd532b125f..f0eb6f1295 100644
--- a/spyder/plugins/editor/widgets/recover.py
+++ b/spyder/plugins/editor/widgets/recover.py
@@ -227,8 +227,8 @@ def add_cancel_button(self):
     def center(self):
         """Center the dialog."""
         screen = QApplication.desktop().screenGeometry(0)
-        x = screen.center().x() - self.width() / 2
-        y = screen.center().y() - self.height() / 2
+        x = int(screen.center().x() - self.width() / 2)
+        y = int(screen.center().y() - self.height() / 2)
         self.move(x, y)
 
     def restore(self, idx):

>From ec860f8df54332d30e99fbbcdc724aff6ea9d09d Mon Sep 17 00:00:00 2001
From: bnavigator <c...@bnavigator.de>
Date: Fri, 20 Mar 2020 20:30:29 +0100
Subject: [PATCH 2/7] fix deprecation warning: plugins/findfiles

---
 spyder/plugins/findinfiles/widgets.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spyder/plugins/findinfiles/widgets.py 
b/spyder/plugins/findinfiles/widgets.py
index dc8e913271..79a40d9d4a 100644
--- a/spyder/plugins/findinfiles/widgets.py
+++ b/spyder/plugins/findinfiles/widgets.py
@@ -658,7 +658,7 @@ def __init__(self, parent, search_text, search_text_regexp,
         self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
 
         fm = self.ok_button.fontMetrics()
-        width = fm.width('Search') * 1.8
+        width = int(fm.width('Search') * 1.8)
         self.ok_button.setMinimumWidth(width)
         self.stop_button.setMinimumWidth(width)
         self.refresh_buttons(start=False)

>From be0f6e7c88f8e4ed5d824972e1a435c1f6da7109 Mon Sep 17 00:00:00 2001
From: bnavigator <c...@bnavigator.de>
Date: Fri, 20 Mar 2020 20:31:40 +0100
Subject: [PATCH 3/7] fix deprecation warning: plugins/variableexplorer int

---
 spyder/plugins/variableexplorer/widgets/basedialog.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/spyder/plugins/variableexplorer/widgets/basedialog.py 
b/spyder/plugins/variableexplorer/widgets/basedialog.py
index 4ab03d88c2..dae23e14b5 100644
--- a/spyder/plugins/variableexplorer/widgets/basedialog.py
+++ b/spyder/plugins/variableexplorer/widgets/basedialog.py
@@ -19,13 +19,13 @@ def set_dynamic_width_and_height(self, screen_geometry, 
width_ratio=0.5,
         Update width and height using an updated screen geometry.
         Use a ratio for the width and height of the dialog.
         """
-        screen_width = screen_geometry.width()
-        screen_height = screen_geometry.height()
-        self.resize(screen_width * width_ratio, screen_height * height_ratio)
+        screen_width = int(screen_geometry.width() * width_ratio)
+        screen_height = int(screen_geometry.height() * height_ratio)
+        self.resize(screen_width, screen_height)
 
         # Make the dialog window appear in the center of the screen
-        x = screen_geometry.center().x() - self.width() / 2
-        y = screen_geometry.center().y() - self.height() / 2
+        x = int(screen_geometry.center().x() - self.width() / 2)
+        y = int(screen_geometry.center().y() - self.height() / 2)
         self.move(x, y)
 
     def show(self):

>From 81f121171b03a2f2f8f378d1422e85546427065a Mon Sep 17 00:00:00 2001
From: bnavigator <c...@bnavigator.de>
Date: Fri, 20 Mar 2020 20:33:50 +0100
Subject: [PATCH 4/7] fix deprecation warning: widgets

---
 spyder/widgets/mixins.py   | 10 ++++++----
 spyder/widgets/switcher.py |  8 +++++---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/spyder/widgets/mixins.py b/spyder/widgets/mixins.py
index cc26445ee0..48cf53e22b 100644
--- a/spyder/widgets/mixins.py
+++ b/spyder/widgets/mixins.py
@@ -96,16 +96,18 @@ def _calculate_position(self, at_line=None, at_point=None):
         if at_point is not None:
             # Showing tooltip at point position
             margin = (self.document().documentMargin() / 2) + 1
-            cx, cy = at_point.x() - margin, at_point.y() - margin
+            cx = int(at_point.x() - margin)
+            cy = int(at_point.y() - margin)
         elif at_line is not None:
             # Showing tooltip at line
             cx = 5
             line = at_line - 1
             cursor = QTextCursor(self.document().findBlockByNumber(line))
-            cy = self.cursorRect(cursor).top()
+            cy = int(self.cursorRect(cursor).top())
         else:
             # Showing tooltip at cursor position
             cx, cy = self.get_coordinates('cursor')
+            cx = int(cx)
             cy = int(cy - font.pointSize() / 2)
 
         # Calculate vertical delta
@@ -1276,9 +1278,9 @@ def _enter_array(self, inline):
 
         # TODO: adapt to font size
         x = rect.left()
-        x = x - 14
+        x = int(x - 14)
         y = rect.top() + (rect.bottom() - rect.top())/2
-        y = y - dlg.height()/2 - 3
+        y = int(y - dlg.height()/2 - 3)
 
         pos = QPoint(x, y)
         pos = self.calculate_real_position(pos)
diff --git a/spyder/widgets/switcher.py b/spyder/widgets/switcher.py
index 9ad697e528..8b18c6f9d5 100644
--- a/spyder/widgets/switcher.py
+++ b/spyder/widgets/switcher.py
@@ -111,7 +111,9 @@ def __init__(self, parent=None, styles=_STYLES):
         self._height = self._get_height()
 
         # Setup
-        self.setSizeHint(QSize(0, self._height))
+        # self._height is a float from QSizeF but
+        # QSize() expects a QSize or (int, int) as parameters
+        self.setSizeHint(QSize(0, int(self._height)))
 
     def _render_text(self):
         """Render the html template for this item."""
@@ -332,8 +334,8 @@ def _render_text(self, title=None, description=None, 
section=None):
             section = ''
 
         padding = self._PADDING
-        width = self._width - self._icon_width
-        height = self.get_height()
+        width = int(self._width - self._icon_width)
+        height = int(self.get_height())
         self.setSizeHint(QSize(width, height))
 
         shortcut = '&lt;' + self._shortcut + '&gt;' if self._shortcut else ''

>From 417f4044e3d3d1f491fd11ec2c15aba41b9e8914 Mon Sep 17 00:00:00 2001
From: bnavigator <c...@bnavigator.de>
Date: Fri, 20 Mar 2020 20:34:26 +0100
Subject: [PATCH 5/7] numpy check for inf,  "inf in data" failed with warning

---
 spyder/plugins/variableexplorer/widgets/arrayeditor.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/spyder/plugins/variableexplorer/widgets/arrayeditor.py 
b/spyder/plugins/variableexplorer/widgets/arrayeditor.py
index 35786487f8..9109264a3d 100644
--- a/spyder/plugins/variableexplorer/widgets/arrayeditor.py
+++ b/spyder/plugins/variableexplorer/widgets/arrayeditor.py
@@ -169,7 +169,9 @@ def __init__(self, data, format="%.6g", xlabels=None, 
ylabels=None,
 
         # Array with infinite values cannot display background colors and
         # crashes. See: spyder-ide/spyder#8093
-        self.has_inf = np.inf in data
+        self.has_inf = False
+        if data.dtype.kind in ['f', 'c']:
+            self.has_inf = np.any(np.isinf(data))
 
         # Deactivate coloring for object arrays or arrays with inf values
         if self._data.dtype.name == 'object' or self.has_inf:

>From 16a4ba3d0bfe772ed491164e48a086f7016644ce Mon Sep 17 00:00:00 2001
From: bnavigator <c...@bnavigator.de>
Date: Fri, 20 Mar 2020 19:24:12 +0100
Subject: [PATCH 6/7] load_stylesheet_from_environment() is deprecated

---
 spyder/widgets/mixins.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spyder/widgets/mixins.py b/spyder/widgets/mixins.py
index 48cf53e22b..97acaf710b 100644
--- a/spyder/widgets/mixins.py
+++ b/spyder/widgets/mixins.py
@@ -136,7 +136,7 @@ def _update_stylesheet(self, widget):
         self._styled_widgets.add(id(widget))
 
         if is_dark_interface():
-            css = qdarkstyle.load_stylesheet_from_environment()
+            css = qdarkstyle.load_stylesheet(qt_api='')
             widget.setStyleSheet(css)
             palette = widget.palette()
             background = palette.color(palette.Window).lighter(150).name()

>From 827dde3b6079f22eaaf93fcea7a354f4f64076f5 Mon Sep 17 00:00:00 2001
From: bnavigator <c...@bnavigator.de>
Date: Fri, 20 Mar 2020 23:16:43 +0100
Subject: [PATCH 7/7] deprecation warning for float height in switcher

---
 spyder/widgets/switcher.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spyder/widgets/switcher.py b/spyder/widgets/switcher.py
index 8b18c6f9d5..7ca64330ab 100644
--- a/spyder/widgets/switcher.py
+++ b/spyder/widgets/switcher.py
@@ -770,7 +770,7 @@ def set_height(self):
             switcher_height = max(switcher_height, self._MIN_HEIGHT)
         else:
             switcher_height = self._MIN_HEIGHT
-        self.setFixedHeight(switcher_height)
+        self.setFixedHeight(int(switcher_height))
 
     def set_position(self, top):
         """Set the position of the dialog."""

Reply via email to