Hello community, here is the log from the commit of package spyder3 for openSUSE:Factory checked in at 2019-07-11 13:15:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/spyder3 (Old) and /work/SRC/openSUSE:Factory/.spyder3.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "spyder3" Thu Jul 11 13:15:52 2019 rev:22 rq:713841 version:3.3.5 Changes: -------- --- /work/SRC/openSUSE:Factory/spyder3/spyder3.changes 2019-06-06 18:16:37.176698375 +0200 +++ /work/SRC/openSUSE:Factory/.spyder3.new.4615/spyder3.changes 2019-07-11 13:16:08.954809811 +0200 @@ -1,0 +2,35 @@ +Sun Jun 30 11:31:50 UTC 2019 - Sebastian Wagner <sebix+novell....@sebix.at> + +- update to version 3.3.5: + - New features: + - Add option to allow users showing/hiding CMD windows created by the + `subprocess` module on Windows. The option can be found in + `Preferences > IPython Console > Advanced settings > Windows adjustments`. + - Issues Closed: + - [Issue 9520](https://github.com/spyder-ide/spyder/issues/9520) - Can't run profiler ([PR 9652](https://github.com/spyder-ide/spyder/pull/9652)) + - [Issue 9304](https://github.com/spyder-ide/spyder/issues/9304) - PermissionError when trying to load a kernel connection file ([PR 9651](https://github.com/spyder-ide/spyder/pull/9651)) + - [Issue 9262](https://github.com/spyder-ide/spyder/issues/9262) - Only require PyWebEngine on Python 3+ to avoid blocking py2 compat in pip wheels ([PR 9436](https://github.com/spyder-ide/spyder/pull/9436)) + - [Issue 9240](https://github.com/spyder-ide/spyder/issues/9240) - The external system terminal close after running script if the Python console exits due to an exception ([PR 9312](https://github.com/spyder-ide/spyder/pull/9312)) + - [Issue 9221](https://github.com/spyder-ide/spyder/issues/9221) - TypeError: cursor_position_changed ([PR 9650](https://github.com/spyder-ide/spyder/pull/9650)) + - [Issue 9217](https://github.com/spyder-ide/spyder/issues/9217) - ValueError when clicking on a traceback link in the IPython console ([PR 9649](https://github.com/spyder-ide/spyder/pull/9649)) + - [Issue 9143](https://github.com/spyder-ide/spyder/issues/9143) - Help pane doesn't accept aliased modules ([PR 9166](https://github.com/spyder-ide/spyder/pull/9166)) + - [Issue 9113](https://github.com/spyder-ide/spyder/issues/9113) - Opening window in a subprocess from Spyder ([PR 9123](https://github.com/spyder-ide/spyder/pull/9123)) + - [Issue 9093](https://github.com/spyder-ide/spyder/issues/9093) - Error when trying to create spyder.lock on an unwritable config directory ([PR 9098](https://github.com/spyder-ide/spyder/pull/9098)) + - [Issue 9051](https://github.com/spyder-ide/spyder/issues/9051) - Variable explorer viewers go to the background on macOS ([PR 9119](https://github.com/spyder-ide/spyder/pull/9119)) + - In this release 10 issues were closed. + - Pull Requests Merged: + - [PR 9658](https://github.com/spyder-ide/spyder/pull/9658) - PR: Require spyder-kernels 0.5.0 in setup.py + - [PR 9652](https://github.com/spyder-ide/spyder/pull/9652) - PR: Remove usage of QTextCodec because it's not really needed ([9520](https://github.com/spyder-ide/spyder/issues/9520)) + - [PR 9651](https://github.com/spyder-ide/spyder/pull/9651) - PR: Catch error when loading kernel connection file ([9304](https://github.com/spyder-ide/spyder/issues/9304)) + - [PR 9650](https://github.com/spyder-ide/spyder/pull/9650) - PR: Catch an error when disconnecting a signal in calltip widget ([9221](https://github.com/spyder-ide/spyder/issues/9221)) + - [PR 9649](https://github.com/spyder-ide/spyder/pull/9649) - PR: Catch error when pressing the link of a traceback in IPython console ([9217](https://github.com/spyder-ide/spyder/issues/9217)) + - [PR 9436](https://github.com/spyder-ide/spyder/pull/9436) - PR: Require pyqtwebengine only in Python 3 ([9262](https://github.com/spyder-ide/spyder/issues/9262)) + - [PR 9312](https://github.com/spyder-ide/spyder/pull/9312) - PR: Improvements to the cmd used to start external terminals on Windows ([9240](https://github.com/spyder-ide/spyder/issues/9240)) + - [PR 9166](https://github.com/spyder-ide/spyder/pull/9166) - PR: Fix Help plugin string validation for the console ([9143](https://github.com/spyder-ide/spyder/issues/9143)) + - [PR 9123](https://github.com/spyder-ide/spyder/pull/9123) - PR: Add preference to show/hide cmd windows generated by the subprocess module ([9113](https://github.com/spyder-ide/spyder/issues/9113)) + - [PR 9119](https://github.com/spyder-ide/spyder/pull/9119) - PR: Make Variable Explorer viewers stay on top in macOS ([9051](https://github.com/spyder-ide/spyder/issues/9051)) + - [PR 9099](https://github.com/spyder-ide/spyder/pull/9099) - PR: Add sponsors sections and remove relative links to images in Readme + - [PR 9098](https://github.com/spyder-ide/spyder/pull/9098) - PR: Avoid some permission errors at startup on Windows ([9093](https://github.com/spyder-ide/spyder/issues/9093)) + - In this release 12 pull requests were closed. + +------------------------------------------------------------------- Old: ---- changelog.sh spyder-3.3.4.tar.gz New: ---- spyder-3.3.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ spyder3.spec ++++++ --- /var/tmp/diff_new_pack.ShTRG5/_old 2019-07-11 13:16:09.546809624 +0200 +++ /var/tmp/diff_new_pack.ShTRG5/_new 2019-07-11 13:16:09.554809622 +0200 @@ -19,7 +19,7 @@ %bcond_with test %define X_display ":98" Name: spyder3 -Version: 3.3.4 +Version: 3.3.5 Release: 0 Url: https://www.spyder-ide.org/ Summary: The Scientific Python Development Environment @@ -27,8 +27,6 @@ Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/s/spyder/spyder-%{version}.tar.gz Source1: spyder3-rpmlintrc -# Packaging utility -Source2: changelog.sh BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-Pygments >= 2.0 @@ -60,13 +58,14 @@ BuildRequires: python3-matplotlib BuildRequires: python3-opengl BuildRequires: python3-pandas -BuildRequires: python3-pytest +BuildRequires: python3-pytest < 4.1 BuildRequires: python3-pytest-cov +BuildRequires: python3-pytest-mock BuildRequires: python3-pytest-qt BuildRequires: python3-pytest-timeout BuildRequires: python3-pytest-xvfb BuildRequires: python3-scipy -BuildRequires: python3-spyder-kernels >= 0.4.3 +BuildRequires: python3-spyder-kernels >= 0.5.0 BuildRequires: python3-sympy BuildRequires: xauth BuildRequires: xorg-x11-server @@ -91,8 +90,9 @@ Requires: python3-pyzmq Requires: python3-qt5 >= 5.2 Requires: python3-qtconsole >= 4.2.0 +Requires: python3-qtwebengine-qt5 < 5.13 Requires: python3-rope >= 0.10.5 -Requires: python3-spyder-kernels >= 0.4.3 +Requires: python3-spyder-kernels >= 0.5.0 Recommends: python3-Pillow Recommends: python3-matplotlib >= 1.0 Recommends: python3-numpy ++++++ spyder-3.3.4.tar.gz -> spyder-3.3.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/CHANGELOG.md new/spyder-3.3.5/CHANGELOG.md --- old/spyder-3.3.4/CHANGELOG.md 2019-03-31 20:48:24.000000000 +0200 +++ new/spyder-3.3.5/CHANGELOG.md 2019-06-27 17:30:38.000000000 +0200 @@ -1,5 +1,49 @@ # History of changes +## Version 3.3.5 (2019-06-27) + +### New features + +* Add option to allow users showing/hiding CMD windows created by the + `subprocess` module on Windows. The option can be found in + `Preferences > IPython Console > Advanced settings > Windows adjustments`. + +### Issues Closed + +* [Issue 9520](https://github.com/spyder-ide/spyder/issues/9520) - Can't run profiler ([PR 9652](https://github.com/spyder-ide/spyder/pull/9652)) +* [Issue 9304](https://github.com/spyder-ide/spyder/issues/9304) - PermissionError when trying to load a kernel connection file ([PR 9651](https://github.com/spyder-ide/spyder/pull/9651)) +* [Issue 9262](https://github.com/spyder-ide/spyder/issues/9262) - Only require PyWebEngine on Python 3+ to avoid blocking py2 compat in pip wheels ([PR 9436](https://github.com/spyder-ide/spyder/pull/9436)) +* [Issue 9240](https://github.com/spyder-ide/spyder/issues/9240) - The external system terminal close after running script if the Python console exits due to an exception ([PR 9312](https://github.com/spyder-ide/spyder/pull/9312)) +* [Issue 9221](https://github.com/spyder-ide/spyder/issues/9221) - TypeError: cursor_position_changed ([PR 9650](https://github.com/spyder-ide/spyder/pull/9650)) +* [Issue 9217](https://github.com/spyder-ide/spyder/issues/9217) - ValueError when clicking on a traceback link in the IPython console ([PR 9649](https://github.com/spyder-ide/spyder/pull/9649)) +* [Issue 9143](https://github.com/spyder-ide/spyder/issues/9143) - Help pane doesn't accept aliased modules ([PR 9166](https://github.com/spyder-ide/spyder/pull/9166)) +* [Issue 9113](https://github.com/spyder-ide/spyder/issues/9113) - Opening window in a subprocess from Spyder ([PR 9123](https://github.com/spyder-ide/spyder/pull/9123)) +* [Issue 9093](https://github.com/spyder-ide/spyder/issues/9093) - Error when trying to create spyder.lock on an unwritable config directory ([PR 9098](https://github.com/spyder-ide/spyder/pull/9098)) +* [Issue 9051](https://github.com/spyder-ide/spyder/issues/9051) - Variable explorer viewers go to the background on macOS ([PR 9119](https://github.com/spyder-ide/spyder/pull/9119)) + +In this release 10 issues were closed. + +### Pull Requests Merged + +* [PR 9658](https://github.com/spyder-ide/spyder/pull/9658) - PR: Require spyder-kernels 0.5.0 in setup.py +* [PR 9652](https://github.com/spyder-ide/spyder/pull/9652) - PR: Remove usage of QTextCodec because it's not really needed ([9520](https://github.com/spyder-ide/spyder/issues/9520)) +* [PR 9651](https://github.com/spyder-ide/spyder/pull/9651) - PR: Catch error when loading kernel connection file ([9304](https://github.com/spyder-ide/spyder/issues/9304)) +* [PR 9650](https://github.com/spyder-ide/spyder/pull/9650) - PR: Catch an error when disconnecting a signal in calltip widget ([9221](https://github.com/spyder-ide/spyder/issues/9221)) +* [PR 9649](https://github.com/spyder-ide/spyder/pull/9649) - PR: Catch error when pressing the link of a traceback in IPython console ([9217](https://github.com/spyder-ide/spyder/issues/9217)) +* [PR 9436](https://github.com/spyder-ide/spyder/pull/9436) - PR: Require pyqtwebengine only in Python 3 ([9262](https://github.com/spyder-ide/spyder/issues/9262)) +* [PR 9312](https://github.com/spyder-ide/spyder/pull/9312) - PR: Improvements to the cmd used to start external terminals on Windows ([9240](https://github.com/spyder-ide/spyder/issues/9240)) +* [PR 9166](https://github.com/spyder-ide/spyder/pull/9166) - PR: Fix Help plugin string validation for the console ([9143](https://github.com/spyder-ide/spyder/issues/9143)) +* [PR 9123](https://github.com/spyder-ide/spyder/pull/9123) - PR: Add preference to show/hide cmd windows generated by the subprocess module ([9113](https://github.com/spyder-ide/spyder/issues/9113)) +* [PR 9119](https://github.com/spyder-ide/spyder/pull/9119) - PR: Make Variable Explorer viewers stay on top in macOS ([9051](https://github.com/spyder-ide/spyder/issues/9051)) +* [PR 9099](https://github.com/spyder-ide/spyder/pull/9099) - PR: Add sponsors sections and remove relative links to images in Readme +* [PR 9098](https://github.com/spyder-ide/spyder/pull/9098) - PR: Avoid some permission errors at startup on Windows ([9093](https://github.com/spyder-ide/spyder/issues/9093)) + +In this release 12 pull requests were closed. + + +---- + + ## Version 3.3.4 (2019-03-31) ### New features diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/PKG-INFO new/spyder-3.3.5/PKG-INFO --- old/spyder-3.3.4/PKG-INFO 2019-03-31 20:54:16.000000000 +0200 +++ new/spyder-3.3.5/PKG-INFO 2019-06-27 17:32:07.000000000 +0200 @@ -1,14 +1,13 @@ Metadata-Version: 1.1 Name: spyder -Version: 3.3.4 +Version: 3.3.5 Summary: The Scientific Python Development Environment Home-page: https://www.spyder-ide.org/ Author: The Spyder Project Contributors Author-email: spyder...@googlegroups.com License: MIT Download-URL: https://www.spyder-ide.org/#fh5co-download -Description: ![Spyder — The Scientific Python Development Environment]( - ./img_src/spyder_readme_banner.png) +Description: ![Spyder — The Scientific Python Development Environment](https://raw.githubusercontent.com/spyder-ide/spyder/master/img_src/spyder_readme_banner.png) *Copyright © 2009–2019 [Spyder Project Contributors]( https://github.com/spyder-ide/spyder/graphs/contributors)* @@ -31,7 +30,7 @@ [![codecov](https://codecov.io/gh/spyder-ide/spyder/branch/master/graph/badge.svg)](https://codecov.io/gh/spyder-ide/spyder) - ![Screenshot of Spyder's main window](./img_src/screenshot.png) + ![Screenshot of Spyder's main window](https://raw.githubusercontent.com/spyder-ide/spyder/master/img_src/screenshot.png) ## Overview @@ -243,6 +242,19 @@ * **Cython**: Run Cython files in the IPython console. + ## Sponsors + + Spyder is funded thanks to the generous support of + + + [![Quansight](https://static.wixstatic.com/media/095d2c_2508c560e87d436ea00357abc404cf1d~mv2.png/v1/crop/x_0,y_9,w_915,h_329/fill/w_380,h_128,al_c,usm_0.66_1.00_0.01/095d2c_2508c560e87d436ea00357abc404cf1d~mv2.png)](https://www.quansight.com/)[![Numfocus](https://i2.wp.com/numfocus.org/wp-content/uploads/2017/07/NumFocus_LRG.png?fit=320%2C148&ssl=1)](https://numfocus.org/) + + + and the donations we have received from our users around the world through [Open Collective](https://opencollective.com/spyder/): + + [![Sponsors](https://opencollective.com/spyder/sponsors.svg)](https://opencollective.com/spyder#support) + + ## More information [Main Website](https://www.spyder-ide.org/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/README.md new/spyder-3.3.5/README.md --- old/spyder-3.3.4/README.md 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/README.md 2019-06-27 17:16:58.000000000 +0200 @@ -1,5 +1,4 @@ -![Spyder — The Scientific Python Development Environment]( -./img_src/spyder_readme_banner.png) +![Spyder — The Scientific Python Development Environment](https://raw.githubusercontent.com/spyder-ide/spyder/master/img_src/spyder_readme_banner.png) *Copyright © 2009–2019 [Spyder Project Contributors]( https://github.com/spyder-ide/spyder/graphs/contributors)* @@ -22,7 +21,7 @@ [![codecov](https://codecov.io/gh/spyder-ide/spyder/branch/master/graph/badge.svg)](https://codecov.io/gh/spyder-ide/spyder) -![Screenshot of Spyder's main window](./img_src/screenshot.png) +![Screenshot of Spyder's main window](https://raw.githubusercontent.com/spyder-ide/spyder/master/img_src/screenshot.png) ## Overview @@ -234,6 +233,19 @@ * **Cython**: Run Cython files in the IPython console. +## Sponsors + +Spyder is funded thanks to the generous support of + + +[![Quansight](https://static.wixstatic.com/media/095d2c_2508c560e87d436ea00357abc404cf1d~mv2.png/v1/crop/x_0,y_9,w_915,h_329/fill/w_380,h_128,al_c,usm_0.66_1.00_0.01/095d2c_2508c560e87d436ea00357abc404cf1d~mv2.png)](https://www.quansight.com/)[![Numfocus](https://i2.wp.com/numfocus.org/wp-content/uploads/2017/07/NumFocus_LRG.png?fit=320%2C148&ssl=1)](https://numfocus.org/) + + +and the donations we have received from our users around the world through [Open Collective](https://opencollective.com/spyder/): + +[![Sponsors](https://opencollective.com/spyder/sponsors.svg)](https://opencollective.com/spyder#support) + + ## More information [Main Website](https://www.spyder-ide.org/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/setup.py new/spyder-3.3.5/setup.py --- old/spyder-3.3.4/setup.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/setup.py 2019-06-27 17:16:58.000000000 +0200 @@ -232,7 +232,7 @@ 'pyzmq', 'chardet>=2.0.0', 'numpydoc', - 'spyder-kernels>=0.4.3,<1.0', + 'spyder-kernels>=0.5.0,<1.0', # Don't require keyring for Python 2 and Linux # because it depends on system packages 'keyring;sys_platform!="linux2"', @@ -241,7 +241,7 @@ 'pyqt5<5.13;python_version>="3"', # pyqt5 5.12 split WebEngine into the # pyqtwebengine module - 'pyqtwebengine<5.13' + 'pyqtwebengine<5.13;python_version>="3"' ] extras_require = { @@ -250,7 +250,7 @@ 'pytest-qt', 'pytest-mock', 'pytest-cov', - 'pytest-xvfb', + 'pytest-xvfb;platform_system=="Linux"', 'mock', 'flaky', 'pandas', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/__init__.py new/spyder-3.3.5/spyder/__init__.py --- old/spyder-3.3.4/spyder/__init__.py 2019-03-31 20:51:31.000000000 +0200 +++ new/spyder-3.3.5/spyder/__init__.py 2019-06-27 17:31:23.000000000 +0200 @@ -29,7 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE. """ -version_info = (3, 3, 4) +version_info = (3, 3, 5) __version__ = '.'.join(map(str, version_info)) __license__ = __doc__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/app/tests/test_mainwindow.py new/spyder-3.3.5/spyder/app/tests/test_mainwindow.py --- old/spyder-3.3.4/spyder/app/tests/test_mainwindow.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/app/tests/test_mainwindow.py 2019-06-27 17:16:58.000000000 +0200 @@ -268,6 +268,58 @@ @pytest.mark.slow @flaky(max_runs=3) +@pytest.mark.skipif(PY2, reason="Times out in PY2") +def test_get_help_combo(main_window, qtbot): + """ + Test that Help can display docstrings for names typed in its combobox. + """ + shell = main_window.ipyconsole.get_current_shellwidget() + qtbot.waitUntil(lambda: shell._prompt_html is not None, + timeout=SHELL_TIMEOUT) + + help_plugin = main_window.help + webview = help_plugin.rich_text.webview._webview + if WEBENGINE: + webpage = webview.page() + else: + webpage = webview.page().mainFrame() + + # --- From the console --- + # Write some object in the console + with qtbot.waitSignal(shell.executed): + shell.execute('import numpy as np') + + # Get help - numpy + help_plugin.combo.selected() + + qtbot.keyClicks(help_plugin.combo, 'numpy', delay=100) + + # Check that a expected text is part of the page + qtbot.waitUntil(lambda: check_text(webpage, "NumPy"), timeout=6000) + + # Get help - numpy.arange + qtbot.keyClick(help_plugin.combo, Qt.Key_Right) + qtbot.keyClicks(help_plugin.combo, '.arange', delay=100) + + # Check that a expected text is part of the page + qtbot.waitUntil(lambda: check_text(webpage, "arange"), timeout=6000) + + # Get help - np + qtbot.keyClicks(help_plugin.combo, 'np', delay=100) + + # Check that a expected text is part of the page + qtbot.waitUntil(lambda: check_text(webpage, "NumPy"), timeout=6000) + + # Get help - np.arange + qtbot.keyClick(help_plugin.combo, Qt.Key_Right) + qtbot.keyClicks(help_plugin.combo, '.arange', delay=100) + + # Check that a expected text is part of the page + qtbot.waitUntil(lambda: check_text(webpage, "arange"), timeout=6000) + + +@pytest.mark.slow +@flaky(max_runs=3) @pytest.mark.use_introspection def test_get_help(main_window, qtbot): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/config/main.py new/spyder-3.3.5/spyder/config/main.py --- old/spyder-3.3.4/spyder/config/main.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/config/main.py 2019-06-27 17:16:58.000000000 +0200 @@ -170,7 +170,11 @@ 'in_prompt': '', 'out_prompt': '', 'show_elapsed_time': False, - 'ask_before_restart': True + 'ask_before_restart': True, + # This is True because there are libraries like Pyomo + # that generate a lot of Command Prompts while running, + # and that's extremely annoying for Windows users. + 'hide_cmd_windows': True }), ('variable_explorer', { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/plugins/help.py new/spyder-3.3.5/spyder/plugins/help.py --- old/spyder-3.3.4/spyder/plugins/help.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/plugins/help.py 2019-06-27 17:16:58.000000000 +0200 @@ -68,21 +68,24 @@ if not re.search(r'^[a-zA-Z0-9_\.]*$', str(qstr), 0): return False objtxt = to_text_string(qstr) + shell_is_defined = False if self.help.get_option('automatic_import'): shell = self.help.internal_shell if shell is not None: - return shell.is_defined(objtxt, force_import=True) - shell = self.help.get_shell() - if shell is not None: - try: - return shell.is_defined(objtxt) - except socket.error: - shell = self.help.get_shell() + shell_is_defined = shell.is_defined(objtxt, force_import=True) + if not shell_is_defined: + shell = self.help.get_shell() + if shell is not None: try: - return shell.is_defined(objtxt) + shell_is_defined = shell.is_defined(objtxt) except socket.error: - # Well... too bad! - pass + shell = self.help.get_shell() + try: + shell_is_defined = shell.is_defined(objtxt) + except socket.error: + # Well... too bad! + pass + return shell_is_defined def validate_current_text(self): self.validate(self.currentText()) @@ -91,7 +94,7 @@ """Reimplemented to avoid formatting actions""" valid = self.is_valid(qstr) if self.hasFocus() and valid is not None: - if editing: + if editing and not valid: # Combo box text is being modified: invalidate the entry self.show_tip(self.tips[valid]) self.valid.emit(False, False) @@ -397,7 +400,7 @@ self.combo.setMaxCount(self.get_option('max_history_entries')) self.combo.addItems( self.load_history() ) self.combo.setItemText(0, '') - self.combo.valid.connect(lambda valid: self.force_refresh(valid)) + self.combo.valid.connect(self.force_refresh) # Plain text docstring option self.docstring = True @@ -749,8 +752,11 @@ else: self.rich_text.webview.load(QUrl(url)) - #------ Public API --------------------------------------------------------- - def force_refresh(self, valid=True): + # ------ Public API ------------------------------------------------------- + @Slot() + @Slot(bool) + @Slot(bool, bool) + def force_refresh(self, valid=True, editing=True): if valid: if self.source_is_console(): self.set_object_text(None, force_refresh=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/plugins/history.py new/spyder-3.3.5/spyder/plugins/history.py --- old/spyder-3.3.4/spyder/plugins/history.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/plugins/history.py 2019-06-27 17:16:58.000000000 +0200 @@ -231,13 +231,23 @@ editor.set_font( self.get_plugin_font(), color_scheme ) editor.toggle_wrap_mode( self.get_option('wrap') ) - text, _ = encoding.read(filename) + # Avoid a possible error when reading the history file + try: + text, _ = encoding.read(filename) + except (IOError, OSError): + text = "# Previous history could not be read from disk, sorry\n\n" text = normalize_eols(text) linebreaks = [m.start() for m in re.finditer('\n', text)] maxNline = self.get_option('max_entries') if len(linebreaks) > maxNline: text = text[linebreaks[-maxNline - 1] + 1:] - encoding.write(text, filename) + # Avoid an error when trying to write the trimmed text to + # disk. + # See issue 9093 + try: + encoding.write(text, filename) + except (IOError, OSError): + pass editor.set_text(text) editor.set_cursor_position('eof') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/plugins/ipythonconsole.py new/spyder-3.3.5/spyder/plugins/ipythonconsole.py --- old/spyder-3.3.4/spyder/plugins/ipythonconsole.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/plugins/ipythonconsole.py 2019-06-27 17:16:58.000000000 +0200 @@ -621,6 +621,16 @@ prompts_layout.addLayout(prompts_g_layout) prompts_group.setLayout(prompts_layout) + # Windows adjustments + windows_group = QGroupBox(_("Windows adjustments")) + hide_cmd_windows = newcb( + _("Hide command line output windows " + "generated by the subprocess module."), + 'hide_cmd_windows') + windows_layout = QVBoxLayout() + windows_layout.addWidget(hide_cmd_windows) + windows_group.setLayout(windows_layout) + # --- Tabs organization --- tabs = QTabWidget() tabs.addTab(self.create_tab(interface_group, comp_group, @@ -629,8 +639,9 @@ _("Graphics")) tabs.addTab(self.create_tab(run_lines_group, run_file_group), _("Startup")) - tabs.addTab(self.create_tab(jedi_group, greedy_group, autocall_group, sympy_group, - prompts_group), _("Advanced Settings")) + tabs.addTab(self.create_tab(jedi_group, greedy_group, autocall_group, + sympy_group, prompts_group, + windows_group), _("Advanced Settings")) vlayout = QVBoxLayout() vlayout.addWidget(tabs) @@ -1683,7 +1694,11 @@ match = get_error_match(to_text_string(text)) if match: fname, lnb = match.groups() - self.edit_goto.emit(osp.abspath(fname), int(lnb), '') + # This is needed to fix issue spyder-ide/spyder#9217 + try: + self.edit_goto.emit(osp.abspath(fname), int(lnb), '') + except ValueError: + pass @Slot() def show_intro(self): @@ -1808,7 +1823,17 @@ # Create kernel client kernel_client = QtKernelClient(connection_file=connection_file) - kernel_client.load_connection_file() + + # This is needed for issue spyder-ide/spyder#9304 + try: + kernel_client.load_connection_file() + except Exception as e: + QMessageBox.critical(self, _('Connection error'), + _("An error occurred while trying to load " + "the kernel connection file. The error " + "was:\n\n") + to_text_string(e)) + return + if hostname is not None: try: connection_info = dict(ip = kernel_client.ip, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/utils/external/lockfile.py new/spyder-3.3.5/spyder/utils/external/lockfile.py --- old/spyder-3.3.4/spyder/utils/external/lockfile.py 2018-12-02 23:09:58.000000000 +0100 +++ new/spyder-3.3.5/spyder/utils/external/lockfile.py 2019-06-27 17:16:58.000000000 +0200 @@ -96,11 +96,14 @@ try: rename(newlinkname, filename) except: + # This is needed to avoid an error when we don't + # have permissions to write in ~/.spyder + # See issues 6319 and 9093 try: os.remove(newvalname) os.rmdir(newlinkname) except (IOError, OSError): - pass + return raise def readlink(filename): #analysis:ignore diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/utils/ipython/kernelspec.py new/spyder-3.3.5/spyder/utils/ipython/kernelspec.py --- old/spyder-3.3.4/spyder/utils/ipython/kernelspec.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/utils/ipython/kernelspec.py 2019-06-27 17:16:58.000000000 +0200 @@ -117,7 +117,8 @@ 'SPY_JEDI_O': CONF.get('ipython_console', 'jedi_completer'), 'SPY_SYMPY_O': CONF.get('ipython_console', 'symbolic_math'), 'SPY_RUN_CYTHON': self.is_cython, - 'SPY_TESTING': running_under_pytest() or SAFE_MODE + 'SPY_TESTING': running_under_pytest() or SAFE_MODE, + 'SPY_HIDE_CMD': CONF.get('ipython_console', 'hide_cmd_windows') } # Add our PYTHONPATH to env_vars diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/utils/programs.py new/spyder-3.3.5/spyder/utils/programs.py --- old/spyder-3.3.4/spyder/utils/programs.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/utils/programs.py 2019-06-27 17:16:58.000000000 +0200 @@ -291,7 +291,10 @@ p_args += get_python_args(fname, python_args, interact, debug, args) if os.name == 'nt': - cmd = 'start cmd.exe /c "cd %s && ' % wdir + ' '.join(p_args) + '"' + cmd = 'start cmd.exe /K "' + if wdir: + cmd += 'cd ' + wdir + ' && ' + cmd += ' '.join(p_args) + '"' + ' ^&^& exit' # Command line and cwd have to be converted to the filesystem # encoding before passing them to subprocess, but only for # Python 2. @@ -300,7 +303,10 @@ cmd = encoding.to_fs_from_unicode(cmd) wdir = encoding.to_fs_from_unicode(wdir) try: - run_shell_command(cmd, cwd=wdir) + if wdir: + run_shell_command(cmd, cwd=wdir) + else: + run_shell_command(cmd) except WindowsError: from qtpy.QtWidgets import QMessageBox from spyder.config.base import _ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/utils/tests/test_programs.py new/spyder-3.3.5/spyder/utils/tests/test_programs.py --- old/spyder-3.3.4/spyder/utils/tests/test_programs.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/utils/tests/test_programs.py 2019-06-27 17:16:58.000000000 +0200 @@ -6,6 +6,7 @@ """Tests for programs.py""" import os +import os.path as osp import sys from flaky import flaky @@ -35,6 +36,22 @@ INVALID_INTERPRETER = os.path.join(home_dir, 'miniconda', 'bin', 'ipython') +# ============================================================================= +# ---- Fixtures +# ============================================================================= +@pytest.fixture +def scriptpath(tmpdir): + """Save a basic Python script in a file.""" + script = ("with open('out.txt', 'w') as f:\n" + " f.write('done')\n") + scriptpath = tmpdir.join('write-done.py') + scriptpath.write(script) + return scriptpath + + +# ============================================================================= +# ---- Tests +# ============================================================================= @pytest.mark.skipif((sys.platform.startswith('linux') or os.environ.get('CI', None) is None), reason='It only runs in CI services and ' @@ -44,35 +61,43 @@ @flaky(max_runs=3) -@pytest.mark.skipif((os.name == 'nt' or os.environ.get('CI', None) is None or - sys.platform == 'darwin'), - reason='gets stuck on Windows and fails in macOS and sometimes locally') # FIXME -def test_run_python_script_in_terminal(tmpdir, qtbot): - scriptpath = tmpdir.join('write-done.py') - outfilepath = tmpdir.join('out.txt') - script = ("with open('out.txt', 'w') as f:\n" - " f.write('done')\n") - scriptpath.write(script) - run_python_script_in_terminal(scriptpath.strpath, tmpdir.strpath, '', - False, False, '') - qtbot.wait(1000) # wait for script to finish - res = outfilepath.read() +@pytest.mark.skipif( + os.environ.get('CI', None) is None or sys.platform == 'darwin', + reason='fails in macOS and sometimes locally') +def test_run_python_script_in_terminal(scriptpath, qtbot): + """ + Test running a Python script in an external terminal when specifying + explicitely the working directory. + """ + # Run the script. + outfilepath = osp.join(scriptpath.dirname, 'out.txt') + run_python_script_in_terminal( + scriptpath.strpath, scriptpath.dirname, '', False, False, '') + qtbot.waitUntil(lambda: osp.exists(outfilepath), timeout=1000) + + # Assert the result. + with open(outfilepath, 'r') as txtfile: + res = txtfile.read() assert res == 'done' @flaky(max_runs=3) -@pytest.mark.skipif((os.name == 'nt' or os.environ.get('CI', None) is None or - sys.platform == 'darwin'), - reason='gets stuck on Windows and fails in macOS and sometimes locally') # FIXME -def test_run_python_script_in_terminal_with_wdir_empty(tmpdir, qtbot): - scriptpath = tmpdir.join('write-done.py') - outfilepath = tmpdir.join('out.txt') - script = ("with open('{}', 'w') as f:\n" - " f.write('done')\n").format(outfilepath.strpath) - scriptpath.write(script) +@pytest.mark.skipif( + os.environ.get('CI', None) is None or sys.platform == 'darwin', + reason='fails in macOS and sometimes locally') +def test_run_python_script_in_terminal_with_wdir_empty(scriptpath, qtbot): + """ + Test running a Python script in an external terminal without specifying + the working directory. + """ + # Run the script. + outfilepath = osp.join(os.getcwd(), 'out.txt') run_python_script_in_terminal(scriptpath.strpath, '', '', False, False, '') - qtbot.wait(1000) # wait for script to finish - res = outfilepath.read() + qtbot.waitUntil(lambda: osp.exists(outfilepath), timeout=1000) + + # Assert the result. + with open(outfilepath, 'r') as txtfile: + res = txtfile.read() assert res == 'done' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/widgets/calltip.py new/spyder-3.3.5/spyder/widgets/calltip.py --- old/spyder-3.3.4/spyder/widgets/calltip.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/widgets/calltip.py 2019-06-27 17:16:58.000000000 +0200 @@ -118,8 +118,12 @@ """ Reimplemented to disconnect signal handlers and event filter. """ super(CallTipWidget, self).hideEvent(event) - self._text_edit.cursorPositionChanged.disconnect( - self._cursor_position_changed) + # This is needed for issue spyder-ide/spyder#9221 + try: + self._text_edit.cursorPositionChanged.disconnect( + self._cursor_position_changed) + except TypeError: + pass self._text_edit.removeEventFilter(self) def leaveEvent(self, event): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder/widgets/variableexplorer/collectionseditor.py new/spyder-3.3.5/spyder/widgets/variableexplorer/collectionseditor.py --- old/spyder-3.3.4/spyder/widgets/variableexplorer/collectionseditor.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder/widgets/variableexplorer/collectionseditor.py 2019-06-27 17:16:58.000000000 +0200 @@ -1421,8 +1421,13 @@ self.setWindowTitle(self.widget.get_title()) if icon is None: self.setWindowIcon(ima.icon('dictedit')) - # Make the dialog act as a window - self.setWindowFlags(Qt.Window) + + if sys.platform == 'darwin': + # See: https://github.com/spyder-ide/spyder/issues/9051 + self.setWindowFlags(Qt.Tool) + else: + # Make the dialog act as a window + self.setWindowFlags(Qt.Window) @Slot() def save_and_close_enable(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder_breakpoints/widgets/breakpointsgui.py new/spyder-3.3.5/spyder_breakpoints/widgets/breakpointsgui.py --- old/spyder-3.3.4/spyder_breakpoints/widgets/breakpointsgui.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder_breakpoints/widgets/breakpointsgui.py 2019-06-27 17:16:58.000000000 +0200 @@ -19,8 +19,7 @@ # Third party imports from qtpy import API from qtpy.compat import to_qvariant -from qtpy.QtCore import (QAbstractTableModel, QModelIndex, QTextCodec, Qt, - Signal) +from qtpy.QtCore import QAbstractTableModel, QModelIndex, Qt, Signal from qtpy.QtWidgets import (QItemDelegate, QMenu, QTableView, QVBoxLayout, QWidget) @@ -37,9 +36,6 @@ _ = gettext.gettext -locale_codec = QTextCodec.codecForLocale() - - class BreakpointTableModel(QAbstractTableModel): """ Table model for breakpoints dictionary diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder_profiler/widgets/profilergui.py new/spyder-3.3.5/spyder_profiler/widgets/profilergui.py --- old/spyder-3.3.4/spyder_profiler/widgets/profilergui.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder_profiler/widgets/profilergui.py 2019-06-27 17:16:58.000000000 +0200 @@ -24,8 +24,7 @@ # Third party imports from qtpy.compat import getopenfilename, getsavefilename -from qtpy.QtCore import (QByteArray, QProcess, QProcessEnvironment, QTextCodec, - Qt, Signal) +from qtpy.QtCore import QByteArray, QProcess, QProcessEnvironment, Qt, Signal from qtpy.QtGui import QColor from qtpy.QtWidgets import (QApplication, QHBoxLayout, QLabel, QMessageBox, QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget) @@ -49,9 +48,6 @@ _ = gettext.gettext -locale_codec = QTextCodec.codecForLocale() - - def is_profiler_installed(): from spyder.utils.programs import is_module_installed return is_module_installed('cProfile') and is_module_installed('pstats') @@ -320,7 +316,7 @@ qba += self.process.readAllStandardError() else: qba += self.process.readAllStandardOutput() - text = to_text_string( locale_codec.toUnicode(qba.data()) ) + text = to_text_string(qba.data(), encoding='utf-8') if error: self.error_output += text else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spyder-3.3.4/spyder_pylint/widgets/pylintgui.py new/spyder-3.3.5/spyder_pylint/widgets/pylintgui.py --- old/spyder-3.3.4/spyder_pylint/widgets/pylintgui.py 2019-03-31 20:36:33.000000000 +0200 +++ new/spyder-3.3.5/spyder_pylint/widgets/pylintgui.py 2019-06-27 17:16:58.000000000 +0200 @@ -21,7 +21,7 @@ # Third party imports import pylint from qtpy.compat import getopenfilename -from qtpy.QtCore import QByteArray, QProcess, QTextCodec, Signal, Slot +from qtpy.QtCore import QByteArray, QProcess, Signal, Slot from qtpy.QtWidgets import (QHBoxLayout, QLabel, QMessageBox, QTreeWidgetItem, QVBoxLayout, QWidget) @@ -46,7 +46,6 @@ import gettext _ = gettext.gettext -locale_codec = QTextCodec.codecForLocale() PYLINT_REQVER = '>=0.25' PYLINT_VER = pylint.__version__ dependencies.add("pylint", _("Static code analysis"), @@ -334,7 +333,7 @@ qba += self.process.readAllStandardError() else: qba += self.process.readAllStandardOutput() - text = to_text_string( locale_codec.toUnicode(qba.data()) ) + text = to_text_string(qba.data(), encoding='utf-8') if error: self.error_output += text else: