Skip to content

Commit

Permalink
Merge with 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
andfoy committed Aug 15, 2017
2 parents 50e2ccc + 071bd0e commit 972a18d
Show file tree
Hide file tree
Showing 45 changed files with 777 additions and 301 deletions.
4 changes: 4 additions & 0 deletions .pep8speaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# File : .pep8speaks.yml

scanner:
diff_only: True # Errors caused by only the patch are shown
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ before_install:

install:
- ./continuous_integration/travis/install.sh;
- ./continuous_integration/travis/install-qt.sh;

script:
- |
if [ "$USE_PYQT" = "pyqt5" ]; then
./continuous_integration/travis/test-qt5.sh || ./continuous_integration/travis/test-qt5.sh
else
./continuous_integration/travis/test-qt4.sh || ./continuous_integration/travis/test-qt4.sh
fi
- ./continuous_integration/travis/runtests.sh || ./continuous_integration/travis/runtests.sh || ./continuous_integration/travis/runtests.sh;

after_success:
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && coveralls
80 changes: 13 additions & 67 deletions Announcements.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,25 @@
# Minor release to list

**Subject**: [ANN] Spyder 3.2.0 is released!
**Subject**: [ANN] Spyder 3.2.1 is released!


Hi all,

On the behalf of the [Spyder Project Contributors](https://github.com/spyder-ide/spyder/graphs/contributors),
I'm pleased to announce that Spyder **3.2.0** has been released and is available for
I'm pleased to announce that Spyder **3.2.1** has been released and is available for
Windows, GNU/Linux and MacOS X: https://github.com/spyder-ide/spyder/releases

This release comes three months after version 3.1.4 and comes with major
enhancements and new features. The most important ones are:

* **Main Window**
* Add a dialog to quickly view all keyboard shortcuts defined in Spyder.
It can be accessed in the `Help > Shortcuts Summary` menu or using
the `Meta+F1` shortcut.
* Add an option to set a custom screen resolution scale factor. This option
is available in `Preferences > Appearance > Screen resolution`.

* **Editor**
* Add the ability to reorganize tabs by drag and drop.
* Add option to only replace in a selection.
* Add `Ctrl+Up` and `Ctrl+Down` shortcuts to move to the next/previous
cell, respectively.
* Add `Alt+Enter` shortcut to re-run the last cell.
* Add support to run Cython files from the Editor (i.e. by simply
pressing `F5`).
* Add syntax highlighting support for Markdown files.
* Add a tab switcher dialog to navigate files in most recently used
order. This dialog is activated with `Ctrl+Tab` and
`Ctrl+Shift+Tab` to go in forward or backward order, respectively.
* Make `Shift+Enter` search text backwards in the find/replace
widget.
* Add `Shift+Del` shortcut to delete lines.
* Add `Ctrl+]` and `Ctrl+[` shortcuts to indent/unindent text,
respectively.
* Add a *Save copy as* action.
* Add a context menu entry to show the selected file in the operating
system file explorer.

* **IPython Console**
* Several improvements to its debugger:
- Restore the ability to inspect variables using the Variable
Explorer.
- Make plotting work with a new `%plot` magic, but only using
the `inline` backend (e.g. `%plot plt.plot(range(10))`).
- Add history browsing with the Up and Down arrow keys.
- Make the *Clear console* and *Reset* keyboard shortcuts to work.
- Show plots from the Variable Explorer.
- Change the current working directory using the Working Directory toolbar.
- Use `Ctrl+Shift+C` to copy text.
* Add the possibility to run a file in the same (dedicated) console all the
time.
* Allow to rename consoles by doing a double-click on their tabs and setting
a new name.
* Make drag and drop of its tabs to work.
* Add menu entries to show environment variables and `sys.path` contents for
each console.

* **Find in Files**
* Add options to search on the current file, project or working directory.
* Allow to order results alphabetically.
* Remove previous search results when a new search takes place.
* Remove unused search options.

* **Working Directory toolbar**
* Rename it to *Current working directory* (it was Global working
directory).
* Simplify its options to make them more understandable.
* Make it show the working directory of the active IPython console and
the current directory in the File Explorer.

In this release we also fixed 98 issues and merged 111 pull requests that amount
to more than 750 commits. For a full list of fixes, please see our
This release comes three weeks after version 3.2.0 and it fixes several important
problems:

* An error when using non-ascii directories to run code in Python 2 and
Windows.
* An error when setting a custom scale factor on HiDPI screens.
* A blockage in the IPython console when running statements of the form
`from foo import *`.

In this release we also fixed 22 issues and merged 28 pull requests that amount
to more than 100 commits. For a full list of fixes, please see our
[changelog](https://github.com/spyder-ide/spyder/blob/3.x/CHANGELOG.md)

Don't forget to follow Spyder updates/news on the project
Expand Down
68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,73 @@
# History of changes

## Version 3.2.1 (2017-08-13)

### Bugs fixed

**Issues**

* [Issue 4943](https://github.com/spyder-ide/spyder/issues/4943) - Unicode symbols are not highlighted in the Editor
* [Issue 4922](https://github.com/spyder-ide/spyder/issues/4922) - Static code analysis produces error when running with empty filename
* [Issue 4873](https://github.com/spyder-ide/spyder/issues/4873) - Error when trying to get a very large namespace view from the kernel
* [Issue 4862](https://github.com/spyder-ide/spyder/issues/4862) - File execution fails with AttributeError: _Feature instance has no attribute '__len__'
* [Issue 4843](https://github.com/spyder-ide/spyder/issues/4843) - Error when attempting to close a split panel in the editor window
* [Issue 4841](https://github.com/spyder-ide/spyder/issues/4841) - Setting QT_SCREEN_SCALE_FACTORS is not working as expected
* [Issue 4831](https://github.com/spyder-ide/spyder/issues/4831) - Error when rearranging tabs and multiple Editors
* [Issue 4824](https://github.com/spyder-ide/spyder/issues/4824) - Error when trying to print source code - AttributeError: 'QPrintDialog' object has no attribute 'addEnabledOption'
* [Issue 4816](https://github.com/spyder-ide/spyder/issues/4816) - Error when trying to change to non-ascii directories in the Working Directory toolbar
* [Issue 4811](https://github.com/spyder-ide/spyder/issues/4811) - Editor line number font size does not increase when zooming on windows
* [Issue 4810](https://github.com/spyder-ide/spyder/issues/4810) - Spyder crashes when attempting to define function named setup in IPython console
* [Issue 4806](https://github.com/spyder-ide/spyder/issues/4806) - Change color of matched parens in the IPython console
* [Issue 4797](https://github.com/spyder-ide/spyder/issues/4797) - Remove scientific_startup.py
* [Issue 4769](https://github.com/spyder-ide/spyder/issues/4769) - Exception raised when running file from project explorer
* [Issue 4763](https://github.com/spyder-ide/spyder/issues/4763) - In the Editor, tab does not switch when ctrl is released and focus remains on the tab_switcher
* [Issue 4754](https://github.com/spyder-ide/spyder/issues/4754) - Shifting multiple lines of code with ctrl + cmd + down-arrow-key doesn't work properly after first shift
* [Issue 4734](https://github.com/spyder-ide/spyder/issues/4734) - High DPI scaling messes up placement of breakpoint red circles
* [Issue 4453](https://github.com/spyder-ide/spyder/issues/4453) - Crash when opened file is renamed/deleted outside Spyder
* [Issue 4442](https://github.com/spyder-ide/spyder/issues/4442) - Segfault when closing with temporary file open
* [Issue 4304](https://github.com/spyder-ide/spyder/issues/4304) - EOLs incorrectly switch from LF to CRLF on split editor panes
* [Issue 4039](https://github.com/spyder-ide/spyder/issues/4039) - Sorting order of profiler is wrong
* [Issue 3166](https://github.com/spyder-ide/spyder/issues/3166) - Editor line numbers dissappear

In this release 22 issues were closed

**Pull requests**

* [PR 4949](https://github.com/spyder-ide/spyder/pull/4949) - PR: Add basic pep8speaks config file.
* [PR 4946](https://github.com/spyder-ide/spyder/pull/4946) - PR: Fix error when the selecting an unicode word
* [PR 4928](https://github.com/spyder-ide/spyder/pull/4928) - PR: Check that combobox text is not empty string before emiting valid signal
* [PR 4918](https://github.com/spyder-ide/spyder/pull/4918) - PR: Handle truncated dictionary of namespace view from the kernel
* [PR 4899](https://github.com/spyder-ide/spyder/pull/4899) - PR: Remove capture_dir_change method of IPython console shell widget
* [PR 4875](https://github.com/spyder-ide/spyder/pull/4875) - PR: Separate the installation of Qt from running our tests in Travis
* [PR 4870](https://github.com/spyder-ide/spyder/pull/4870) - PR: Save a reference to messagebox in EditorStack to avoid memory to be freed.
* [PR 4869](https://github.com/spyder-ide/spyder/pull/4869) - PR: Omit editor split menu option if its reference was deleted
* [PR 4866](https://github.com/spyder-ide/spyder/pull/4866) - PR: Remove TypeError and AttributeError exceptions from SpyderKernel
* [PR 4864](https://github.com/spyder-ide/spyder/pull/4864) - PR: Fix Run option in File and Project explorers
* [PR 4863](https://github.com/spyder-ide/spyder/pull/4863) - PR: Fix sorting in Profiler
* [PR 4861](https://github.com/spyder-ide/spyder/pull/4861) - PR: Install qtpy and qtconsole from Github when testing
* [PR 4850](https://github.com/spyder-ide/spyder/pull/4850) - PR: Update only current editor stack when moving tabs.
* [PR 4849](https://github.com/spyder-ide/spyder/pull/4849) - PR: Prevent importing packages that raise SystemExit exceptions when verifying if an object is defined
* [PR 4847](https://github.com/spyder-ide/spyder/pull/4847) - PR: Use Editor font to paint line numbers on all platforms
* [PR 4846](https://github.com/spyder-ide/spyder/pull/4846) - PR: Use QT_SCALE_FACTOR when users set only one scale factor
* [PR 4845](https://github.com/spyder-ide/spyder/pull/4845) - PR: Set eol_chars in cloned editor on split editor panes
* [PR 4835](https://github.com/spyder-ide/spyder/pull/4835) - PR: Delete print test because it segfaults too frequently
* [PR 4830](https://github.com/spyder-ide/spyder/pull/4830) - PR: Fix error when printing source code
* [PR 4828](https://github.com/spyder-ide/spyder/pull/4828) - PR: Fix error when using non-ascii current directory to run code
* [PR 4813](https://github.com/spyder-ide/spyder/pull/4813) - PR: Make highlighting colors in the IPython Console match those used in the Spyder Editor
* [PR 4799](https://github.com/spyder-ide/spyder/pull/4799) - PR: Delete scientific_startup.py
* [PR 4774](https://github.com/spyder-ide/spyder/pull/4774) - PR: Fix shifting code selection issues in the Editor
* [PR 4764](https://github.com/spyder-ide/spyder/pull/4764) - PR: Fix tab does not switch when ctrl is released issue
* [PR 4759](https://github.com/spyder-ide/spyder/pull/4759) - PR: Fix enable/disable spinbox bug in Editor preferences panel
* [PR 4749](https://github.com/spyder-ide/spyder/pull/4749) - PR: Add icon to MessageCheckBox while avoiding unclickable issue
* [PR 4738](https://github.com/spyder-ide/spyder/pull/4738) - PR: Update pixmap height calculation
* [PR 4733](https://github.com/spyder-ide/spyder/pull/4733) - PR: Avoid visible_blocks to be empty when first visible block is wrapped

In this release 28 pull requests were merged


----


## Version 3.2 (2017-07-24)

### New features
Expand Down
6 changes: 5 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ environment:
CONDA_DEPENDENCIES_FLAGS: "--quiet"
CONDA_DEPENDENCIES: >
rope pyflakes sphinx pygments pylint pycodestyle psutil nbconvert
qtawesome pickleshare qtpy pyzmq chardet mock pandas pytest
qtawesome pickleshare pyzmq chardet mock pandas pytest
pytest-cov numpydoc scipy pillow qtconsole matplotlib jedi
PIP_DEPENDENCIES: "pytest-qt pytest-timeout flaky"

Expand All @@ -37,6 +37,10 @@ install:
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "activate test"
# Install qtpy and qtconsole from Github
- "pip install git+https://github.com/spyder-ide/qtpy.git"
- "conda remove -q -y qtconsole"
- "pip install git+https://github.com/jupyter/qtconsole.git"

build: false

Expand Down
20 changes: 20 additions & 0 deletions continuous_integration/travis/install-qt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

export PATH="$HOME/miniconda/bin:$PATH"
source activate test

# We test with pip packages in Python 3.5 and PyQt5
if [ "$TRAVIS_PYTHON_VERSION" = "3.5" ] && [ "$USE_PYQT" = "pyqt5" ]; then
pip uninstall -q -y pytest-xvfb
pip install -q pyqt5

# Install qtconsole from Github
pip install git+https://github.com/jupyter/qtconsole.git

# Install qtpy from Github
pip install git+https://github.com/spyder-ide/qtpy.git
elif [ "$USE_PYQT" = "pyqt5" ]; then
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib
else
conda install -q qt=4.* pyqt=4.* qtconsole matplotlib
fi
4 changes: 4 additions & 0 deletions continuous_integration/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ source activate test

# We test with pip packages in Python 3.5 and PyQt5
if [ "$TRAVIS_PYTHON_VERSION" = "3.5" ] && [ "$USE_PYQT" = "pyqt5" ]; then
# Install qtconsole from Github
pip install git+https://github.com/jupyter/qtconsole.git

# Install Spyder and its dependencies
pip install -q -e .[test]
fi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
export PATH="$HOME/miniconda/bin:$PATH"
source activate test

pip uninstall -q -y pytest-xvfb
conda install -q qt=4.* pyqt=4.* qtconsole matplotlib
python bootstrap.py -- --reset

python runtests.py
15 changes: 0 additions & 15 deletions continuous_integration/travis/test-qt5.sh

This file was deleted.

2 changes: 1 addition & 1 deletion spyder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
OTHER DEALINGS IN THE SOFTWARE.
"""

version_info = (3, 2, 1, "dev0")
version_info = (3, 2, 2, "dev0")

__version__ = '.'.join(map(str, version_info))
__license__ = __doc__
Expand Down
19 changes: 13 additions & 6 deletions spyder/app/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
from qtpy.compat import from_qvariant
from qtpy.QtCore import (QByteArray, QCoreApplication, QPoint, QSize, Qt,
QThread, QTimer, QUrl, Signal, Slot)
from qtpy.QtGui import QColor, QDesktopServices, QKeySequence, QPixmap
from qtpy.QtGui import QColor, QDesktopServices, QIcon, QKeySequence, QPixmap
from qtpy.QtWidgets import (QAction, QApplication, QDockWidget, QMainWindow,
QMenu, QMessageBox, QShortcut, QSplashScreen,
QStyleFactory)
Expand Down Expand Up @@ -110,13 +110,21 @@
# splash screen created below
#==============================================================================
from spyder.utils.qthelpers import qapplication, MENU_SEPARATOR
from spyder.config.base import get_image_path
MAIN_APP = qapplication()

if PYQT5:
APP_ICON = QIcon(get_image_path("spyder.svg"))
else:
APP_ICON = QIcon(get_image_path("spyder.png"))

MAIN_APP.setWindowIcon(APP_ICON)

#==============================================================================
# Create splash screen out of MainWindow to reduce perceived startup time.
#==============================================================================
from spyder.config.base import _, get_image_path, DEV, PYTEST

if not PYTEST:
SPLASH = QSplashScreen(QPixmap(get_image_path('splash.svg')))
SPLASH_FONT = SPLASH.font()
Expand All @@ -129,7 +137,6 @@
else:
SPLASH = None


#==============================================================================
# Local utility imports
#==============================================================================
Expand Down Expand Up @@ -439,10 +446,7 @@ def signal_handler(signum, frame=None):

self.base_title = title
self.update_window_title()
resample = os.name != 'nt'
icon = ima.icon('spyder', resample=resample)
# Resampling SVG icon only on non-Windows platforms (see Issue 1314):
self.setWindowIcon(icon)

if set_windows_appusermodelid != None:
res = set_windows_appusermodelid()
debug_print("appusermodelid: " + str(res))
Expand Down Expand Up @@ -2903,6 +2907,9 @@ def initialize():
# possible
app = qapplication()

# --- Set application icon
app.setWindowIcon(APP_ICON)

#----Monkey patching QApplication
class FakeQApplication(QApplication):
"""Spyder's fake QApplication"""
Expand Down
21 changes: 14 additions & 7 deletions spyder/app/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
import time

# Third party imports
from qtpy import PYQT5
from qtpy.QtCore import Qt, QTimer
from qtpy.QtGui import QColor, QPixmap
from qtpy.QtGui import QColor, QPixmap, QIcon
from qtpy.QtWidgets import QApplication, QMessageBox, QSplashScreen, QWidget

# Local imports
from spyder.config.base import _, get_image_path
from spyder.py3compat import to_text_string
from spyder.utils import icon_manager as ima
from spyder.utils.qthelpers import qapplication
from spyder.config.main import CONF

Expand Down Expand Up @@ -160,19 +160,26 @@ def main():
#==========================================================================
if CONF.get('main', 'high_dpi_custom_scale_factor'):
factors = str(CONF.get('main', 'high_dpi_custom_scale_factors'))
os.environ['QT_SCREEN_SCALE_FACTORS'] = factors
f = list(filter(None, factors.split(';')))
if len(f) == 1:
os.environ['QT_SCALE_FACTOR'] = f[0]
else:
os.environ['QT_SCREEN_SCALE_FACTORS'] = factors
else:
os.environ['QT_SCALE_FACTOR'] = ''
os.environ['QT_SCREEN_SCALE_FACTORS'] = ''

# Splash screen
# -------------------------------------------------------------------------
# Start Qt Splash to inform the user of the current status
app = qapplication()
restarter = Restarter()
resample = not IS_WINDOWS
# Resampling SVG icon only on non-Windows platforms (see Issue 1314):
icon = ima.icon('spyder', resample=resample)
app.setWindowIcon(icon)

if PYQT5:
APP_ICON = QIcon(get_image_path("spyder.svg"))
else:
APP_ICON = QIcon(get_image_path("spyder.png"))
app.setWindowIcon(APP_ICON)
restarter.set_splash_message(_('Closing Spyder'))

# Get variables
Expand Down
7 changes: 6 additions & 1 deletion spyder/app/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ def main():
#==========================================================================
if CONF.get('main', 'high_dpi_custom_scale_factor'):
factors = str(CONF.get('main', 'high_dpi_custom_scale_factors'))
os.environ['QT_SCREEN_SCALE_FACTORS'] = factors
f = list(filter(None, factors.split(';')))
if len(f) == 1:
os.environ['QT_SCALE_FACTOR'] = f[0]
else:
os.environ['QT_SCREEN_SCALE_FACTORS'] = factors
else:
os.environ['QT_SCALE_FACTOR'] = ''
os.environ['QT_SCREEN_SCALE_FACTORS'] = ''

# Prevent Spyder from crashing in macOS if locale is not defined
Expand Down
Loading

0 comments on commit 972a18d

Please sign in to comment.