From 2550ce49c3ed9a2eec76291f9f7d6ce7e9a762fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Andr=C3=A9s=20Margffoy=20Tuay?= Date: Fri, 3 Mar 2017 11:28:14 -0500 Subject: [PATCH 1/5] Added Anaconda/miniconda warning message when updating Spyder --- spyder/app/mainwindow.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index bb3d40fecec..11c65f7b52a 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2759,9 +2759,9 @@ def _check_updates_ready(self): box.set_checkbox_text(_("Check for updates on startup")) box.setStandardButtons(QMessageBox.Ok) box.setDefaultButton(QMessageBox.Ok) - #The next line is commented because it freezes the dialog. - #For now there is then no info icon. This solves issue #3609. - #box.setIcon(QMessageBox.Information) + # The next line is commented because it freezes the dialog. + # For now there is then no info icon. This solves issue #3609. + # box.setIcon(QMessageBox.Information) # Adjust the checkbox depending on the stored configuration section, option = 'main', 'check_updates_on_startup' @@ -2776,6 +2776,16 @@ def _check_updates_ready(self): check_updates = box.is_checked() else: if update_available: + anaconda_msg = '' + if 'Anaconda' in sys.version or 'conda-forge' in sys.version: + anaconda_msg = _("Important note: It seems that " + "you are using Spyder with Anaconda/" + "Miniconda, please don't use pip " + "to update as it would probably break " + "your installation.
Instead, please " + "wait until new conda packages are made " + "available and use conda install " + "spyder to perform the update.") msg = _("Spyder %s is available!

Please use " "your package manager to update Spyder or go to our " "Releases page to download this " @@ -2783,6 +2793,7 @@ def _check_updates_ready(self): "proceed to update Spyder please refer to our " " Installation instructions." "") % (latest_release, url_r, url_i) + msg += '
' + anaconda_msg box.setText(msg) box.set_check_visible(True) box.exec_() @@ -2799,7 +2810,7 @@ def _check_updates_ready(self): # Enable check_updates_action after the thread has finished self.check_updates_action.setDisabled(False) - + # Provide feeback when clicking menu if check on startup is on self.give_updates_feedback = True From e47e71c38d2c3ea4f18c64c95b73be6ba4091ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Andr=C3=A9s=20Margffoy=20Tuay?= Date: Fri, 3 Mar 2017 11:56:50 -0500 Subject: [PATCH 2/5] Minor message style modifications --- spyder/app/mainwindow.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 11c65f7b52a..2ff2ecdecbc 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2782,10 +2782,11 @@ def _check_updates_ready(self): "you are using Spyder with Anaconda/" "Miniconda, please don't use pip " "to update as it would probably break " - "your installation.
Instead, please " - "wait until new conda packages are made " - "available and use conda install " - "spyder to perform the update.") + "your installation.

Instead, " + "please wait until new conda packages " + "are made available and use conda " + "install spyder to perform the " + "update.") msg = _("Spyder %s is available!

Please use " "your package manager to update Spyder or go to our " "Releases page to download this " @@ -2793,7 +2794,7 @@ def _check_updates_ready(self): "proceed to update Spyder please refer to our " " Installation instructions." "") % (latest_release, url_r, url_i) - msg += '
' + anaconda_msg + msg += '

' + anaconda_msg box.setText(msg) box.set_check_visible(True) box.exec_() From 7362015696fbf2eea66b209665e16218c8c20288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Andr=C3=A9s=20Margffoy=20Tuay?= Date: Fri, 3 Mar 2017 17:49:44 -0500 Subject: [PATCH 3/5] Minor style modifications --- spyder/app/mainwindow.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 2ff2ecdecbc..337dbacde46 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2781,12 +2781,11 @@ def _check_updates_ready(self): anaconda_msg = _("Important note: It seems that " "you are using Spyder with Anaconda/" "Miniconda, please don't use pip " - "to update as it would probably break " - "your installation.

Instead, " - "please wait until new conda packages " - "are made available and use conda " - "install spyder to perform the " - "update.") + "to update as that would probably break " + "your installation.

" + "Instead, please wait until new conda " + "packages are made available and use " + "
conda
to perform the update.") msg = _("Spyder %s is available!

Please use " "your package manager to update Spyder or go to our " "Releases page to download this " From 14004a5ccc5df95af1240477e22f97eb77f28e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Andr=C3=A9s=20Margffoy=20Tuay?= Date: Mon, 6 Mar 2017 14:53:39 -0500 Subject: [PATCH 4/5] Final message modifications --- spyder/app/mainwindow.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 337dbacde46..0dc038e0795 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2780,12 +2780,13 @@ def _check_updates_ready(self): if 'Anaconda' in sys.version or 'conda-forge' in sys.version: anaconda_msg = _("Important note: It seems that " "you are using Spyder with Anaconda/" - "Miniconda, please don't use pip " - "to update as that would probably break " + "Miniconda, please don't use " + "pip " + "to update it as that would probably break " "your installation.

" "Instead, please wait until new conda " "packages are made available and use " - "
conda
to perform the update.") + "conda to perform the update.") msg = _("Spyder %s is available!

Please use " "your package manager to update Spyder or go to our " "Releases page to download this " From 9677c25d761dbd0da3ecb436d3ebe0787eb44abf Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Mon, 6 Mar 2017 19:20:07 -0500 Subject: [PATCH 5/5] Improve Anaconda message a bit more --- spyder/app/mainwindow.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 0dc038e0795..634fcc59987 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2778,15 +2778,16 @@ def _check_updates_ready(self): if update_available: anaconda_msg = '' if 'Anaconda' in sys.version or 'conda-forge' in sys.version: - anaconda_msg = _("Important note: It seems that " - "you are using Spyder with Anaconda/" - "Miniconda, please don't use " - "pip " - "to update it as that would probably break " - "your installation.

" + anaconda_msg = _("
IMPORTANT NOTE: It seems " + "that you are using Spyder with " + "Anaconda/Miniconda. Please " + "<don't use code>pip to " + "update it as that will probably break " + "your installation.

" "Instead, please wait until new conda " - "packages are made available and use " - "conda to perform the update.") + "packages are available and use " + "conda to perform the " + "update.
") msg = _("Spyder %s is available!

Please use " "your package manager to update Spyder or go to our " "Releases page to download this " @@ -2794,7 +2795,7 @@ def _check_updates_ready(self): "proceed to update Spyder please refer to our " " Installation instructions." "") % (latest_release, url_r, url_i) - msg += '

' + anaconda_msg + msg += '
' + anaconda_msg box.setText(msg) box.set_check_visible(True) box.exec_()