##// END OF EJS Templates
Release IPython 6.0.0rc1
Matthias Bussonnier -
Show More
@@ -1,118 +1,118 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Release data for the IPython project."""
2 """Release data for the IPython project."""
3
3
4 #-----------------------------------------------------------------------------
4 #-----------------------------------------------------------------------------
5 # Copyright (c) 2008, IPython Development Team.
5 # Copyright (c) 2008, IPython Development Team.
6 # Copyright (c) 2001, Fernando Perez <fernando.perez@colorado.edu>
6 # Copyright (c) 2001, Fernando Perez <fernando.perez@colorado.edu>
7 # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
7 # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
8 # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
8 # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
9 #
9 #
10 # Distributed under the terms of the Modified BSD License.
10 # Distributed under the terms of the Modified BSD License.
11 #
11 #
12 # The full license is in the file COPYING.txt, distributed with this software.
12 # The full license is in the file COPYING.txt, distributed with this software.
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14
14
15 # Name of the package for release purposes. This is the name which labels
15 # Name of the package for release purposes. This is the name which labels
16 # the tarballs and RPMs made by distutils, so it's best to lowercase it.
16 # the tarballs and RPMs made by distutils, so it's best to lowercase it.
17 name = 'ipython'
17 name = 'ipython'
18
18
19 # IPython version information. An empty _version_extra corresponds to a full
19 # IPython version information. An empty _version_extra corresponds to a full
20 # release. 'dev' as a _version_extra string means this is a development
20 # release. 'dev' as a _version_extra string means this is a development
21 # version
21 # version
22 _version_major = 6
22 _version_major = 6
23 _version_minor = 0
23 _version_minor = 0
24 _version_patch = 0
24 _version_patch = 0
25 _version_extra = '.dev'
25 _version_extra = '.dev'
26 # _version_extra = 'rc1'
26 _version_extra = 'rc1'
27 # _version_extra = '' # Uncomment this for full releases
27 # _version_extra = '' # Uncomment this for full releases
28
28
29 # Construct full version string from these.
29 # Construct full version string from these.
30 _ver = [_version_major, _version_minor, _version_patch]
30 _ver = [_version_major, _version_minor, _version_patch]
31
31
32 __version__ = '.'.join(map(str, _ver))
32 __version__ = '.'.join(map(str, _ver))
33 if _version_extra:
33 if _version_extra:
34 __version__ = __version__ + _version_extra
34 __version__ = __version__ + _version_extra
35
35
36 version = __version__ # backwards compatibility name
36 version = __version__ # backwards compatibility name
37 version_info = (_version_major, _version_minor, _version_patch, _version_extra)
37 version_info = (_version_major, _version_minor, _version_patch, _version_extra)
38
38
39 # Change this when incrementing the kernel protocol version
39 # Change this when incrementing the kernel protocol version
40 kernel_protocol_version_info = (5, 0)
40 kernel_protocol_version_info = (5, 0)
41 kernel_protocol_version = "%i.%i" % kernel_protocol_version_info
41 kernel_protocol_version = "%i.%i" % kernel_protocol_version_info
42
42
43 description = "IPython: Productive Interactive Computing"
43 description = "IPython: Productive Interactive Computing"
44
44
45 long_description = \
45 long_description = \
46 """
46 """
47 IPython provides a rich toolkit to help you make the most out of using Python
47 IPython provides a rich toolkit to help you make the most out of using Python
48 interactively. Its main components are:
48 interactively. Its main components are:
49
49
50 * A powerful interactive Python shell
50 * A powerful interactive Python shell
51 * A `Jupyter <http://jupyter.org/>`_ kernel to work with Python code in Jupyter
51 * A `Jupyter <http://jupyter.org/>`_ kernel to work with Python code in Jupyter
52 notebooks and other interactive frontends.
52 notebooks and other interactive frontends.
53
53
54 The enhanced interactive Python shells have the following main features:
54 The enhanced interactive Python shells have the following main features:
55
55
56 * Comprehensive object introspection.
56 * Comprehensive object introspection.
57
57
58 * Input history, persistent across sessions.
58 * Input history, persistent across sessions.
59
59
60 * Caching of output results during a session with automatically generated
60 * Caching of output results during a session with automatically generated
61 references.
61 references.
62
62
63 * Extensible tab completion, with support by default for completion of python
63 * Extensible tab completion, with support by default for completion of python
64 variables and keywords, filenames and function keywords.
64 variables and keywords, filenames and function keywords.
65
65
66 * Extensible system of 'magic' commands for controlling the environment and
66 * Extensible system of 'magic' commands for controlling the environment and
67 performing many tasks related either to IPython or the operating system.
67 performing many tasks related either to IPython or the operating system.
68
68
69 * A rich configuration system with easy switching between different setups
69 * A rich configuration system with easy switching between different setups
70 (simpler than changing $PYTHONSTARTUP environment variables every time).
70 (simpler than changing $PYTHONSTARTUP environment variables every time).
71
71
72 * Session logging and reloading.
72 * Session logging and reloading.
73
73
74 * Extensible syntax processing for special purpose situations.
74 * Extensible syntax processing for special purpose situations.
75
75
76 * Access to the system shell with user-extensible alias system.
76 * Access to the system shell with user-extensible alias system.
77
77
78 * Easily embeddable in other Python programs and GUIs.
78 * Easily embeddable in other Python programs and GUIs.
79
79
80 * Integrated access to the pdb debugger and the Python profiler.
80 * Integrated access to the pdb debugger and the Python profiler.
81
81
82 The latest development version is always available from IPython's `GitHub
82 The latest development version is always available from IPython's `GitHub
83 site <http://github.com/ipython>`_.
83 site <http://github.com/ipython>`_.
84 """
84 """
85
85
86 license = 'BSD'
86 license = 'BSD'
87
87
88 authors = {'Fernando' : ('Fernando Perez','fperez.net@gmail.com'),
88 authors = {'Fernando' : ('Fernando Perez','fperez.net@gmail.com'),
89 'Janko' : ('Janko Hauser','jhauser@zscout.de'),
89 'Janko' : ('Janko Hauser','jhauser@zscout.de'),
90 'Nathan' : ('Nathaniel Gray','n8gray@caltech.edu'),
90 'Nathan' : ('Nathaniel Gray','n8gray@caltech.edu'),
91 'Ville' : ('Ville Vainio','vivainio@gmail.com'),
91 'Ville' : ('Ville Vainio','vivainio@gmail.com'),
92 'Brian' : ('Brian E Granger', 'ellisonbg@gmail.com'),
92 'Brian' : ('Brian E Granger', 'ellisonbg@gmail.com'),
93 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com'),
93 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com'),
94 'Thomas' : ('Thomas A. Kluyver', 'takowl@gmail.com'),
94 'Thomas' : ('Thomas A. Kluyver', 'takowl@gmail.com'),
95 'Jorgen' : ('Jorgen Stenarson', 'jorgen.stenarson@bostream.nu'),
95 'Jorgen' : ('Jorgen Stenarson', 'jorgen.stenarson@bostream.nu'),
96 'Matthias' : ('Matthias Bussonnier', 'bussonniermatthias@gmail.com'),
96 'Matthias' : ('Matthias Bussonnier', 'bussonniermatthias@gmail.com'),
97 }
97 }
98
98
99 author = 'The IPython Development Team'
99 author = 'The IPython Development Team'
100
100
101 author_email = 'ipython-dev@python.org'
101 author_email = 'ipython-dev@python.org'
102
102
103 url = 'https://ipython.org'
103 url = 'https://ipython.org'
104
104
105
105
106 platforms = ['Linux','Mac OSX','Windows']
106 platforms = ['Linux','Mac OSX','Windows']
107
107
108 keywords = ['Interactive','Interpreter','Shell', 'Embedding']
108 keywords = ['Interactive','Interpreter','Shell', 'Embedding']
109
109
110 classifiers = [
110 classifiers = [
111 'Framework :: IPython',
111 'Framework :: IPython',
112 'Intended Audience :: Developers',
112 'Intended Audience :: Developers',
113 'Intended Audience :: Science/Research',
113 'Intended Audience :: Science/Research',
114 'License :: OSI Approved :: BSD License',
114 'License :: OSI Approved :: BSD License',
115 'Programming Language :: Python',
115 'Programming Language :: Python',
116 'Programming Language :: Python :: 3',
116 'Programming Language :: Python :: 3',
117 'Topic :: System :: Shells'
117 'Topic :: System :: Shells'
118 ]
118 ]
@@ -1,202 +1,190 b''
1 =====================
2 Development version
3 =====================
4
5 This document describes in-flight development work.
6
7 .. warning::
8
9 Please do not edit this file by hand (doing so will likely cause merge
10 conflicts for other Pull Requests). Instead, create a new file in the
11 `docs/source/whatsnew/pr` folder
12
13 IPython 6.0
1 IPython 6.0
14 ===========
2 ===========
15
3
16 Released .... ...., 2017
4 Released .... ...., 2017
17
5
18 IPython 6 feature a major improvement in the completion machinery which is now
6 IPython 6 feature a major improvement in the completion machinery which is now
19 capable of completing non-executed code. It is also the first version of IPython
7 capable of completing non-executed code. It is also the first version of IPython
20 to stop compatibility with Python 2, which is still supported on the bugfix only
8 to stop compatibility with Python 2, which is still supported on the bugfix only
21 5.x branch. Read below to have a non-exhaustive list of new features.
9 5.x branch. Read below to have a non-exhaustive list of new features.
22
10
23 Make sure you have pip > 9.0 before upgrading.
11 Make sure you have pip > 9.0 before upgrading.
24 You should be able to update by using:
12 You should be able to update by using:
25
13
26 .. code::
14 .. code::
27
15
28 pip install ipython --upgrade
16 pip install ipython --upgrade
29
17
30
18
31 .. note::
19 .. note::
32
20
33 If your pip version is greater of equal to pip 9.0.1 you will automatically get
21 If your pip version is greater of equal to pip 9.0.1 you will automatically get
34 the most recent version of IPython compatible with your system. THat is to day
22 the most recent version of IPython compatible with your system. THat is to day
35 on Python 2 you will get the latest IPython 5.x bugfix, while in Python 3
23 on Python 2 you will get the latest IPython 5.x bugfix, while in Python 3
36 you will get the latest 6.x stable version.
24 you will get the latest 6.x stable version.
37
25
38 New completion API and Interface
26 New completion API and Interface
39 --------------------------------
27 --------------------------------
40
28
41 The completer Completion API has seen an overhaul, and the new completer have
29 The completer Completion API has seen an overhaul, and the new completer have
42 plenty of improvement both from the end users of terminal IPython or for
30 plenty of improvement both from the end users of terminal IPython or for
43 consumers of the API.
31 consumers of the API.
44
32
45 This new API is capable of pulling completions from :any:`jedi`, thus allowing
33 This new API is capable of pulling completions from :any:`jedi`, thus allowing
46 type inference on non-executed code. If :any:`jedi` is installed completion like
34 type inference on non-executed code. If :any:`jedi` is installed completion like
47 the following are now becoming possible without code evaluation:
35 the following are now becoming possible without code evaluation:
48
36
49 >>> data = ['Number of users', 123_456]
37 >>> data = ['Number of users', 123_456]
50 ... data[0].<tab>
38 ... data[0].<tab>
51
39
52 That is to say, IPython is now capable of inferring that `data[0]` is a string,
40 That is to say, IPython is now capable of inferring that `data[0]` is a string,
53 and will suggest completions like `.capitalize`. The completion power of IPython
41 and will suggest completions like `.capitalize`. The completion power of IPython
54 will increase with new Jedi releases, and a number of bugs and more completions
42 will increase with new Jedi releases, and a number of bugs and more completions
55 are already available on development version of :any:`jedi` if you are curious.
43 are already available on development version of :any:`jedi` if you are curious.
56
44
57 With the help of prompt toolkit, types of completions can be shown in the
45 With the help of prompt toolkit, types of completions can be shown in the
58 completer interface:
46 completer interface:
59
47
60 .. image:: ../_images/jedi_type_inference_60.png
48 .. image:: ../_images/jedi_type_inference_60.png
61 :alt: Jedi showing ability to do type inference
49 :alt: Jedi showing ability to do type inference
62 :align: center
50 :align: center
63 :width: 400px
51 :width: 400px
64 :target: ../_images/jedi_type_inference_60.png
52 :target: ../_images/jedi_type_inference_60.png
65
53
66 The appearance of the completer is controlled by the
54 The appearance of the completer is controlled by the
67 ``c.TerminalInteractiveShell.display_completions`` option that will show the
55 ``c.TerminalInteractiveShell.display_completions`` option that will show the
68 type differently depending on the value among ``'column'``, ``'multicolumn'``
56 type differently depending on the value among ``'column'``, ``'multicolumn'``
69 and ``'readlinelike'``
57 and ``'readlinelike'``
70
58
71 The use of Jedi also full fill a number of request and fix a number of bugs
59 The use of Jedi also full fill a number of request and fix a number of bugs
72 like case insensitive completion, completion after division operator: See
60 like case insensitive completion, completion after division operator: See
73 :ghpull:`10182`.
61 :ghpull:`10182`.
74
62
75 Extra patches and updates will be needed to the :mod:`ipykernel` package for
63 Extra patches and updates will be needed to the :mod:`ipykernel` package for
76 this feature to be available to other clients like jupyter Notebook, Lab,
64 this feature to be available to other clients like jupyter Notebook, Lab,
77 Nteract, Hydrogen...
65 Nteract, Hydrogen...
78
66
79 The use of Jedi can is barely noticeable on recent enough machines, but can be
67 The use of Jedi can is barely noticeable on recent enough machines, but can be
80 feel on older ones, in cases were Jedi behavior need to be adjusted, the amount
68 feel on older ones, in cases were Jedi behavior need to be adjusted, the amount
81 of time given to Jedi to compute type inference can be adjusted with
69 of time given to Jedi to compute type inference can be adjusted with
82 ``c.IPCompleter.jedi_compute_type_timeout``, with object whose type were not
70 ``c.IPCompleter.jedi_compute_type_timeout``, with object whose type were not
83 inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
71 inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
84 by using the ``c.Completer.use_jedi=False`` option.
72 by using the ``c.Completer.use_jedi=False`` option.
85
73
86
74
87 The old ``Completer.complete()`` API is waiting deprecation and should be
75 The old ``Completer.complete()`` API is waiting deprecation and should be
88 replaced replaced by ``Completer.completions()`` in a near future. Feedback on
76 replaced replaced by ``Completer.completions()`` in a near future. Feedback on
89 the current state of the API and suggestions welcome.
77 the current state of the API and suggestions welcome.
90
78
91 Python 3 only codebase
79 Python 3 only codebase
92 ----------------------
80 ----------------------
93
81
94 One of the large challenges in IPython 6.0 has been the adoption of a pure
82 One of the large challenges in IPython 6.0 has been the adoption of a pure
95 Python 3 code base, which lead us to great length to upstream patches in pip,
83 Python 3 code base, which lead us to great length to upstream patches in pip,
96 pypi and warehouse to make sure Python 2 system still upgrade to the latest
84 pypi and warehouse to make sure Python 2 system still upgrade to the latest
97 compatible Python version compatible.
85 compatible Python version compatible.
98
86
99 We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
87 We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
100 still maintained and get regular releases. Using pip 9+, upgrading IPython will
88 still maintained and get regular releases. Using pip 9+, upgrading IPython will
101 automatically upgrade to the latest version compatible with your system.
89 automatically upgrade to the latest version compatible with your system.
102
90
103 .. warning::
91 .. warning::
104
92
105 If you are on a system using an older verison of pip on Python 2, pip may
93 If you are on a system using an older verison of pip on Python 2, pip may
106 still install IPython 6.0 on your system, and IPython will refuse to start.
94 still install IPython 6.0 on your system, and IPython will refuse to start.
107 You can fix this by ugrading pip, and reinstalling ipython, or forcing pip to
95 You can fix this by ugrading pip, and reinstalling ipython, or forcing pip to
108 install an earlier version: ``pip install 'ipython<6'``
96 install an earlier version: ``pip install 'ipython<6'``
109
97
110 The ability to use only Python 3 on the code base of IPython has bring a number
98 The ability to use only Python 3 on the code base of IPython has bring a number
111 of advantage. Most of the newly written code make use of `optional function type
99 of advantage. Most of the newly written code make use of `optional function type
112 anotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
100 anotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
113 and better documentation.
101 and better documentation.
114
102
115 The total size of the repository has also for a first time between releases
103 The total size of the repository has also for a first time between releases
116 (excluding the big split for 4.0) decreased by about 1500 lines, potentially
104 (excluding the big split for 4.0) decreased by about 1500 lines, potentially
117 quite a bit more codewide as some documents like this one are append only and
105 quite a bit more codewide as some documents like this one are append only and
118 are about 300 lines long.
106 are about 300 lines long.
119
107
120 The removal as of Python2/Python3 shim layer has made the code quite clearer and
108 The removal as of Python2/Python3 shim layer has made the code quite clearer and
121 more idiomatic in a number of location, and much friendlier to work with and
109 more idiomatic in a number of location, and much friendlier to work with and
122 understand. We hope to further embrace Python 3 capability in the next release
110 understand. We hope to further embrace Python 3 capability in the next release
123 cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
111 cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
124 general unpacking) in the code base of IPython, and see if we can take advantage
112 general unpacking) in the code base of IPython, and see if we can take advantage
125 of these as well to improve user experience with better error messages and
113 of these as well to improve user experience with better error messages and
126 hints.
114 hints.
127
115
128
116
129 Configurable TerminalInteractiveShell, readline interface
117 Configurable TerminalInteractiveShell, readline interface
130 ---------------------------------------------------------
118 ---------------------------------------------------------
131
119
132 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
120 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
133 that allow to customize the class used to start the terminal frontend. This
121 that allow to customize the class used to start the terminal frontend. This
134 should allow user to use custom interfaces, like reviving the former readline
122 should allow user to use custom interfaces, like reviving the former readline
135 interface which is now a separate package not actively maintained by the core
123 interface which is now a separate package not actively maintained by the core
136 team. See the project to bring back the readline interface: `rlipython
124 team. See the project to bring back the readline interface: `rlipython
137 <https://github.com/ipython/rlipython>`_.
125 <https://github.com/ipython/rlipython>`_.
138
126
139 This change will be backported to the IPython 5.x series.
127 This change will be backported to the IPython 5.x series.
140
128
141
129
142 Miscs improvements
130 Miscs improvements
143 ------------------
131 ------------------
144
132
145
133
146 - The :cellmagic:`capture` magic can now capture the result of a cell (from an
134 - The :cellmagic:`capture` magic can now capture the result of a cell (from an
147 expression on the last line), as well as printed and displayed output.
135 expression on the last line), as well as printed and displayed output.
148 :ghpull:`9851`.
136 :ghpull:`9851`.
149
137
150 - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
138 - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
151 does in the main terminal prompt.
139 does in the main terminal prompt.
152
140
153 - autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
141 - autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
154
142
155 - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
143 - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
156 :ghpull:`10288` and :ghpull:`10253`
144 :ghpull:`10288` and :ghpull:`10253`
157
145
158 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
146 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
159
147
160
148
161 Functions Deprecated in 6.x Development cycle
149 Functions Deprecated in 6.x Development cycle
162 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163
151
164 - Loading extensions from ``ipython_extension_dir`` print a warning that this
152 - Loading extensions from ``ipython_extension_dir`` print a warning that this
165 location is pending deprecation. This should only affect users still having
153 location is pending deprecation. This should only affect users still having
166 extensions installed with ``%install_ext`` which has been deprecated since
154 extensions installed with ``%install_ext`` which has been deprecated since
167 IPython 4.0, and removed in 5.0. Extensions still present in
155 IPython 4.0, and removed in 5.0. Extensions still present in
168 ``ipython_extension_dir`` may shadow more recently installed versions using
156 ``ipython_extension_dir`` may shadow more recently installed versions using
169 pip. It is thus recommended to clean ``ipython_extension_dir`` of any
157 pip. It is thus recommended to clean ``ipython_extension_dir`` of any
170 extension now available as a package.
158 extension now available as a package.
171
159
172
160
173 - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
161 - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
174 instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used.
162 instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used.
175
163
176
164
177 - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
165 - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
178 Deprecated (raising a Deprecation Warning) and marked for later removal
166 Deprecated (raising a Deprecation Warning) and marked for later removal
179 :ghpull:`10104`
167 :ghpull:`10104`
180
168
181 Backwards incompatible changes
169 Backwards incompatible changes
182 ------------------------------
170 ------------------------------
183
171
184 Functions Removed in 6.x Development cycle
172 Functions Removed in 6.x Development cycle
185 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186
174
187 The following functions have been removed in the
175 The following functions have been removed in the
188 development cycle marked for Milestone 6.0.
176 development cycle marked for Milestone 6.0.
189
177
190 - ``IPython/utils/process.py`` - ``is_cmd_found``
178 - ``IPython/utils/process.py`` - ``is_cmd_found``
191 - ``IPython/utils/process.py`` - ``pycmd2argv``
179 - ``IPython/utils/process.py`` - ``pycmd2argv``
192
180
193 - The `--deep-reload` flag and the corresponding options to inject `dreload` or
181 - The `--deep-reload` flag and the corresponding options to inject `dreload` or
194 `reload` into the interactive namespace have been removed. You have to
182 `reload` into the interactive namespace have been removed. You have to
195 explicitly import `reload` from `IPython.lib.deepreload` to use it.
183 explicitly import `reload` from `IPython.lib.deepreload` to use it.
196
184
197 - the :magic:`profile` used to print current IPython profile in use, and which
185 - the :magic:`profile` used to print current IPython profile in use, and which
198 was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when
186 was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when
199 used. It is often confused with the :magic:`prun` and the deprecation remove
187 used. It is often confused with the :magic:`prun` and the deprecation remove
200 should free up the ``profile`` name in future versions.
188 should free up the ``profile`` name in future versions.
201
189
202 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
190 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
@@ -1,55 +1,55 b''
1 """Various utilities common to IPython release and maintenance tools.
1 """Various utilities common to IPython release and maintenance tools.
2 """
2 """
3
3
4 # Library imports
4 # Library imports
5 import os
5 import os
6
6
7 # Useful shorthands
7 # Useful shorthands
8 pjoin = os.path.join
8 pjoin = os.path.join
9 cd = os.chdir
9 cd = os.chdir
10
10
11 # Constants
11 # Constants
12
12
13 # SSH root address of the archive site
13 # SSH root address of the archive site
14 archive_user = 'ipython@archive.ipython.org'
14 archive_user = 'ipython@archive.ipython.org'
15 archive_dir = 'archive.ipython.org'
15 archive_dir = 'archive.ipython.org'
16 archive = '%s:%s' % (archive_user, archive_dir)
16 archive = '%s:%s' % (archive_user, archive_dir)
17
17
18 # Build commands
18 # Build commands
19 # Source dists
19 # Source dists
20 sdists = './setup.py sdist --formats=gztar'
20 sdists = './setup.py sdist --formats=gztar'
21 # Binary dists
21 # Binary dists
22 def buildwheels():
22 def buildwheels():
23 sh('python3 setupegg.py bdist_wheel' % py)
23 sh('python3 setupegg.py bdist_wheel')
24
24
25 # Utility functions
25 # Utility functions
26 def sh(cmd):
26 def sh(cmd):
27 """Run system command in shell, raise SystemExit if it returns an error."""
27 """Run system command in shell, raise SystemExit if it returns an error."""
28 print("$", cmd)
28 print("$", cmd)
29 stat = os.system(cmd)
29 stat = os.system(cmd)
30 #stat = 0 # Uncomment this and comment previous to run in debug mode
30 #stat = 0 # Uncomment this and comment previous to run in debug mode
31 if stat:
31 if stat:
32 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
32 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
33
33
34 # Backwards compatibility
34 # Backwards compatibility
35 c = sh
35 c = sh
36
36
37 def get_ipdir():
37 def get_ipdir():
38 """Get IPython directory from command line, or assume it's the one above."""
38 """Get IPython directory from command line, or assume it's the one above."""
39
39
40 # Initialize arguments and check location
40 # Initialize arguments and check location
41 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
41 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
42
42
43 ipdir = os.path.abspath(ipdir)
43 ipdir = os.path.abspath(ipdir)
44
44
45 cd(ipdir)
45 cd(ipdir)
46 if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
46 if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
47 raise SystemExit('Invalid ipython directory: %s' % ipdir)
47 raise SystemExit('Invalid ipython directory: %s' % ipdir)
48 return ipdir
48 return ipdir
49
49
50 try:
50 try:
51 execfile = execfile
51 execfile = execfile
52 except NameError:
52 except NameError:
53 def execfile(fname, globs, locs=None):
53 def execfile(fname, globs, locs=None):
54 locs = locs or globs
54 locs = locs or globs
55 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
55 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
General Comments 0
You need to be logged in to leave comments. Login now