##// END OF EJS Templates
Merge pull request #10833 from takluyver/req-py34...
Matthias Bussonnier -
r24262:dda52389 merge
parent child Browse files
Show More
@@ -5,7 +5,6 b' python:'
5 - 3.6
5 - 3.6
6 - 3.5
6 - 3.5
7 - 3.4
7 - 3.4
8 - 3.3
9 sudo: false
8 sudo: false
10 env:
9 env:
11 global:
10 global:
@@ -27,12 +27,12 b' import sys'
27 #-----------------------------------------------------------------------------
27 #-----------------------------------------------------------------------------
28
28
29 # Don't forget to also update setup.py when this changes!
29 # Don't forget to also update setup.py when this changes!
30 if sys.version_info < (3,3):
30 if sys.version_info < (3,4):
31 raise ImportError(
31 raise ImportError(
32 """
32 """
33 IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.
33 IPython 7.0+ supports Python 3.4 and above.
34 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
34 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
35 Beginning with IPython 6.0, Python 3.3 and above is required.
35 Python 3.3 was supported up to IPython 6.x.
36
36
37 See IPython `README.rst` file for more information:
37 See IPython `README.rst` file for more information:
38
38
@@ -430,8 +430,5 b' def test_init_colors():'
430 def test_builtin_init():
430 def test_builtin_init():
431 info = inspector.info(list)
431 info = inspector.info(list)
432 init_def = info['init_definition']
432 init_def = info['init_definition']
433 # Python < 3.4 can't get init definition from builtins,
433 nt.assert_is_not_none(init_def)
434 # but still exercise the inspection in case of error-raising bugs.
435 if sys.version_info >= (3,4):
436 nt.assert_is_not_none(init_def)
437
434
@@ -109,47 +109,6 b' def loaded_api():'
109 def has_binding(api):
109 def has_binding(api):
110 """Safely check for PyQt4/5, PySide or PySide2, without importing submodules
110 """Safely check for PyQt4/5, PySide or PySide2, without importing submodules
111
111
112 Supports Python <= 3.3
113
114 Parameters
115 ----------
116 api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
117 Which module to check for
118
119 Returns
120 -------
121 True if the relevant module appears to be importable
122 """
123 # we can't import an incomplete pyside and pyqt4
124 # this will cause a crash in sip (#1431)
125 # check for complete presence before importing
126 module_name = api_to_module[api]
127
128 import imp
129 try:
130 #importing top level PyQt4/PySide module is ok...
131 mod = import_module(module_name)
132 #...importing submodules is not
133 imp.find_module('QtCore', mod.__path__)
134 imp.find_module('QtGui', mod.__path__)
135 imp.find_module('QtSvg', mod.__path__)
136 if api in (QT_API_PYQT5, QT_API_PYSIDE2):
137 # QT5 requires QtWidgets too
138 imp.find_module('QtWidgets', mod.__path__)
139
140 #we can also safely check PySide version
141 if api == QT_API_PYSIDE:
142 return check_version(mod.__version__, '1.0.3')
143 else:
144 return True
145 except ImportError:
146 return False
147
148 def has_binding_new(api):
149 """Safely check for PyQt4/5, PySide or PySide2, without importing submodules
150
151 Supports Python >= 3.4
152
153 Parameters
112 Parameters
154 ----------
113 ----------
155 api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
114 api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
@@ -185,8 +144,6 b' def has_binding_new(api):'
185
144
186 return True
145 return True
187
146
188 if sys.version_info >= (3, 4):
189 has_binding = has_binding_new
190
147
191 def qtapi_version():
148 def qtapi_version():
192 """Return which QString API has been set, if any
149 """Return which QString API has been set, if any
@@ -18,11 +18,7 b' import random'
18 import sys
18 import sys
19
19
20 import nose.tools as nt
20 import nose.tools as nt
21 try:
21 from pathlib import Path
22 from pathlib import Path
23 except ImportError:
24 # for Python 3.3
25 from pathlib2 import Path
26
22
27 from IPython.utils import text
23 from IPython.utils import text
28
24
@@ -137,13 +133,9 b' def eval_formatter_no_slicing_check(f):'
137
133
138 s = f.format('{stuff[slice(1,4)]}', **ns)
134 s = f.format('{stuff[slice(1,4)]}', **ns)
139 nt.assert_equal(s, 'ell')
135 nt.assert_equal(s, 'ell')
140
136
141 if sys.version_info >= (3, 4):
137 s = f.format("{a[:]}", a=[1, 2])
142 # String formatting has changed in Python 3.4, so this now works.
138 nt.assert_equal(s, "[1, 2]")
143 s = f.format("{a[:]}", a=[1, 2])
144 nt.assert_equal(s, "[1, 2]")
145 else:
146 nt.assert_raises(SyntaxError, f.format, "{a[:]}")
147
139
148 def test_eval_formatter():
140 def test_eval_formatter():
149 f = text.EvalFormatter()
141 f = text.EvalFormatter()
@@ -13,11 +13,7 b' import re'
13 import sys
13 import sys
14 import textwrap
14 import textwrap
15 from string import Formatter
15 from string import Formatter
16 try:
16 from pathlib import Path
17 from pathlib import Path
18 except ImportError:
19 # for Python 3.3
20 from pathlib2 import Path
21
17
22 from IPython.utils import py3compat
18 from IPython.utils import py3compat
23
19
@@ -23,7 +23,9 b' contribute to the project.'
23
23
24 **IPython versions and Python Support**
24 **IPython versions and Python Support**
25
25
26 **IPython 6** requires Python version 3.3 and above.
26 **IPython 7.0** requires Python version 3.4 and above.
27
28 **IPython 6.x** requires Python version 3.3 and above.
27
29
28 **IPython 5.x LTS** is the compatible release for Python 2.7.
30 **IPython 5.x LTS** is the compatible release for Python 2.7.
29 If you require Python 2 support, you **must** use IPython 5.x LTS. Please
31 If you require Python 2 support, you **must** use IPython 5.x LTS. Please
@@ -8,8 +8,8 b' environment:'
8 PYTHON_VERSION: "3.6.x"
8 PYTHON_VERSION: "3.6.x"
9 PYTHON_ARCH: "32"
9 PYTHON_ARCH: "32"
10
10
11 - PYTHON: "C:\\Python33-x64"
11 - PYTHON: "C:\\Python34-x64"
12 PYTHON_VERSION: "3.3.x"
12 PYTHON_VERSION: "3.4.x"
13 PYTHON_ARCH: "64"
13 PYTHON_ARCH: "64"
14
14
15 - PYTHON: "C:\\Python36-x64"
15 - PYTHON: "C:\\Python36-x64"
@@ -217,29 +217,30 b' running, use the ``%connect_info`` magic to get the unique connection file,'
217 which will be something like ``--existing kernel-19732.json`` but with
217 which will be something like ``--existing kernel-19732.json`` but with
218 different numbers which correspond to the Process ID of the kernel.
218 different numbers which correspond to the Process ID of the kernel.
219
219
220 You can read more about using `jupyter qtconsole
220 You can read more about using `jupyter qtconsole
221 <http://jupyter.org/qtconsole/>`_, and
221 <http://jupyter.org/qtconsole/>`_, and
222 `jupyter notebook <http://jupyter-notebook.readthedocs.io/en/latest/>`_. There
222 `jupyter notebook <http://jupyter-notebook.readthedocs.io/en/latest/>`_. There
223 is also a :ref:`message spec <messaging>` which documents the protocol for
223 is also a :ref:`message spec <messaging>` which documents the protocol for
224 communication between kernels
224 communication between kernels
225 and clients.
225 and clients.
226
226
227 .. seealso::
227 .. seealso::
228
228
229 `Frontend/Kernel Model`_ example notebook
229 `Frontend/Kernel Model`_ example notebook
230
230
231
231
232 Interactive parallel computing
232 Interactive parallel computing
233 ==============================
233 ==============================
234
234
235
235
236 This functionality is optional and now part of the `ipyparallel
236 This functionality is optional and now part of the `ipyparallel
237 <http://ipyparallel.readthedocs.io/>`_ project.
237 <http://ipyparallel.readthedocs.io/>`_ project.
238
238
239 Portability and Python requirements
239 Portability and Python requirements
240 -----------------------------------
240 -----------------------------------
241
241
242 Version 6.0+ supports compatibility with Python 3.3 and higher.
242 Version 7.0+ supports Python 3.4 and higher.
243 Versions 6.x support Python 3.3 and higher.
243 Versions 2.0 to 5.x work with Python 2.7.x releases and Python 3.3 and higher.
244 Versions 2.0 to 5.x work with Python 2.7.x releases and Python 3.3 and higher.
244 Version 1.0 additionally worked with Python 2.6 and 3.2.
245 Version 1.0 additionally worked with Python 2.6 and 3.2.
245 Version 0.12 was the first version to fully support Python 3.
246 Version 0.12 was the first version to fully support Python 3.
@@ -26,7 +26,7 b' import sys'
26 #
26 #
27 # This check is also made in IPython/__init__, don't forget to update both when
27 # This check is also made in IPython/__init__, don't forget to update both when
28 # changing Python version requirements.
28 # changing Python version requirements.
29 if sys.version_info < (3, 3):
29 if sys.version_info < (3, 4):
30 pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.'
30 pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.'
31 try:
31 try:
32 import pip
32 import pip
@@ -42,9 +42,9 b' if sys.version_info < (3, 3):'
42
42
43
43
44 error = """
44 error = """
45 IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.
45 IPython 7.0+ supports Python 3.4 and above.
46 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
46 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
47 Beginning with IPython 6.0, Python 3.3 and above is required.
47 Python 3.3 was supported up to IPython 6.x.
48
48
49 See IPython `README.rst` file for more information:
49 See IPython `README.rst` file for more information:
50
50
@@ -175,7 +175,7 b' extras_require = dict('
175 parallel = ['ipyparallel'],
175 parallel = ['ipyparallel'],
176 qtconsole = ['qtconsole'],
176 qtconsole = ['qtconsole'],
177 doc = ['Sphinx>=1.3'],
177 doc = ['Sphinx>=1.3'],
178 test = ['nose>=0.10.1', 'requests', 'testpath', 'pygments', 'nbformat', 'ipykernel'],
178 test = ['nose>=0.10.1', 'requests', 'testpath', 'pygments', 'nbformat', 'ipykernel', 'numpy'],
179 terminal = [],
179 terminal = [],
180 kernel = ['ipykernel'],
180 kernel = ['ipykernel'],
181 nbformat = ['nbformat'],
181 nbformat = ['nbformat'],
@@ -200,9 +200,7 b' install_requires = ['
200 # but requires pip >= 6. pip < 6 ignores these.
200 # but requires pip >= 6. pip < 6 ignores these.
201
201
202 extras_require.update({
202 extras_require.update({
203 'test:python_version >= "3.4"': ['numpy'],
203 ':python_version == "3.4"': ['typing'],
204 ':python_version == "3.3"': ['pathlib2'],
205 ':python_version <= "3.4"': ['typing'],
206 ':sys_platform != "win32"': ['pexpect'],
204 ':sys_platform != "win32"': ['pexpect'],
207 ':sys_platform == "darwin"': ['appnope'],
205 ':sys_platform == "darwin"': ['appnope'],
208 ':sys_platform == "win32"': ['colorama'],
206 ':sys_platform == "win32"': ['colorama'],
@@ -232,7 +230,7 b' for key, deps in extras_require.items():'
232 extras_require['all'] = everything
230 extras_require['all'] = everything
233
231
234 if 'setuptools' in sys.modules:
232 if 'setuptools' in sys.modules:
235 setuptools_extra_args['python_requires'] = '>=3.3'
233 setuptools_extra_args['python_requires'] = '>=3.4'
236 setuptools_extra_args['zip_safe'] = False
234 setuptools_extra_args['zip_safe'] = False
237 setuptools_extra_args['entry_points'] = {
235 setuptools_extra_args['entry_points'] = {
238 'console_scripts': find_entry_points(),
236 'console_scripts': find_entry_points(),
General Comments 0
You need to be logged in to leave comments. Login now