From 01562d6cc5bcee64a34b0a1eb7c58aff4419b041 2016-08-15 12:07:12 From: Thomas Kluyver Date: 2016-08-15 12:07:12 Subject: [PATCH] More changes to indicate Python 3 requirement --- 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/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/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/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 ad71bd0..3743905 100644 --- a/tools/toollib.py +++ b/tools/toollib.py @@ -21,8 +21,7 @@ archive = '%s:%s' % (archive_user, archive_dir) sdists = './setup.py sdist --formats=gztar,zip' # Binary dists def buildwheels(): - for py in ('2', '3'): - sh('python%s setupegg.py bdist_wheel' % py) + sh('python3 setupegg.py bdist_wheel' % py) # Utility functions def sh(cmd):