diff --git a/.travis.yml b/.travis.yml index 47d42d6..ebd880a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,30 +5,12 @@ python: - 3.5 - 3.4 - 3.3 - - 2.7 - - pypy sudo: false before_install: - git clone --quiet --depth 1 https://github.com/minrk/travis-wheels travis-wheels - 'if [[ $GROUP != js* ]]; then COVERAGE=""; fi' install: - pip install "setuptools>=18.5" - # Installs PyPy (+ its Numpy). Based on @frol comment at: - # https://github.com/travis-ci/travis-ci/issues/5027 - - | - if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then - export PYENV_ROOT="$HOME/.pyenv" - if [ -f "$PYENV_ROOT/bin/pyenv" ]; then - cd "$PYENV_ROOT" && git pull - else - rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT" - fi - export PYPY_VERSION="5.3.1" - "$PYENV_ROOT/bin/pyenv" install "pypy-$PYPY_VERSION" - virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION" - source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate" - pip install https://bitbucket.org/pypy/numpy/get/master.zip - fi - pip install -f travis-wheels/wheelhouse -e file://$PWD#egg=ipython[test] - pip install codecov script: @@ -41,4 +23,3 @@ after_success: matrix: allow_failures: - python: nightly - - python: pypy diff --git a/IPython/__init__.py b/IPython/__init__.py index 9b450da..6bb5ba7 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -30,8 +30,8 @@ import warnings # Don't forget to also update setup.py when this changes! v = sys.version_info -if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)): - raise ImportError('IPython requires Python version 2.7 or 3.3 or above.') +if v[:2] < (3,3): + raise ImportError('IPython requires Python version 3.3 or above.') del v # Make it easy to import extensions - they are always directly on pythonpath. diff --git a/IPython/core/magics/basic.py b/IPython/core/magics/basic.py index 4767724..781fa72 100644 --- a/IPython/core/magics/basic.py +++ b/IPython/core/magics/basic.py @@ -3,6 +3,7 @@ from __future__ import print_function from __future__ import absolute_import +import argparse import io import sys from pprint import pformat @@ -548,11 +549,7 @@ Currently the magic system has the following functions:""", @magic_arguments.magic_arguments() @magic_arguments.argument( '-e', '--export', action='store_true', default=False, - help='Export IPython history as a notebook. The filename argument ' - 'is used to specify the notebook name and format. For example ' - 'a filename of notebook.ipynb will result in a notebook name ' - 'of "notebook" and a format of "json". Likewise using a ".py" ' - 'file extension will write the notebook as a Python script' + help=argparse.SUPPRESS ) @magic_arguments.argument( 'filename', type=unicode_type, @@ -563,22 +560,24 @@ Currently the magic system has the following functions:""", """Export and convert IPython notebooks. This function can export the current IPython history to a notebook file. - For example, to export the history to "foo.ipynb" do "%notebook -e foo.ipynb". - To export the history to "foo.py" do "%notebook -e foo.py". + For example, to export the history to "foo.ipynb" do "%notebook foo.ipynb". + + The -e or --export flag is deprecated in IPython 5.2, and will be + removed in the future. """ args = magic_arguments.parse_argstring(self.notebook, s) from nbformat import write, v4 - if args.export: - cells = [] - hist = list(self.shell.history_manager.get_range()) - if(len(hist)<=1): - raise ValueError('History is empty, cannot export') - for session, execution_count, source in hist[:-1]: - cells.append(v4.new_code_cell( - execution_count=execution_count, - source=source - )) - nb = v4.new_notebook(cells=cells) - with io.open(args.filename, 'w', encoding='utf-8') as f: - write(nb, f, version=4) + + cells = [] + hist = list(self.shell.history_manager.get_range()) + if(len(hist)<=1): + raise ValueError('History is empty, cannot export') + for session, execution_count, source in hist[:-1]: + cells.append(v4.new_code_cell( + execution_count=execution_count, + source=source + )) + nb = v4.new_notebook(cells=cells) + with io.open(args.filename, 'w', encoding='utf-8') as f: + write(nb, f, version=4) diff --git a/IPython/core/release.py b/IPython/core/release.py index 9df73c2..577e71b 100644 --- a/IPython/core/release.py +++ b/IPython/core/release.py @@ -19,12 +19,12 @@ name = 'ipython' # IPython version information. An empty _version_extra corresponds to a full # release. 'dev' as a _version_extra string means this is a development # version -_version_major = 5 -_version_minor = 1 +_version_major = 6 +_version_minor = 0 _version_patch = 0 _version_extra = '.dev' # _version_extra = 'rc1' -#_version_extra = '' # Uncomment this for full releases +# _version_extra = '' # Uncomment this for full releases # release.codename is deprecated in 2.0, will be removed in 3.0 codename = '' @@ -116,8 +116,6 @@ classifiers = [ 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: System :: Shells' ] diff --git a/README.rst b/README.rst index f50965a..d821ae5 100644 --- a/README.rst +++ b/README.rst @@ -22,8 +22,8 @@ Welcome to IPython. Our full documentation is available on `ipython.readthedocs `_ and contain information on how to install, use contribute to the project. -Officially, IPython requires Python version 2.7, or 3.3 and above. -IPython 1.x is the last IPython version to support Python 2.6 and 3.2. +Officially, IPython requires Python version 3.3 and above. +IPython 5.x is the last IPython version to support Python 2.7. The Notebook, Qt console and a number of other pieces are now parts of *Jupyter*. See the `Jupyter installation docs `__ diff --git a/docs/source/config/integrating.rst b/docs/source/config/integrating.rst index 3630ae8..d1ae9d3 100644 --- a/docs/source/config/integrating.rst +++ b/docs/source/config/integrating.rst @@ -43,10 +43,12 @@ For example:: Custom exception tracebacks =========================== -Rarely, you might want to display a different traceback with an exception - -IPython's own parallel computing framework does this to display errors from the -engines. To do this, define a ``_render_traceback_(self)`` method which returns -a list of strings, each containing one line of the traceback. +Rarely, you might want to display a custom traceback when reporting an +exception. To do this, define the custom traceback using +`_render_traceback_(self)` method which returns a list of strings, one string +for each line of the traceback. For example, the `ipyparallel +`__ a parallel computing framework for +IPython, does this to display errors from multiple engines. Please be conservative in using this feature; by replacing the default traceback you may hide important information from the user. diff --git a/docs/source/coredev/release_process.rst b/docs/source/coredev/release_process.rst index feec4f8..16b8e6a 100644 --- a/docs/source/coredev/release_process.rst +++ b/docs/source/coredev/release_process.rst @@ -176,8 +176,10 @@ Run the ``release`` script, this step requires having a current wheel, Python ./tools/release This makes the tarballs, zipfiles, and wheels, and put them under the ``dist/`` -folder. Be sure to test the ``wheel`` and the ``sdist`` locally before uploading -them to PyPI. +folder. Be sure to test the ``wheels`` and the ``sdist`` locally before +uploading them to PyPI. We do not use an universal wheel as each wheel +installs an ``ipython2`` or ``ipython3`` script, depending on the version of +Python it is built for. Using an universal wheel would prevent this. Use the following to actually upload the result of the build:: diff --git a/docs/source/development/config.rst b/docs/source/development/config.rst index c460e8d..32c341e 100644 --- a/docs/source/development/config.rst +++ b/docs/source/development/config.rst @@ -41,20 +41,17 @@ The next thing you need to know is what to call your configuration file. The basic idea is that each application has its own default configuration filename. The default named used by the :command:`ipython` command line program is :file:`ipython_config.py`, and *all* IPython applications will use this file. -Other applications, such as the parallel :command:`ipcluster` scripts or the -QtConsole will load their own config files *after* :file:`ipython_config.py`. To -load a particular configuration file instead of the default, the name can be -overridden by the ``config_file`` command line flag. +The IPython kernel will load its own config file *after* +:file:`ipython_config.py`. To load a particular configuration file instead of +the default, the name can be overridden by the ``config_file`` command line +flag. To generate the default configuration files, do:: $ ipython profile create and you will have a default :file:`ipython_config.py` in your IPython directory -under :file:`profile_default`. If you want the default config files for the -:mod:`IPython.parallel` applications, add ``--parallel`` to the end of the -command-line args. - +under :file:`profile_default`. .. note:: IPython configuration options are case sensitive, and IPython cannot diff --git a/docs/source/install/install.rst b/docs/source/install/install.rst index eb6db45..c2fe2f9 100644 --- a/docs/source/install/install.rst +++ b/docs/source/install/install.rst @@ -4,7 +4,7 @@ Installing IPython ================== -IPython requires Python 2.7 or ≥ 3.3. +IPython 6 requires Python ≥ 3.3. IPython 5.x can be installed on Python 2. Quick Install diff --git a/docs/source/overview.rst b/docs/source/overview.rst index 55c54ee..ff39e16 100644 --- a/docs/source/overview.rst +++ b/docs/source/overview.rst @@ -232,50 +232,9 @@ and clients. Interactive parallel computing ============================== -.. note:: - This functionality is optional and now part of the `ipyparallel - `_ project. - -Increasingly, parallel computer hardware, such as multicore CPUs, clusters and -supercomputers, is becoming ubiquitous. Over the last several years, we have -developed an architecture within IPython that allows such hardware to be used -quickly and easily from Python. Moreover, this architecture is designed to -support interactive and collaborative parallel computing. - -The main features of this system are: - -* Quickly parallelize Python code from an interactive Python/IPython session. - -* A flexible and dynamic process model that be deployed on anything from - multicore workstations to supercomputers. - -* An architecture that supports many different styles of parallelism, from - message passing to task farming. And all of these styles can be handled - interactively. - -* Both blocking and fully asynchronous interfaces. - -* High level APIs that enable many things to be parallelized in a few lines - of code. - -* Write parallel code that will run unchanged on everything from multicore - workstations to supercomputers. - -* Full integration with Message Passing libraries (MPI). - -* Capabilities based security model with full encryption of network connections. - -* Share live parallel jobs with other users securely. We call this - collaborative parallel computing. - -* Dynamically load balanced task farming system. - -* Robust error handling. Python exceptions raised in parallel execution are - gathered and presented to the top-level code. - -For more information, see our :ref:`overview ` of using IPython -for parallel computing. +This functionality is optional and now part of the `ipyparallel +`_ project. Portability and Python requirements ----------------------------------- diff --git a/docs/source/whatsnew/github-stats-5.rst b/docs/source/whatsnew/github-stats-5.rst index 217bac5..fbd9b28 100644 --- a/docs/source/whatsnew/github-stats-5.rst +++ b/docs/source/whatsnew/github-stats-5.rst @@ -3,6 +3,36 @@ Issues closed in the 5.x development cycle ========================================== +Issues closed in 5.1 +-------------------- + +GitHub stats for 2016/07/08 - 2016/08/13 (tag: 5.0.0) + +These lists are automatically generated, and may be incomplete or contain duplicates. + +We closed 33 issues and merged 43 pull requests. +The full list can be seen `on GitHub `__ + +The following 17 authors contributed 129 commits. + +* Antony Lee +* Benjamin Ragan-Kelley +* Carol Willing +* Danilo J. S. Bellini +* 小明 (`dongweiming `__) +* Fernando Perez +* Gavin Cooper +* Gil Forsyth +* Jacob Niehus +* Julian Kuhlmann +* Matthias Bussonnier +* Michael Pacer +* Nik Nyby +* Pavol Juhas +* Luke Deen Taylor +* Thomas Kluyver +* Tamir Bahar + Issues closed in 5.0 -------------------- diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3c6e79c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/setup.py b/setup.py index d23d5eb..f03db18 100755 --- a/setup.py +++ b/setup.py @@ -27,8 +27,8 @@ import sys # This check is also made in IPython/__init__, don't forget to update both when # changing Python version requirements. v = sys.version_info -if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)): - error = "ERROR: IPython requires Python version 2.7 or 3.3 or above." +if v[:2] < (3,3): + error = "ERROR: IPython requires Python version 3.3 or above." print(error, file=sys.stderr) sys.exit(1) @@ -239,6 +239,7 @@ for key, deps in extras_require.items(): extras_require['all'] = everything if 'setuptools' in sys.modules: + setuptools_extra_args['python_requires'] = '>=3.3' setuptools_extra_args['zip_safe'] = False setuptools_extra_args['entry_points'] = { 'console_scripts': find_entry_points(), diff --git a/tools/toollib.py b/tools/toollib.py index aeb0223..3743905 100644 --- a/tools/toollib.py +++ b/tools/toollib.py @@ -21,7 +21,7 @@ archive = '%s:%s' % (archive_user, archive_dir) sdists = './setup.py sdist --formats=gztar,zip' # Binary dists def buildwheels(): - sh('python setupegg.py bdist_wheel') + sh('python3 setupegg.py bdist_wheel' % py) # Utility functions def sh(cmd):