Skip to content

Commit

Permalink
Merge pull request #4224 from andfoy/anaconda_update_msg
Browse files Browse the repository at this point in the history
PR: Add warning message about updating Spyder if installed with Anaconda
  • Loading branch information
ccordoba12 authored Mar 7, 2017
2 parents fc02864 + 9677c25 commit 988e292
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions spyder/app/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -2776,13 +2776,26 @@ 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 = _("<hr><b>IMPORTANT NOTE:</b> It seems "
"that you are using Spyder with "
"<b>Anaconda/Miniconda</b>. Please "
"<<b>don't</b> use code>pip</code> to "
"update it as that will probably break "
"your installation.<br><br>"
"Instead, please wait until new conda "
"packages are available and use "
"<code>conda</code> to perform the "
"update.<hr>")
msg = _("<b>Spyder %s is available!</b> <br><br>Please use "
"your package manager to update Spyder or go to our "
"<a href=\"%s\">Releases</a> page to download this "
"new version. <br><br>If you are not sure how to "
"proceed to update Spyder please refer to our "
" <a href=\"%s\">Installation</a> instructions."
"") % (latest_release, url_r, url_i)
msg += '<br>' + anaconda_msg
box.setText(msg)
box.set_check_visible(True)
box.exec_()
Expand All @@ -2799,7 +2812,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

Expand Down

0 comments on commit 988e292

Please sign in to comment.