Show More
@@ -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 |
@@ -133,13 +133,9 b' def eval_formatter_no_slicing_check(f):' | |||||
133 |
|
133 | |||
134 | s = f.format('{stuff[slice(1,4)]}', **ns) |
|
134 | s = f.format('{stuff[slice(1,4)]}', **ns) | |
135 | nt.assert_equal(s, 'ell') |
|
135 | nt.assert_equal(s, 'ell') | |
136 |
|
136 | |||
137 | if sys.version_info >= (3, 4): |
|
137 | s = f.format("{a[:]}", a=[1, 2]) | |
138 | # String formatting has changed in Python 3.4, so this now works. |
|
138 | nt.assert_equal(s, "[1, 2]") | |
139 | s = f.format("{a[:]}", a=[1, 2]) |
|
|||
140 | nt.assert_equal(s, "[1, 2]") |
|
|||
141 | else: |
|
|||
142 | nt.assert_raises(SyntaxError, f.format, "{a[:]}") |
|
|||
143 |
|
139 | |||
144 | def test_eval_formatter(): |
|
140 | def test_eval_formatter(): | |
145 | f = text.EvalFormatter() |
|
141 | f = text.EvalFormatter() |
@@ -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. |
|
26 | **IPython 6.3** requires Python version 3.4 and above. | |
|
27 | ||||
|
28 | **IPython 6.0-6.2** 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 |
@@ -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. |
|
242 | Version 6.3+ supports Python 3.4 and higher. | |
|
243 | Versions 6.0 to 6.2 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. |
@@ -200,7 +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 |
':python_version |
|
203 | ':python_version == "3.4"': ['typing'], | |
204 | ':sys_platform != "win32"': ['pexpect'], |
|
204 | ':sys_platform != "win32"': ['pexpect'], | |
205 | ':sys_platform == "darwin"': ['appnope'], |
|
205 | ':sys_platform == "darwin"': ['appnope'], | |
206 | ':sys_platform == "win32"': ['colorama'], |
|
206 | ':sys_platform == "win32"': ['colorama'], |
General Comments 0
You need to be logged in to leave comments.
Login now