##// END OF EJS Templates
Releasing version 0.10.1....
Fernando Perez -
Show More
@@ -1,120 +1,120 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-2009 The IPython Development Team
5 # Copyright (C) 2008-2010 The IPython Development Team
6 # Copyright (C) 2001-2008 Fernando Perez <fperez@colorado.edu>
6 # Copyright (C) 2001-2008 Fernando Perez <fperez@colorado.edu>
7 # Copyright (c) 2001 Janko Hauser <jhauser@zscout.de> and Nathaniel Gray
7 # Copyright (c) 2001 Janko Hauser <jhauser@zscout.de> and Nathaniel Gray
8 # <n8gray@caltech.edu>
8 # <n8gray@caltech.edu>
9 #
9 #
10 # Distributed under the terms of the BSD License. The full license is in
10 # Distributed under the terms of the BSD License. The full license is in
11 # the file COPYING, distributed as part of this software.
11 # the file COPYING, distributed as part of this software.
12 #*****************************************************************************
12 #*****************************************************************************
13
13
14 # Name of the package for release purposes. This is the name which labels
14 # Name of the package for release purposes. This is the name which labels
15 # the tarballs and RPMs made by distutils, so it's best to lowercase it.
15 # the tarballs and RPMs made by distutils, so it's best to lowercase it.
16 name = 'ipython'
16 name = 'ipython'
17
17
18 # For versions with substrings (like 0.6.16.svn), use an extra . to separate
18 # For versions with substrings (like 0.6.16.svn), use an extra . to separate
19 # the new substring. We have to avoid using either dashes or underscores,
19 # the new substring. We have to avoid using either dashes or underscores,
20 # because bdist_rpm does not accept dashes (an RPM) convention, and
20 # because bdist_rpm does not accept dashes (an RPM) convention, and
21 # bdist_deb does not accept underscores (a Debian convention).
21 # bdist_deb does not accept underscores (a Debian convention).
22
22
23 development = False # change this to False to do a release
23 development = False # change this to False to do a release
24 version_base = '0.10.1'
24 version_base = '0.10.1'
25 branch = 'ipython'
25 branch = 'ipython'
26
26
27 if development:
27 if development:
28 if branch == 'ipython':
28 if branch == 'ipython':
29 version = '%s.git' % (version_base)
29 version = '%s.git' % (version_base)
30 else:
30 else:
31 version = '%s.git.%s' % (version_base, branch)
31 version = '%s.git.%s' % (version_base, branch)
32 else:
32 else:
33 version = version_base
33 version = version_base
34
34
35
35
36 description = "An interactive computing environment for Python"
36 description = "An interactive computing environment for Python"
37
37
38 long_description = \
38 long_description = \
39 """
39 """
40 The goal of IPython is to create a comprehensive environment for
40 The goal of IPython is to create a comprehensive environment for
41 interactive and exploratory computing. To support this goal, IPython
41 interactive and exploratory computing. To support this goal, IPython
42 has two main components:
42 has two main components:
43
43
44 * An enhanced interactive Python shell.
44 * An enhanced interactive Python shell.
45
45
46 * An architecture for interactive parallel computing.
46 * An architecture for interactive parallel computing.
47
47
48 The enhanced interactive Python shell has the following main features:
48 The enhanced interactive Python shell has the following main features:
49
49
50 * Comprehensive object introspection.
50 * Comprehensive object introspection.
51
51
52 * Input history, persistent across sessions.
52 * Input history, persistent across sessions.
53
53
54 * Caching of output results during a session with automatically generated
54 * Caching of output results during a session with automatically generated
55 references.
55 references.
56
56
57 * Readline based name completion.
57 * Readline based name completion.
58
58
59 * Extensible system of 'magic' commands for controlling the environment and
59 * Extensible system of 'magic' commands for controlling the environment and
60 performing many tasks related either to IPython or the operating system.
60 performing many tasks related either to IPython or the operating system.
61
61
62 * Configuration system with easy switching between different setups (simpler
62 * Configuration system with easy switching between different setups (simpler
63 than changing $PYTHONSTARTUP environment variables every time).
63 than changing $PYTHONSTARTUP environment variables every time).
64
64
65 * Session logging and reloading.
65 * Session logging and reloading.
66
66
67 * Extensible syntax processing for special purpose situations.
67 * Extensible syntax processing for special purpose situations.
68
68
69 * Access to the system shell with user-extensible alias system.
69 * Access to the system shell with user-extensible alias system.
70
70
71 * Easily embeddable in other Python programs and wxPython GUIs.
71 * Easily embeddable in other Python programs and wxPython GUIs.
72
72
73 * Integrated access to the pdb debugger and the Python profiler.
73 * Integrated access to the pdb debugger and the Python profiler.
74
74
75 The parallel computing architecture has the following main features:
75 The parallel computing architecture has the following main features:
76
76
77 * Quickly parallelize Python code from an interactive Python/IPython session.
77 * Quickly parallelize Python code from an interactive Python/IPython session.
78
78
79 * A flexible and dynamic process model that be deployed on anything from
79 * A flexible and dynamic process model that be deployed on anything from
80 multicore workstations to supercomputers.
80 multicore workstations to supercomputers.
81
81
82 * An architecture that supports many different styles of parallelism, from
82 * An architecture that supports many different styles of parallelism, from
83 message passing to task farming.
83 message passing to task farming.
84
84
85 * Both blocking and fully asynchronous interfaces.
85 * Both blocking and fully asynchronous interfaces.
86
86
87 * High level APIs that enable many things to be parallelized in a few lines
87 * High level APIs that enable many things to be parallelized in a few lines
88 of code.
88 of code.
89
89
90 * Share live parallel jobs with other users securely.
90 * Share live parallel jobs with other users securely.
91
91
92 * Dynamically load balanced task farming system.
92 * Dynamically load balanced task farming system.
93
93
94 * Robust error handling in parallel code.
94 * Robust error handling in parallel code.
95
95
96 The latest development version is always available from IPython's `Launchpad
96 The latest development version is always available from IPython's `Launchpad
97 site <http://launchpad.net/ipython>`_.
97 site <http://launchpad.net/ipython>`_.
98 """
98 """
99
99
100 license = 'BSD'
100 license = 'BSD'
101
101
102 authors = {'Fernando' : ('Fernando Perez','fperez.net@gmail.com'),
102 authors = {'Fernando' : ('Fernando Perez','fperez.net@gmail.com'),
103 'Janko' : ('Janko Hauser','jhauser@zscout.de'),
103 'Janko' : ('Janko Hauser','jhauser@zscout.de'),
104 'Nathan' : ('Nathaniel Gray','n8gray@caltech.edu'),
104 'Nathan' : ('Nathaniel Gray','n8gray@caltech.edu'),
105 'Ville' : ('Ville Vainio','vivainio@gmail.com'),
105 'Ville' : ('Ville Vainio','vivainio@gmail.com'),
106 'Brian' : ('Brian E Granger', 'ellisonbg@gmail.com'),
106 'Brian' : ('Brian E Granger', 'ellisonbg@gmail.com'),
107 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com')
107 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com')
108 }
108 }
109
109
110 author = 'The IPython Development Team'
110 author = 'The IPython Development Team'
111
111
112 author_email = 'ipython-dev@scipy.org'
112 author_email = 'ipython-dev@scipy.org'
113
113
114 url = 'http://ipython.scipy.org'
114 url = 'http://ipython.scipy.org'
115
115
116 download_url = 'http://ipython.scipy.org/dist'
116 download_url = 'http://ipython.scipy.org/dist'
117
117
118 platforms = ['Linux','Mac OSX','Windows XP/2000/NT','Windows 95/98/ME']
118 platforms = ['Linux','Mac OSX','Windows XP/2000/NT','Windows 95/98/ME']
119
119
120 keywords = ['Interactive','Interpreter','Shell','Parallel','Distributed']
120 keywords = ['Interactive','Interpreter','Shell','Parallel','Distributed']
@@ -1,71 +1,71 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 IPython -- An enhanced Interactive Python
3 IPython -- An enhanced Interactive Python
4
4
5 One of Python's nicest features is its interactive interpreter. This allows
5 One of Python's nicest features is its interactive interpreter. This allows
6 very fast testing of ideas without the overhead of creating test files as is
6 very fast testing of ideas without the overhead of creating test files as is
7 typical in most programming languages. However, the interpreter supplied with
7 typical in most programming languages. However, the interpreter supplied with
8 the standard Python distribution is fairly primitive (and IDLE isn't really
8 the standard Python distribution is fairly primitive (and IDLE isn't really
9 much better).
9 much better).
10
10
11 IPython tries to:
11 IPython tries to:
12
12
13 i - provide an efficient environment for interactive work in Python
13 i - provide an efficient environment for interactive work in Python
14 programming. It tries to address what we see as shortcomings of the standard
14 programming. It tries to address what we see as shortcomings of the standard
15 Python prompt, and adds many features to make interactive work much more
15 Python prompt, and adds many features to make interactive work much more
16 efficient.
16 efficient.
17
17
18 ii - offer a flexible framework so that it can be used as the base
18 ii - offer a flexible framework so that it can be used as the base
19 environment for other projects and problems where Python can be the
19 environment for other projects and problems where Python can be the
20 underlying language. Specifically scientific environments like Mathematica,
20 underlying language. Specifically scientific environments like Mathematica,
21 IDL and Mathcad inspired its design, but similar ideas can be useful in many
21 IDL and Mathcad inspired its design, but similar ideas can be useful in many
22 fields. Python is a fabulous language for implementing this kind of system
22 fields. Python is a fabulous language for implementing this kind of system
23 (due to its dynamic and introspective features), and with suitable libraries
23 (due to its dynamic and introspective features), and with suitable libraries
24 entire systems could be built leveraging Python's power.
24 entire systems could be built leveraging Python's power.
25
25
26 iii - serve as an embeddable, ready to go interpreter for your own programs.
26 iii - serve as an embeddable, ready to go interpreter for your own programs.
27
27
28 IPython requires Python 2.4 or newer.
28 IPython requires Python 2.4 or newer.
29 """
29 """
30
30
31 #*****************************************************************************
31 #*****************************************************************************
32 # Copyright (C) 2008-2009 The IPython Development Team
32 # Copyright (C) 2008-2010 The IPython Development Team
33 # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu>
33 # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu>
34 #
34 #
35 # Distributed under the terms of the BSD License. The full license is in
35 # Distributed under the terms of the BSD License. The full license is in
36 # the file COPYING, distributed as part of this software.
36 # the file COPYING, distributed as part of this software.
37 #*****************************************************************************
37 #*****************************************************************************
38
38
39 # Enforce proper version requirements
39 # Enforce proper version requirements
40 import sys
40 import sys
41
41
42 if sys.version[0:3] < '2.4':
42 if sys.version[0:3] < '2.4':
43 raise ImportError('Python Version 2.4 or above is required for IPython.')
43 raise ImportError('Python Version 2.4 or above is required for IPython.')
44
44
45 # Make it easy to import extensions - they are always directly on pythonpath.
45 # Make it easy to import extensions - they are always directly on pythonpath.
46 # Therefore, non-IPython modules can be added to Extensions directory
46 # Therefore, non-IPython modules can be added to Extensions directory
47 import os
47 import os
48 sys.path.append(os.path.dirname(__file__) + "/Extensions")
48 sys.path.append(os.path.dirname(__file__) + "/Extensions")
49
49
50 # Define what gets imported with a 'from IPython import *'
50 # Define what gets imported with a 'from IPython import *'
51 __all__ = ['ipapi','generics','ipstruct','Release','Shell']
51 __all__ = ['ipapi','generics','ipstruct','Release','Shell']
52
52
53 # Load __all__ in IPython namespace so that a simple 'import IPython' gives
53 # Load __all__ in IPython namespace so that a simple 'import IPython' gives
54 # access to them via IPython.<name>
54 # access to them via IPython.<name>
55 glob,loc = globals(),locals()
55 glob,loc = globals(),locals()
56 for name in __all__:
56 for name in __all__:
57 #print 'Importing: ',name # dbg
57 #print 'Importing: ',name # dbg
58 __import__(name,glob,loc,[])
58 __import__(name,glob,loc,[])
59
59
60 import Shell
60 import Shell
61
61
62 # Release data
62 # Release data
63 from IPython import Release # do it explicitly so pydoc can see it - pydoc bug
63 from IPython import Release # do it explicitly so pydoc can see it - pydoc bug
64 __author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \
64 __author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \
65 ( Release.authors['Fernando'] + Release.authors['Janko'] + \
65 ( Release.authors['Fernando'] + Release.authors['Janko'] + \
66 Release.authors['Nathan'] )
66 Release.authors['Nathan'] )
67 __license__ = Release.license
67 __license__ = Release.license
68 __version__ = Release.version
68 __version__ = Release.version
69
69
70 # Namespace cleanup
70 # Namespace cleanup
71 del name,glob,loc
71 del name,glob,loc
@@ -1,346 +1,346 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """IPython Test Suite Runner.
2 """IPython Test Suite Runner.
3
3
4 This module provides a main entry point to a user script to test IPython
4 This module provides a main entry point to a user script to test IPython
5 itself from the command line. There are two ways of running this script:
5 itself from the command line. There are two ways of running this script:
6
6
7 1. With the syntax `iptest all`. This runs our entire test suite by
7 1. With the syntax `iptest all`. This runs our entire test suite by
8 calling this script (with different arguments) or trial recursively. This
8 calling this script (with different arguments) or trial recursively. This
9 causes modules and package to be tested in different processes, using nose
9 causes modules and package to be tested in different processes, using nose
10 or trial where appropriate.
10 or trial where appropriate.
11 2. With the regular nose syntax, like `iptest -vvs IPython`. In this form
11 2. With the regular nose syntax, like `iptest -vvs IPython`. In this form
12 the script simply calls nose, but with special command line flags and
12 the script simply calls nose, but with special command line flags and
13 plugins loaded.
13 plugins loaded.
14
14
15 For now, this script requires that both nose and twisted are installed. This
15 For now, this script requires that both nose and twisted are installed. This
16 will change in the future.
16 will change in the future.
17 """
17 """
18
18
19 #-----------------------------------------------------------------------------
19 #-----------------------------------------------------------------------------
20 # Module imports
20 # Module imports
21 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
22
22
23 import os
23 import os
24 import os.path as path
24 import os.path as path
25 import sys
25 import sys
26 import subprocess
26 import subprocess
27 import tempfile
27 import tempfile
28 import time
28 import time
29 import warnings
29 import warnings
30
30
31 import nose.plugins.builtin
31 import nose.plugins.builtin
32 from nose.core import TestProgram
32 from nose.core import TestProgram
33
33
34 from IPython.platutils import find_cmd
34 from IPython.platutils import find_cmd
35 from IPython.testing.plugin.ipdoctest import IPythonDoctest
35 from IPython.testing.plugin.ipdoctest import IPythonDoctest
36
36
37 pjoin = path.join
37 pjoin = path.join
38
38
39 #-----------------------------------------------------------------------------
39 #-----------------------------------------------------------------------------
40 # Logic for skipping doctests
40 # Logic for skipping doctests
41 #-----------------------------------------------------------------------------
41 #-----------------------------------------------------------------------------
42
42
43 def test_for(mod):
43 def test_for(mod):
44 """Test to see if mod is importable."""
44 """Test to see if mod is importable."""
45 try:
45 try:
46 __import__(mod)
46 __import__(mod)
47 except ImportError:
47 except ImportError:
48 return False
48 return False
49 else:
49 else:
50 return True
50 return True
51
51
52 have_curses = test_for('_curses')
52 have_curses = test_for('_curses')
53 have_wx = test_for('wx')
53 have_wx = test_for('wx')
54 have_wx_aui = test_for('wx.aui')
54 have_wx_aui = test_for('wx.aui')
55 have_zi = test_for('zope.interface')
55 have_zi = test_for('zope.interface')
56 have_twisted = test_for('twisted')
56 have_twisted = test_for('twisted')
57 have_foolscap = test_for('foolscap')
57 have_foolscap = test_for('foolscap')
58 have_objc = test_for('objc')
58 have_objc = test_for('objc')
59 have_pexpect = test_for('pexpect')
59 have_pexpect = test_for('pexpect')
60
60
61 # For the IPythonDoctest plugin, we need to exclude certain patterns that cause
61 # For the IPythonDoctest plugin, we need to exclude certain patterns that cause
62 # testing problems. We should strive to minimize the number of skipped
62 # testing problems. We should strive to minimize the number of skipped
63 # modules, since this means untested code. As the testing machinery
63 # modules, since this means untested code. As the testing machinery
64 # solidifies, this list should eventually become empty.
64 # solidifies, this list should eventually become empty.
65 EXCLUDE = [pjoin('IPython', 'external'),
65 EXCLUDE = [pjoin('IPython', 'external'),
66 pjoin('IPython', 'frontend', 'process', 'winprocess.py'),
66 pjoin('IPython', 'frontend', 'process', 'winprocess.py'),
67 pjoin('IPython_doctest_plugin'),
67 pjoin('IPython_doctest_plugin'),
68 pjoin('IPython', 'Gnuplot'),
68 pjoin('IPython', 'Gnuplot'),
69 pjoin('IPython', 'Extensions', 'ipy_'),
69 pjoin('IPython', 'Extensions', 'ipy_'),
70 pjoin('IPython', 'Extensions', 'PhysicalQInput'),
70 pjoin('IPython', 'Extensions', 'PhysicalQInput'),
71 pjoin('IPython', 'Extensions', 'PhysicalQInteractive'),
71 pjoin('IPython', 'Extensions', 'PhysicalQInteractive'),
72 pjoin('IPython', 'Extensions', 'InterpreterPasteInput'),
72 pjoin('IPython', 'Extensions', 'InterpreterPasteInput'),
73 pjoin('IPython', 'Extensions', 'scitedirector'),
73 pjoin('IPython', 'Extensions', 'scitedirector'),
74 pjoin('IPython', 'Extensions', 'numeric_formats'),
74 pjoin('IPython', 'Extensions', 'numeric_formats'),
75 pjoin('IPython', 'testing', 'attic'),
75 pjoin('IPython', 'testing', 'attic'),
76 pjoin('IPython', 'testing', 'tutils'),
76 pjoin('IPython', 'testing', 'tutils'),
77 pjoin('IPython', 'testing', 'tools'),
77 pjoin('IPython', 'testing', 'tools'),
78 pjoin('IPython', 'testing', 'mkdoctests'),
78 pjoin('IPython', 'testing', 'mkdoctests'),
79 pjoin('IPython', 'gui'),
79 ]
80 ]
80
81
81 if not have_wx:
82 if not have_wx:
82 EXCLUDE.append(pjoin('IPython', 'Extensions', 'igrid'))
83 EXCLUDE.append(pjoin('IPython', 'Extensions', 'igrid'))
83 EXCLUDE.append(pjoin('IPython', 'gui'))
84 EXCLUDE.append(pjoin('IPython', 'frontend', 'wx'))
84 EXCLUDE.append(pjoin('IPython', 'frontend', 'wx'))
85
85
86 if not have_wx_aui:
86 if not have_wx_aui:
87 EXCLUDE.append(pjoin('IPython', 'gui', 'wx', 'wxIPython'))
87 EXCLUDE.append(pjoin('IPython', 'gui', 'wx', 'wxIPython'))
88
88
89 if not have_objc:
89 if not have_objc:
90 EXCLUDE.append(pjoin('IPython', 'frontend', 'cocoa'))
90 EXCLUDE.append(pjoin('IPython', 'frontend', 'cocoa'))
91
91
92 if not have_curses:
92 if not have_curses:
93 EXCLUDE.append(pjoin('IPython', 'Extensions', 'ibrowse'))
93 EXCLUDE.append(pjoin('IPython', 'Extensions', 'ibrowse'))
94
94
95 if not sys.platform == 'win32':
95 if not sys.platform == 'win32':
96 EXCLUDE.append(pjoin('IPython', 'platutils_win32'))
96 EXCLUDE.append(pjoin('IPython', 'platutils_win32'))
97
97
98 # These have to be skipped on win32 because the use echo, rm, cd, etc.
98 # These have to be skipped on win32 because the use echo, rm, cd, etc.
99 # See ticket https://bugs.launchpad.net/bugs/366982
99 # See ticket https://bugs.launchpad.net/bugs/366982
100 if sys.platform == 'win32':
100 if sys.platform == 'win32':
101 EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'test_exampleip'))
101 EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'test_exampleip'))
102 EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'dtexample'))
102 EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'dtexample'))
103
103
104 if not os.name == 'posix':
104 if not os.name == 'posix':
105 EXCLUDE.append(pjoin('IPython', 'platutils_posix'))
105 EXCLUDE.append(pjoin('IPython', 'platutils_posix'))
106
106
107 if not have_pexpect:
107 if not have_pexpect:
108 EXCLUDE.append(pjoin('IPython', 'irunner'))
108 EXCLUDE.append(pjoin('IPython', 'irunner'))
109
109
110 if not have_twisted:
110 if not have_twisted:
111 EXCLUDE.append(pjoin('IPython', 'frontend', 'asyncfrontendbase'))
111 EXCLUDE.append(pjoin('IPython', 'frontend', 'asyncfrontendbase'))
112 EXCLUDE.append(pjoin('IPython', 'frontend', 'prefilterfrontend'))
112 EXCLUDE.append(pjoin('IPython', 'frontend', 'prefilterfrontend'))
113 EXCLUDE.append(pjoin('IPython', 'frontend', 'frontendbase'))
113 EXCLUDE.append(pjoin('IPython', 'frontend', 'frontendbase'))
114 EXCLUDE.append(pjoin('IPython', 'frontend', 'linefrontendbase'))
114 EXCLUDE.append(pjoin('IPython', 'frontend', 'linefrontendbase'))
115 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests', 'test_linefrontend'))
115 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests', 'test_linefrontend'))
116 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests', 'test_frontendbase'))
116 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests', 'test_frontendbase'))
117 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests',
117 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests',
118 'test_prefilterfrontend'))
118 'test_prefilterfrontend'))
119 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests',
119 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests',
120 'test_asyncfrontendbase'))
120 'test_asyncfrontendbase'))
121 EXCLUDE.append(pjoin('IPython', 'kernel', 'error'))
121 EXCLUDE.append(pjoin('IPython', 'kernel', 'error'))
122 EXCLUDE.append(pjoin('IPython', 'testing', 'parametric'))
122 EXCLUDE.append(pjoin('IPython', 'testing', 'parametric'))
123 EXCLUDE.append(pjoin('IPython', 'testing', 'util'))
123 EXCLUDE.append(pjoin('IPython', 'testing', 'util'))
124 EXCLUDE.append(pjoin('IPython', 'testing', 'tests', 'test_decorators_trial'))
124 EXCLUDE.append(pjoin('IPython', 'testing', 'tests', 'test_decorators_trial'))
125
125
126
126
127 # This is needed for the reg-exp to match on win32 in the ipdoctest plugin.
127 # This is needed for the reg-exp to match on win32 in the ipdoctest plugin.
128 if sys.platform == 'win32':
128 if sys.platform == 'win32':
129 EXCLUDE = [s.replace('\\','\\\\') for s in EXCLUDE]
129 EXCLUDE = [s.replace('\\','\\\\') for s in EXCLUDE]
130
130
131
131
132 #-----------------------------------------------------------------------------
132 #-----------------------------------------------------------------------------
133 # Functions and classes
133 # Functions and classes
134 #-----------------------------------------------------------------------------
134 #-----------------------------------------------------------------------------
135
135
136 def run_iptest():
136 def run_iptest():
137 """Run the IPython test suite using nose.
137 """Run the IPython test suite using nose.
138
138
139 This function is called when this script is **not** called with the form
139 This function is called when this script is **not** called with the form
140 `iptest all`. It simply calls nose with appropriate command line flags
140 `iptest all`. It simply calls nose with appropriate command line flags
141 and accepts all of the standard nose arguments.
141 and accepts all of the standard nose arguments.
142 """
142 """
143
143
144 warnings.filterwarnings('ignore',
144 warnings.filterwarnings('ignore',
145 'This will be removed soon. Use IPython.testing.util instead')
145 'This will be removed soon. Use IPython.testing.util instead')
146
146
147 argv = sys.argv + [
147 argv = sys.argv + [
148 # Loading ipdoctest causes problems with Twisted.
148 # Loading ipdoctest causes problems with Twisted.
149 # I am removing this as a temporary fix to get the
149 # I am removing this as a temporary fix to get the
150 # test suite back into working shape. Our nose
150 # test suite back into working shape. Our nose
151 # plugin needs to be gone through with a fine
151 # plugin needs to be gone through with a fine
152 # toothed comb to find what is causing the problem.
152 # toothed comb to find what is causing the problem.
153 '--with-ipdoctest',
153 '--with-ipdoctest',
154 '--ipdoctest-tests','--ipdoctest-extension=txt',
154 '--ipdoctest-tests','--ipdoctest-extension=txt',
155 '--detailed-errors',
155 '--detailed-errors',
156
156
157 # We add --exe because of setuptools' imbecility (it
157 # We add --exe because of setuptools' imbecility (it
158 # blindly does chmod +x on ALL files). Nose does the
158 # blindly does chmod +x on ALL files). Nose does the
159 # right thing and it tries to avoid executables,
159 # right thing and it tries to avoid executables,
160 # setuptools unfortunately forces our hand here. This
160 # setuptools unfortunately forces our hand here. This
161 # has been discussed on the distutils list and the
161 # has been discussed on the distutils list and the
162 # setuptools devs refuse to fix this problem!
162 # setuptools devs refuse to fix this problem!
163 '--exe',
163 '--exe',
164 ]
164 ]
165
165
166 # Detect if any tests were required by explicitly calling an IPython
166 # Detect if any tests were required by explicitly calling an IPython
167 # submodule or giving a specific path
167 # submodule or giving a specific path
168 has_tests = False
168 has_tests = False
169 for arg in sys.argv:
169 for arg in sys.argv:
170 if 'IPython' in arg or arg.endswith('.py') or \
170 if 'IPython' in arg or arg.endswith('.py') or \
171 (':' in arg and '.py' in arg):
171 (':' in arg and '.py' in arg):
172 has_tests = True
172 has_tests = True
173 break
173 break
174
174
175 # If nothing was specifically requested, test full IPython
175 # If nothing was specifically requested, test full IPython
176 if not has_tests:
176 if not has_tests:
177 argv.append('IPython')
177 argv.append('IPython')
178
178
179 # Construct list of plugins, omitting the existing doctest plugin, which
179 # Construct list of plugins, omitting the existing doctest plugin, which
180 # ours replaces (and extends).
180 # ours replaces (and extends).
181 plugins = [IPythonDoctest(EXCLUDE)]
181 plugins = [IPythonDoctest(EXCLUDE)]
182 for p in nose.plugins.builtin.plugins:
182 for p in nose.plugins.builtin.plugins:
183 plug = p()
183 plug = p()
184 if plug.name == 'doctest':
184 if plug.name == 'doctest':
185 continue
185 continue
186
186
187 #print '*** adding plugin:',plug.name # dbg
187 #print '*** adding plugin:',plug.name # dbg
188 plugins.append(plug)
188 plugins.append(plug)
189
189
190 TestProgram(argv=argv,plugins=plugins)
190 TestProgram(argv=argv,plugins=plugins)
191
191
192
192
193 class IPTester(object):
193 class IPTester(object):
194 """Call that calls iptest or trial in a subprocess.
194 """Call that calls iptest or trial in a subprocess.
195 """
195 """
196 def __init__(self,runner='iptest',params=None):
196 def __init__(self,runner='iptest',params=None):
197 """ """
197 """ """
198 if runner == 'iptest':
198 if runner == 'iptest':
199 self.runner = ['iptest','-v']
199 self.runner = ['iptest','-v']
200 else:
200 else:
201 self.runner = [find_cmd('trial')]
201 self.runner = [find_cmd('trial')]
202 if params is None:
202 if params is None:
203 params = []
203 params = []
204 if isinstance(params,str):
204 if isinstance(params,str):
205 params = [params]
205 params = [params]
206 self.params = params
206 self.params = params
207
207
208 # Assemble call
208 # Assemble call
209 self.call_args = self.runner+self.params
209 self.call_args = self.runner+self.params
210
210
211 if sys.platform == 'win32':
211 if sys.platform == 'win32':
212 def run(self):
212 def run(self):
213 """Run the stored commands"""
213 """Run the stored commands"""
214 # On Windows, cd to temporary directory to run tests. Otherwise,
214 # On Windows, cd to temporary directory to run tests. Otherwise,
215 # Twisted's trial may not be able to execute 'trial IPython', since
215 # Twisted's trial may not be able to execute 'trial IPython', since
216 # it will confuse the IPython module name with the ipython
216 # it will confuse the IPython module name with the ipython
217 # execution scripts, because the windows file system isn't case
217 # execution scripts, because the windows file system isn't case
218 # sensitive.
218 # sensitive.
219 # We also use os.system instead of subprocess.call, because I was
219 # We also use os.system instead of subprocess.call, because I was
220 # having problems with subprocess and I just don't know enough
220 # having problems with subprocess and I just don't know enough
221 # about win32 to debug this reliably. Os.system may be the 'old
221 # about win32 to debug this reliably. Os.system may be the 'old
222 # fashioned' way to do it, but it works just fine. If someone
222 # fashioned' way to do it, but it works just fine. If someone
223 # later can clean this up that's fine, as long as the tests run
223 # later can clean this up that's fine, as long as the tests run
224 # reliably in win32.
224 # reliably in win32.
225 curdir = os.getcwd()
225 curdir = os.getcwd()
226 os.chdir(tempfile.gettempdir())
226 os.chdir(tempfile.gettempdir())
227 stat = os.system(' '.join(self.call_args))
227 stat = os.system(' '.join(self.call_args))
228 os.chdir(curdir)
228 os.chdir(curdir)
229 return stat
229 return stat
230 else:
230 else:
231 def run(self):
231 def run(self):
232 """Run the stored commands"""
232 """Run the stored commands"""
233 return subprocess.call(self.call_args)
233 return subprocess.call(self.call_args)
234
234
235
235
236 def make_runners():
236 def make_runners():
237 """Define the modules and packages that need to be tested.
237 """Define the modules and packages that need to be tested.
238 """
238 """
239
239
240 # This omits additional top-level modules that should not be doctested.
240 # This omits additional top-level modules that should not be doctested.
241 # XXX: Shell.py is also ommited because of a bug in the skip_doctest
241 # XXX: Shell.py is also ommited because of a bug in the skip_doctest
242 # decorator. See ticket https://bugs.launchpad.net/bugs/366209
242 # decorator. See ticket https://bugs.launchpad.net/bugs/366209
243 top_mod = \
243 top_mod = \
244 ['background_jobs.py', 'ColorANSI.py', 'completer.py', 'ConfigLoader.py',
244 ['background_jobs.py', 'ColorANSI.py', 'completer.py', 'ConfigLoader.py',
245 'CrashHandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py',
245 'CrashHandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py',
246 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py',
246 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py',
247 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py',
247 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py',
248 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py',
248 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py',
249 'Logger.py', 'macro.py', 'Magic.py', 'OInspect.py',
249 'Logger.py', 'macro.py', 'Magic.py', 'OInspect.py',
250 'OutputTrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py',
250 'OutputTrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py',
251 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py',
251 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py',
252 'shellglobals.py', 'strdispatch.py',
252 'shellglobals.py', 'strdispatch.py',
253 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py',
253 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py',
254 # See note above for why this is skipped
254 # See note above for why this is skipped
255 # 'Shell.py',
255 # 'Shell.py',
256 'winconsole.py']
256 'winconsole.py']
257
257
258 if have_twisted:
258 if have_twisted:
259 top_mod.append('twshell.py')
259 top_mod.append('twshell.py')
260
260
261 if have_pexpect:
261 if have_pexpect:
262 top_mod.append('irunner.py')
262 top_mod.append('irunner.py')
263
263
264 if sys.platform == 'win32':
264 if sys.platform == 'win32':
265 top_mod.append('platutils_win32.py')
265 top_mod.append('platutils_win32.py')
266 elif os.name == 'posix':
266 elif os.name == 'posix':
267 top_mod.append('platutils_posix.py')
267 top_mod.append('platutils_posix.py')
268 else:
268 else:
269 top_mod.append('platutils_dummy.py')
269 top_mod.append('platutils_dummy.py')
270
270
271 # These are tested by nose, so skip IPython.kernel
271 # These are tested by nose, so skip IPython.kernel
272 top_pack = ['config','Extensions','frontend',
272 top_pack = ['config','Extensions','frontend',
273 'testing','tests','tools','UserConfig']
273 'testing','tests','tools','UserConfig']
274
274
275 if have_wx:
275 if have_wx:
276 top_pack.append('gui')
276 top_pack.append('gui')
277
277
278 modules = ['IPython.%s' % m[:-3] for m in top_mod ]
278 modules = ['IPython.%s' % m[:-3] for m in top_mod ]
279 packages = ['IPython.%s' % m for m in top_pack ]
279 packages = ['IPython.%s' % m for m in top_pack ]
280
280
281 # Make runners
281 # Make runners
282 runners = dict(zip(top_pack, [IPTester(params=v) for v in packages]))
282 runners = dict(zip(top_pack, [IPTester(params=v) for v in packages]))
283
283
284 # Test IPython.kernel using trial if twisted is installed
284 # Test IPython.kernel using trial if twisted is installed
285 if have_zi and have_twisted and have_foolscap:
285 if have_zi and have_twisted and have_foolscap:
286 runners['trial'] = IPTester('trial',['IPython'])
286 runners['trial'] = IPTester('trial',['IPython'])
287
287
288 runners['modules'] = IPTester(params=modules)
288 runners['modules'] = IPTester(params=modules)
289
289
290 return runners
290 return runners
291
291
292
292
293 def run_iptestall():
293 def run_iptestall():
294 """Run the entire IPython test suite by calling nose and trial.
294 """Run the entire IPython test suite by calling nose and trial.
295
295
296 This function constructs :class:`IPTester` instances for all IPython
296 This function constructs :class:`IPTester` instances for all IPython
297 modules and package and then runs each of them. This causes the modules
297 modules and package and then runs each of them. This causes the modules
298 and packages of IPython to be tested each in their own subprocess using
298 and packages of IPython to be tested each in their own subprocess using
299 nose or twisted.trial appropriately.
299 nose or twisted.trial appropriately.
300 """
300 """
301 runners = make_runners()
301 runners = make_runners()
302 # Run all test runners, tracking execution time
302 # Run all test runners, tracking execution time
303 failed = {}
303 failed = {}
304 t_start = time.time()
304 t_start = time.time()
305 for name,runner in runners.iteritems():
305 for name,runner in runners.iteritems():
306 print '*'*77
306 print '*'*77
307 print 'IPython test group:',name
307 print 'IPython test group:',name
308 res = runner.run()
308 res = runner.run()
309 if res:
309 if res:
310 failed[name] = res
310 failed[name] = res
311 t_end = time.time()
311 t_end = time.time()
312 t_tests = t_end - t_start
312 t_tests = t_end - t_start
313 nrunners = len(runners)
313 nrunners = len(runners)
314 nfail = len(failed)
314 nfail = len(failed)
315 # summarize results
315 # summarize results
316 print
316 print
317 print '*'*77
317 print '*'*77
318 print 'Ran %s test groups in %.3fs' % (nrunners, t_tests)
318 print 'Ran %s test groups in %.3fs' % (nrunners, t_tests)
319 print
319 print
320 if not failed:
320 if not failed:
321 print 'OK'
321 print 'OK'
322 else:
322 else:
323 # If anything went wrong, point out what command to rerun manually to
323 # If anything went wrong, point out what command to rerun manually to
324 # see the actual errors and individual summary
324 # see the actual errors and individual summary
325 print 'ERROR - %s out of %s test groups failed.' % (nfail, nrunners)
325 print 'ERROR - %s out of %s test groups failed.' % (nfail, nrunners)
326 for name in failed:
326 for name in failed:
327 failed_runner = runners[name]
327 failed_runner = runners[name]
328 print '-'*40
328 print '-'*40
329 print 'Runner failed:',name
329 print 'Runner failed:',name
330 print 'You may wish to rerun this one individually, with:'
330 print 'You may wish to rerun this one individually, with:'
331 print ' '.join(failed_runner.call_args)
331 print ' '.join(failed_runner.call_args)
332 print
332 print
333
333
334
334
335 def main():
335 def main():
336 if len(sys.argv) == 1:
336 if len(sys.argv) == 1:
337 run_iptestall()
337 run_iptestall()
338 else:
338 else:
339 if sys.argv[1] == 'all':
339 if sys.argv[1] == 'all':
340 run_iptestall()
340 run_iptestall()
341 else:
341 else:
342 run_iptest()
342 run_iptest()
343
343
344
344
345 if __name__ == '__main__':
345 if __name__ == '__main__':
346 main()
346 main()
@@ -1,544 +1,640 b''
1 .. Developers should add in this file, during each release cycle, information
1 .. Developers should add in this file, during each release cycle, information
2 .. about important changes they've made, in a summary format that's meant for
2 .. about important changes they've made, in a summary format that's meant for
3 .. end users. For each release we normally have three sections: features, bug
3 .. end users. For each release we normally have three sections: features, bug
4 .. fixes and api breakage.
4 .. fixes and api breakage.
5 .. Please remember to credit the authors of the contributions by name,
5 .. Please remember to credit the authors of the contributions by name,
6 .. especially when they are new users or developers who do not regularly
6 .. especially when they are new users or developers who do not regularly
7 .. participate in IPython's development.
7 .. participate in IPython's development.
8
8
9 .. _changes:
9 .. _changes:
10
10
11 ==========
11 ==========
12 What's new
12 What's new
13 ==========
13 ==========
14
14
15 Release 0.10.1
16 ==============
17
18 IPython 0.10.1 was released October 11, 2010, over a year after version 0.10.
19 This is mostly a bugfix release, since after version 0.10 was released, the
20 development team's energy has been focused on the 0.11 series. We have
21 nonetheless tried to backport what fixes we could into 0.10.1, as it remains
22 the stable series that many users have in production systems they rely on.
23
24 Since the 0.11 series changes many APIs in backwards-incompatible ways, we are
25 willing to continue maintaining the 0.10.x series. We don't really have time
26 to actively write new code for 0.10.x, but we are happy to accept patches and
27 pull requests on the IPython `github site`_. If sufficient contributions are
28 made that improve 0.10.1, we will roll them into future releases. For this
29 purpose, we will have a branch called 0.10.2 on github, on which you can base
30 your contributions.
31
32 .. _github site: http://github.com/ipython
33
34 For this release, we applied approximately 60 commits totaling a diff of over
35 7000 lines::
36
37 (0.10.1)amirbar[dist]> git diff --oneline rel-0.10.. | wc -l
38 7296
39
40 Highlights of this release:
41
42 - The only significant new feature is that IPython's parallel computing
43 machinery now supports natively the Sun Grid Engine and LSF schedulers. This
44 work was a joint contribution from Justin Riley, Satra Ghosh and Matthieu
45 Brucher, who put a lot of work into it. We also improved traceback handling
46 in remote tasks, as well as providing better control for remote task IDs.
47
48 - New IPython Sphinx directive. You can use this directive to mark blocks in
49 reSructuredText documents as containig IPython syntax (including figures) and
50 the will be executed during the build::
51
52 .. ipython::
53
54 In [2]: plt.figure() # ensure a fresh figure
55
56 @savefig psimple.png width=4in
57 In [3]: plt.plot([1,2,3])
58 Out[3]: [<matplotlib.lines.Line2D object at 0x9b74d8c>]
59
60 - Various fixes to the standalone ipython-wx application.
61
62 - We now ship internally the excellent argparse library, graciously licensed
63 under BSD terms by Steven Bethard. Now (2010) that argparse has become part
64 of Python 2.7 this will be less of an issue, but Steven's relicensing allowed
65 us to start updating IPython to using argparse well before Python 2.7. Many
66 thanks!
67
68 - Robustness improvements so that IPython doesn't crash if the readline library
69 is absent (though obviously a lot of functionality that requires readline
70 will not be available).
71
72 - Improvements to tab completion in Emacs with Python 2.6.
73
74 - Logging now supports timestamps (see ``%logstart?`` for full details).
75
76 - A long-standing and quite annoying bug where parentheses would be added to
77 ``print`` statements, under Python 2.5 and 2.6, was finally fixed.
78
79 - Improved handling of libreadline on Apple OSX.
80
81 - Fix ``reload`` method of IPython demos, which was broken.
82
83 - Fixes for the ipipe/ibrowse system on OSX.
84
85 - Fixes for Zope profile.
86
87 - Fix %timeit reporting when the time is longer than 1000s.
88
89 - Avoid lockups with ? or ?? in SunOS, due to a bug in termios.
90
91 - The usual assortment of miscellaneous bug fixes and small improvements.
92
93 The following people contributed to this release (please let us know if we
94 ommitted your name and we'll gladly fix this in the notes for the future):
95
96 * Beni Cherniavsky
97 * Boyd Waters.
98 * David Warde-Farley
99 * Fernando Perez
100 * GΓΆkhan Sever
101 * Justin Riley
102 * Kiorky
103 * Laurent Dufrechou
104 * Mark E. Smith
105 * Matthieu Brucher
106 * Satrajit Ghosh
107 * Sebastian Busch
108 * VΓ‘clav Ε milauer
109
110
15 Release 0.10
111 Release 0.10
16 ============
112 ============
17
113
18 This release brings months of slow but steady development, and will be the last
114 This release brings months of slow but steady development, and will be the last
19 before a major restructuring and cleanup of IPython's internals that is already
115 before a major restructuring and cleanup of IPython's internals that is already
20 under way. For this reason, we hope that 0.10 will be a stable and robust
116 under way. For this reason, we hope that 0.10 will be a stable and robust
21 release so that while users adapt to some of the API changes that will come
117 release so that while users adapt to some of the API changes that will come
22 with the refactoring that will become IPython 0.11, they can safely use 0.10 in
118 with the refactoring that will become IPython 0.11, they can safely use 0.10 in
23 all existing projects with minimal changes (if any).
119 all existing projects with minimal changes (if any).
24
120
25 IPython 0.10 is now a medium-sized project, with roughly (as reported by David
121 IPython 0.10 is now a medium-sized project, with roughly (as reported by David
26 Wheeler's :command:`sloccount` utility) 40750 lines of Python code, and a diff
122 Wheeler's :command:`sloccount` utility) 40750 lines of Python code, and a diff
27 between 0.9.1 and this release that contains almost 28000 lines of code and
123 between 0.9.1 and this release that contains almost 28000 lines of code and
28 documentation. Our documentation, in PDF format, is a 495-page long PDF
124 documentation. Our documentation, in PDF format, is a 495-page long PDF
29 document (also available in HTML format, both generated from the same sources).
125 document (also available in HTML format, both generated from the same sources).
30
126
31 Many users and developers contributed code, features, bug reports and ideas to
127 Many users and developers contributed code, features, bug reports and ideas to
32 this release. Please do not hesitate in contacting us if we've failed to
128 this release. Please do not hesitate in contacting us if we've failed to
33 acknowledge your contribution here. In particular, for this release we have
129 acknowledge your contribution here. In particular, for this release we have
34 contribution from the following people, a mix of new and regular names (in
130 contribution from the following people, a mix of new and regular names (in
35 alphabetical order by first name):
131 alphabetical order by first name):
36
132
37 * Alexander Clausen: fix #341726.
133 * Alexander Clausen: fix #341726.
38 * Brian Granger: lots of work everywhere (features, bug fixes, etc).
134 * Brian Granger: lots of work everywhere (features, bug fixes, etc).
39 * Daniel Ashbrook: bug report on MemoryError during compilation, now fixed.
135 * Daniel Ashbrook: bug report on MemoryError during compilation, now fixed.
40 * Darren Dale: improvements to documentation build system, feedback, design
136 * Darren Dale: improvements to documentation build system, feedback, design
41 ideas.
137 ideas.
42 * Fernando Perez: various places.
138 * Fernando Perez: various places.
43 * GaΓ«l Varoquaux: core code, ipythonx GUI, design discussions, etc. Lots...
139 * GaΓ«l Varoquaux: core code, ipythonx GUI, design discussions, etc. Lots...
44 * John Hunter: suggestions, bug fixes, feedback.
140 * John Hunter: suggestions, bug fixes, feedback.
45 * Jorgen Stenarson: work on many fronts, tests, fixes, win32 support, etc.
141 * Jorgen Stenarson: work on many fronts, tests, fixes, win32 support, etc.
46 * Laurent DufrΓ©chou: many improvements to ipython-wx standalone app.
142 * Laurent DufrΓ©chou: many improvements to ipython-wx standalone app.
47 * Lukasz Pankowski: prefilter, `%edit`, demo improvements.
143 * Lukasz Pankowski: prefilter, `%edit`, demo improvements.
48 * Matt Foster: TextMate support in `%edit`.
144 * Matt Foster: TextMate support in `%edit`.
49 * Nathaniel Smith: fix #237073.
145 * Nathaniel Smith: fix #237073.
50 * Pauli Virtanen: fixes and improvements to extensions, documentation.
146 * Pauli Virtanen: fixes and improvements to extensions, documentation.
51 * Prabhu Ramachandran: improvements to `%timeit`.
147 * Prabhu Ramachandran: improvements to `%timeit`.
52 * Robert Kern: several extensions.
148 * Robert Kern: several extensions.
53 * Sameer D'Costa: help on critical bug #269966.
149 * Sameer D'Costa: help on critical bug #269966.
54 * Stephan Peijnik: feedback on Debian compliance and many man pages.
150 * Stephan Peijnik: feedback on Debian compliance and many man pages.
55 * Steven Bethard: we are now shipping his :mod:`argparse` module.
151 * Steven Bethard: we are now shipping his :mod:`argparse` module.
56 * Tom Fetherston: many improvements to :mod:`IPython.demo` module.
152 * Tom Fetherston: many improvements to :mod:`IPython.demo` module.
57 * Ville Vainio: lots of work everywhere (features, bug fixes, etc).
153 * Ville Vainio: lots of work everywhere (features, bug fixes, etc).
58 * Vishal Vasta: ssh support in ipcluster.
154 * Vishal Vasta: ssh support in ipcluster.
59 * Walter Doerwald: work on the :mod:`IPython.ipipe` system.
155 * Walter Doerwald: work on the :mod:`IPython.ipipe` system.
60
156
61 Below we give an overview of new features, bug fixes and backwards-incompatible
157 Below we give an overview of new features, bug fixes and backwards-incompatible
62 changes. For a detailed account of every change made, feel free to view the
158 changes. For a detailed account of every change made, feel free to view the
63 project log with :command:`bzr log`.
159 project log with :command:`bzr log`.
64
160
65 New features
161 New features
66 ------------
162 ------------
67
163
68 * New `%paste` magic automatically extracts current contents of clipboard and
164 * New `%paste` magic automatically extracts current contents of clipboard and
69 pastes it directly, while correctly handling code that is indented or
165 pastes it directly, while correctly handling code that is indented or
70 prepended with `>>>` or `...` python prompt markers. A very useful new
166 prepended with `>>>` or `...` python prompt markers. A very useful new
71 feature contributed by Robert Kern.
167 feature contributed by Robert Kern.
72
168
73 * IPython 'demos', created with the :mod:`IPython.demo` module, can now be
169 * IPython 'demos', created with the :mod:`IPython.demo` module, can now be
74 created from files on disk or strings in memory. Other fixes and
170 created from files on disk or strings in memory. Other fixes and
75 improvements to the demo system, by Tom Fetherston.
171 improvements to the demo system, by Tom Fetherston.
76
172
77 * Added :func:`find_cmd` function to :mod:`IPython.platutils` module, to find
173 * Added :func:`find_cmd` function to :mod:`IPython.platutils` module, to find
78 commands in a cross-platform manner.
174 commands in a cross-platform manner.
79
175
80 * Many improvements and fixes to GaΓ«l Varoquaux's :command:`ipythonx`, a
176 * Many improvements and fixes to GaΓ«l Varoquaux's :command:`ipythonx`, a
81 WX-based lightweight IPython instance that can be easily embedded in other WX
177 WX-based lightweight IPython instance that can be easily embedded in other WX
82 applications. These improvements have made it possible to now have an
178 applications. These improvements have made it possible to now have an
83 embedded IPython in Mayavi and other tools.
179 embedded IPython in Mayavi and other tools.
84
180
85 * :class:`MultiengineClient` objects now have a :meth:`benchmark` method.
181 * :class:`MultiengineClient` objects now have a :meth:`benchmark` method.
86
182
87 * The manual now includes a full set of auto-generated API documents from the
183 * The manual now includes a full set of auto-generated API documents from the
88 code sources, using Sphinx and some of our own support code. We are now
184 code sources, using Sphinx and some of our own support code. We are now
89 using the `Numpy Documentation Standard`_ for all docstrings, and we have
185 using the `Numpy Documentation Standard`_ for all docstrings, and we have
90 tried to update as many existing ones as possible to this format.
186 tried to update as many existing ones as possible to this format.
91
187
92 * The new :mod:`IPython.Extensions.ipy_pretty` extension by Robert Kern
188 * The new :mod:`IPython.Extensions.ipy_pretty` extension by Robert Kern
93 provides configurable pretty-printing.
189 provides configurable pretty-printing.
94
190
95 * Many improvements to the :command:`ipython-wx` standalone WX-based IPython
191 * Many improvements to the :command:`ipython-wx` standalone WX-based IPython
96 application by Laurent DufrΓ©chou. It can optionally run in a thread, and
192 application by Laurent DufrΓ©chou. It can optionally run in a thread, and
97 this can be toggled at runtime (allowing the loading of Matplotlib in a
193 this can be toggled at runtime (allowing the loading of Matplotlib in a
98 running session without ill effects).
194 running session without ill effects).
99
195
100 * IPython includes a copy of Steven Bethard's argparse_ in the
196 * IPython includes a copy of Steven Bethard's argparse_ in the
101 :mod:`IPython.external` package, so we can use it internally and it is also
197 :mod:`IPython.external` package, so we can use it internally and it is also
102 available to any IPython user. By installing it in this manner, we ensure
198 available to any IPython user. By installing it in this manner, we ensure
103 zero conflicts with any system-wide installation you may already have while
199 zero conflicts with any system-wide installation you may already have while
104 minimizing external dependencies for new users. In IPython 0.10, We ship
200 minimizing external dependencies for new users. In IPython 0.10, We ship
105 argparse version 1.0.
201 argparse version 1.0.
106
202
107 * An improved and much more robust test suite, that runs groups of tests in
203 * An improved and much more robust test suite, that runs groups of tests in
108 separate subprocesses using either Nose or Twisted's :command:`trial` runner
204 separate subprocesses using either Nose or Twisted's :command:`trial` runner
109 to ensure proper management of Twisted-using code. The test suite degrades
205 to ensure proper management of Twisted-using code. The test suite degrades
110 gracefully if optional dependencies are not available, so that the
206 gracefully if optional dependencies are not available, so that the
111 :command:`iptest` command can be run with only Nose installed and nothing
207 :command:`iptest` command can be run with only Nose installed and nothing
112 else. We also have more and cleaner test decorators to better select tests
208 else. We also have more and cleaner test decorators to better select tests
113 depending on runtime conditions, do setup/teardown, etc.
209 depending on runtime conditions, do setup/teardown, etc.
114
210
115 * The new ipcluster now has a fully working ssh mode that should work on
211 * The new ipcluster now has a fully working ssh mode that should work on
116 Linux, Unix and OS X. Thanks to Vishal Vatsa for implementing this!
212 Linux, Unix and OS X. Thanks to Vishal Vatsa for implementing this!
117
213
118 * The wonderful TextMate editor can now be used with %edit on OS X. Thanks
214 * The wonderful TextMate editor can now be used with %edit on OS X. Thanks
119 to Matt Foster for this patch.
215 to Matt Foster for this patch.
120
216
121 * The documentation regarding parallel uses of IPython, including MPI and PBS,
217 * The documentation regarding parallel uses of IPython, including MPI and PBS,
122 has been significantly updated and improved.
218 has been significantly updated and improved.
123
219
124 * The developer guidelines in the documentation have been updated to explain
220 * The developer guidelines in the documentation have been updated to explain
125 our workflow using :command:`bzr` and Launchpad.
221 our workflow using :command:`bzr` and Launchpad.
126
222
127 * Fully refactored :command:`ipcluster` command line program for starting
223 * Fully refactored :command:`ipcluster` command line program for starting
128 IPython clusters. This new version is a complete rewrite and 1) is fully
224 IPython clusters. This new version is a complete rewrite and 1) is fully
129 cross platform (we now use Twisted's process management), 2) has much
225 cross platform (we now use Twisted's process management), 2) has much
130 improved performance, 3) uses subcommands for different types of clusters, 4)
226 improved performance, 3) uses subcommands for different types of clusters, 4)
131 uses argparse for parsing command line options, 5) has better support for
227 uses argparse for parsing command line options, 5) has better support for
132 starting clusters using :command:`mpirun`, 6) has experimental support for
228 starting clusters using :command:`mpirun`, 6) has experimental support for
133 starting engines using PBS. It can also reuse FURL files, by appropriately
229 starting engines using PBS. It can also reuse FURL files, by appropriately
134 passing options to its subcommands. However, this new version of ipcluster
230 passing options to its subcommands. However, this new version of ipcluster
135 should be considered a technology preview. We plan on changing the API in
231 should be considered a technology preview. We plan on changing the API in
136 significant ways before it is final.
232 significant ways before it is final.
137
233
138 * Full description of the security model added to the docs.
234 * Full description of the security model added to the docs.
139
235
140 * cd completer: show bookmarks if no other completions are available.
236 * cd completer: show bookmarks if no other completions are available.
141
237
142 * sh profile: easy way to give 'title' to prompt: assign to variable
238 * sh profile: easy way to give 'title' to prompt: assign to variable
143 '_prompt_title'. It looks like this::
239 '_prompt_title'. It looks like this::
144
240
145 [~]|1> _prompt_title = 'sudo!'
241 [~]|1> _prompt_title = 'sudo!'
146 sudo![~]|2>
242 sudo![~]|2>
147
243
148 * %edit: If you do '%edit pasted_block', pasted_block variable gets updated
244 * %edit: If you do '%edit pasted_block', pasted_block variable gets updated
149 with new data (so repeated editing makes sense)
245 with new data (so repeated editing makes sense)
150
246
151 .. _Numpy Documentation Standard: http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines#docstring-standard
247 .. _Numpy Documentation Standard: http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines#docstring-standard
152
248
153 .. _argparse: http://code.google.com/p/argparse/
249 .. _argparse: http://code.google.com/p/argparse/
154
250
155 Bug fixes
251 Bug fixes
156 ---------
252 ---------
157
253
158 * Fix #368719, removed top-level debian/ directory to make the job of Debian
254 * Fix #368719, removed top-level debian/ directory to make the job of Debian
159 packagers easier.
255 packagers easier.
160
256
161 * Fix #291143 by including man pages contributed by Stephan Peijnik from the
257 * Fix #291143 by including man pages contributed by Stephan Peijnik from the
162 Debian project.
258 Debian project.
163
259
164 * Fix #358202, effectively a race condition, by properly synchronizing file
260 * Fix #358202, effectively a race condition, by properly synchronizing file
165 creation at cluster startup time.
261 creation at cluster startup time.
166
262
167 * `%timeit` now handles correctly functions that take a long time to execute
263 * `%timeit` now handles correctly functions that take a long time to execute
168 even the first time, by not repeating them.
264 even the first time, by not repeating them.
169
265
170 * Fix #239054, releasing of references after exiting.
266 * Fix #239054, releasing of references after exiting.
171
267
172 * Fix #341726, thanks to Alexander Clausen.
268 * Fix #341726, thanks to Alexander Clausen.
173
269
174 * Fix #269966. This long-standing and very difficult bug (which is actually a
270 * Fix #269966. This long-standing and very difficult bug (which is actually a
175 problem in Python itself) meant long-running sessions would inevitably grow
271 problem in Python itself) meant long-running sessions would inevitably grow
176 in memory size, often with catastrophic consequences if users had large
272 in memory size, often with catastrophic consequences if users had large
177 objects in their scripts. Now, using `%run` repeatedly should not cause any
273 objects in their scripts. Now, using `%run` repeatedly should not cause any
178 memory leaks. Special thanks to John Hunter and Sameer D'Costa for their
274 memory leaks. Special thanks to John Hunter and Sameer D'Costa for their
179 help with this bug.
275 help with this bug.
180
276
181 * Fix #295371, bug in `%history`.
277 * Fix #295371, bug in `%history`.
182
278
183 * Improved support for py2exe.
279 * Improved support for py2exe.
184
280
185 * Fix #270856: IPython hangs with PyGTK
281 * Fix #270856: IPython hangs with PyGTK
186
282
187 * Fix #270998: A magic with no docstring breaks the '%magic magic'
283 * Fix #270998: A magic with no docstring breaks the '%magic magic'
188
284
189 * fix #271684: -c startup commands screw up raw vs. native history
285 * fix #271684: -c startup commands screw up raw vs. native history
190
286
191 * Numerous bugs on Windows with the new ipcluster have been fixed.
287 * Numerous bugs on Windows with the new ipcluster have been fixed.
192
288
193 * The ipengine and ipcontroller scripts now handle missing furl files
289 * The ipengine and ipcontroller scripts now handle missing furl files
194 more gracefully by giving better error messages.
290 more gracefully by giving better error messages.
195
291
196 * %rehashx: Aliases no longer contain dots. python3.0 binary
292 * %rehashx: Aliases no longer contain dots. python3.0 binary
197 will create alias python30. Fixes:
293 will create alias python30. Fixes:
198 #259716 "commands with dots in them don't work"
294 #259716 "commands with dots in them don't work"
199
295
200 * %cpaste: %cpaste -r repeats the last pasted block.
296 * %cpaste: %cpaste -r repeats the last pasted block.
201 The block is assigned to pasted_block even if code
297 The block is assigned to pasted_block even if code
202 raises exception.
298 raises exception.
203
299
204 * Bug #274067 'The code in get_home_dir is broken for py2exe' was
300 * Bug #274067 'The code in get_home_dir is broken for py2exe' was
205 fixed.
301 fixed.
206
302
207 * Many other small bug fixes not listed here by number (see the bzr log for
303 * Many other small bug fixes not listed here by number (see the bzr log for
208 more info).
304 more info).
209
305
210 Backwards incompatible changes
306 Backwards incompatible changes
211 ------------------------------
307 ------------------------------
212
308
213 * `ipykit` and related files were unmaintained and have been removed.
309 * `ipykit` and related files were unmaintained and have been removed.
214
310
215 * The :func:`IPython.genutils.doctest_reload` does not actually call
311 * The :func:`IPython.genutils.doctest_reload` does not actually call
216 `reload(doctest)` anymore, as this was causing many problems with the test
312 `reload(doctest)` anymore, as this was causing many problems with the test
217 suite. It still resets `doctest.master` to None.
313 suite. It still resets `doctest.master` to None.
218
314
219 * While we have not deliberately broken Python 2.4 compatibility, only minor
315 * While we have not deliberately broken Python 2.4 compatibility, only minor
220 testing was done with Python 2.4, while 2.5 and 2.6 were fully tested. But
316 testing was done with Python 2.4, while 2.5 and 2.6 were fully tested. But
221 if you encounter problems with 2.4, please do report them as bugs.
317 if you encounter problems with 2.4, please do report them as bugs.
222
318
223 * The :command:`ipcluster` now requires a mode argument; for example to start a
319 * The :command:`ipcluster` now requires a mode argument; for example to start a
224 cluster on the local machine with 4 engines, you must now type::
320 cluster on the local machine with 4 engines, you must now type::
225
321
226 $ ipcluster local -n 4
322 $ ipcluster local -n 4
227
323
228 * The controller now has a ``-r`` flag that needs to be used if you want to
324 * The controller now has a ``-r`` flag that needs to be used if you want to
229 reuse existing furl files. Otherwise they are deleted (the default).
325 reuse existing furl files. Otherwise they are deleted (the default).
230
326
231 * Remove ipy_leo.py. You can use :command:`easy_install ipython-extension` to
327 * Remove ipy_leo.py. You can use :command:`easy_install ipython-extension` to
232 get it. (done to decouple it from ipython release cycle)
328 get it. (done to decouple it from ipython release cycle)
233
329
234
330
235 Release 0.9.1
331 Release 0.9.1
236 =============
332 =============
237
333
238 This release was quickly made to restore compatibility with Python 2.4, which
334 This release was quickly made to restore compatibility with Python 2.4, which
239 version 0.9 accidentally broke. No new features were introduced, other than
335 version 0.9 accidentally broke. No new features were introduced, other than
240 some additional testing support for internal use.
336 some additional testing support for internal use.
241
337
242
338
243 Release 0.9
339 Release 0.9
244 ===========
340 ===========
245
341
246 New features
342 New features
247 ------------
343 ------------
248
344
249 * All furl files and security certificates are now put in a read-only
345 * All furl files and security certificates are now put in a read-only
250 directory named ~./ipython/security.
346 directory named ~./ipython/security.
251
347
252 * A single function :func:`get_ipython_dir`, in :mod:`IPython.genutils` that
348 * A single function :func:`get_ipython_dir`, in :mod:`IPython.genutils` that
253 determines the user's IPython directory in a robust manner.
349 determines the user's IPython directory in a robust manner.
254
350
255 * Laurent's WX application has been given a top-level script called
351 * Laurent's WX application has been given a top-level script called
256 ipython-wx, and it has received numerous fixes. We expect this code to be
352 ipython-wx, and it has received numerous fixes. We expect this code to be
257 architecturally better integrated with Gael's WX 'ipython widget' over the
353 architecturally better integrated with Gael's WX 'ipython widget' over the
258 next few releases.
354 next few releases.
259
355
260 * The Editor synchronization work by Vivian De Smedt has been merged in. This
356 * The Editor synchronization work by Vivian De Smedt has been merged in. This
261 code adds a number of new editor hooks to synchronize with editors under
357 code adds a number of new editor hooks to synchronize with editors under
262 Windows.
358 Windows.
263
359
264 * A new, still experimental but highly functional, WX shell by Gael Varoquaux.
360 * A new, still experimental but highly functional, WX shell by Gael Varoquaux.
265 This work was sponsored by Enthought, and while it's still very new, it is
361 This work was sponsored by Enthought, and while it's still very new, it is
266 based on a more cleanly organized arhictecture of the various IPython
362 based on a more cleanly organized arhictecture of the various IPython
267 components. We will continue to develop this over the next few releases as a
363 components. We will continue to develop this over the next few releases as a
268 model for GUI components that use IPython.
364 model for GUI components that use IPython.
269
365
270 * Another GUI frontend, Cocoa based (Cocoa is the OSX native GUI framework),
366 * Another GUI frontend, Cocoa based (Cocoa is the OSX native GUI framework),
271 authored by Barry Wark. Currently the WX and the Cocoa ones have slightly
367 authored by Barry Wark. Currently the WX and the Cocoa ones have slightly
272 different internal organizations, but the whole team is working on finding
368 different internal organizations, but the whole team is working on finding
273 what the right abstraction points are for a unified codebase.
369 what the right abstraction points are for a unified codebase.
274
370
275 * As part of the frontend work, Barry Wark also implemented an experimental
371 * As part of the frontend work, Barry Wark also implemented an experimental
276 event notification system that various ipython components can use. In the
372 event notification system that various ipython components can use. In the
277 next release the implications and use patterns of this system regarding the
373 next release the implications and use patterns of this system regarding the
278 various GUI options will be worked out.
374 various GUI options will be worked out.
279
375
280 * IPython finally has a full test system, that can test docstrings with
376 * IPython finally has a full test system, that can test docstrings with
281 IPython-specific functionality. There are still a few pieces missing for it
377 IPython-specific functionality. There are still a few pieces missing for it
282 to be widely accessible to all users (so they can run the test suite at any
378 to be widely accessible to all users (so they can run the test suite at any
283 time and report problems), but it now works for the developers. We are
379 time and report problems), but it now works for the developers. We are
284 working hard on continuing to improve it, as this was probably IPython's
380 working hard on continuing to improve it, as this was probably IPython's
285 major Achilles heel (the lack of proper test coverage made it effectively
381 major Achilles heel (the lack of proper test coverage made it effectively
286 impossible to do large-scale refactoring). The full test suite can now
382 impossible to do large-scale refactoring). The full test suite can now
287 be run using the :command:`iptest` command line program.
383 be run using the :command:`iptest` command line program.
288
384
289 * The notion of a task has been completely reworked. An `ITask` interface has
385 * The notion of a task has been completely reworked. An `ITask` interface has
290 been created. This interface defines the methods that tasks need to
386 been created. This interface defines the methods that tasks need to
291 implement. These methods are now responsible for things like submitting
387 implement. These methods are now responsible for things like submitting
292 tasks and processing results. There are two basic task types:
388 tasks and processing results. There are two basic task types:
293 :class:`IPython.kernel.task.StringTask` (this is the old `Task` object, but
389 :class:`IPython.kernel.task.StringTask` (this is the old `Task` object, but
294 renamed) and the new :class:`IPython.kernel.task.MapTask`, which is based on
390 renamed) and the new :class:`IPython.kernel.task.MapTask`, which is based on
295 a function.
391 a function.
296
392
297 * A new interface, :class:`IPython.kernel.mapper.IMapper` has been defined to
393 * A new interface, :class:`IPython.kernel.mapper.IMapper` has been defined to
298 standardize the idea of a `map` method. This interface has a single `map`
394 standardize the idea of a `map` method. This interface has a single `map`
299 method that has the same syntax as the built-in `map`. We have also defined
395 method that has the same syntax as the built-in `map`. We have also defined
300 a `mapper` factory interface that creates objects that implement
396 a `mapper` factory interface that creates objects that implement
301 :class:`IPython.kernel.mapper.IMapper` for different controllers. Both the
397 :class:`IPython.kernel.mapper.IMapper` for different controllers. Both the
302 multiengine and task controller now have mapping capabilties.
398 multiengine and task controller now have mapping capabilties.
303
399
304 * The parallel function capabilities have been reworks. The major changes are
400 * The parallel function capabilities have been reworks. The major changes are
305 that i) there is now an `@parallel` magic that creates parallel functions,
401 that i) there is now an `@parallel` magic that creates parallel functions,
306 ii) the syntax for mulitple variable follows that of `map`, iii) both the
402 ii) the syntax for mulitple variable follows that of `map`, iii) both the
307 multiengine and task controller now have a parallel function implementation.
403 multiengine and task controller now have a parallel function implementation.
308
404
309 * All of the parallel computing capabilities from `ipython1-dev` have been
405 * All of the parallel computing capabilities from `ipython1-dev` have been
310 merged into IPython proper. This resulted in the following new subpackages:
406 merged into IPython proper. This resulted in the following new subpackages:
311 :mod:`IPython.kernel`, :mod:`IPython.kernel.core`, :mod:`IPython.config`,
407 :mod:`IPython.kernel`, :mod:`IPython.kernel.core`, :mod:`IPython.config`,
312 :mod:`IPython.tools` and :mod:`IPython.testing`.
408 :mod:`IPython.tools` and :mod:`IPython.testing`.
313
409
314 * As part of merging in the `ipython1-dev` stuff, the `setup.py` script and
410 * As part of merging in the `ipython1-dev` stuff, the `setup.py` script and
315 friends have been completely refactored. Now we are checking for
411 friends have been completely refactored. Now we are checking for
316 dependencies using the approach that matplotlib uses.
412 dependencies using the approach that matplotlib uses.
317
413
318 * The documentation has been completely reorganized to accept the
414 * The documentation has been completely reorganized to accept the
319 documentation from `ipython1-dev`.
415 documentation from `ipython1-dev`.
320
416
321 * We have switched to using Foolscap for all of our network protocols in
417 * We have switched to using Foolscap for all of our network protocols in
322 :mod:`IPython.kernel`. This gives us secure connections that are both
418 :mod:`IPython.kernel`. This gives us secure connections that are both
323 encrypted and authenticated.
419 encrypted and authenticated.
324
420
325 * We have a brand new `COPYING.txt` files that describes the IPython license
421 * We have a brand new `COPYING.txt` files that describes the IPython license
326 and copyright. The biggest change is that we are putting "The IPython
422 and copyright. The biggest change is that we are putting "The IPython
327 Development Team" as the copyright holder. We give more details about
423 Development Team" as the copyright holder. We give more details about
328 exactly what this means in this file. All developer should read this and use
424 exactly what this means in this file. All developer should read this and use
329 the new banner in all IPython source code files.
425 the new banner in all IPython source code files.
330
426
331 * sh profile: ./foo runs foo as system command, no need to do !./foo anymore
427 * sh profile: ./foo runs foo as system command, no need to do !./foo anymore
332
428
333 * String lists now support ``sort(field, nums = True)`` method (to easily sort
429 * String lists now support ``sort(field, nums = True)`` method (to easily sort
334 system command output). Try it with ``a = !ls -l ; a.sort(1, nums=1)``.
430 system command output). Try it with ``a = !ls -l ; a.sort(1, nums=1)``.
335
431
336 * '%cpaste foo' now assigns the pasted block as string list, instead of string
432 * '%cpaste foo' now assigns the pasted block as string list, instead of string
337
433
338 * The ipcluster script now run by default with no security. This is done
434 * The ipcluster script now run by default with no security. This is done
339 because the main usage of the script is for starting things on localhost.
435 because the main usage of the script is for starting things on localhost.
340 Eventually when ipcluster is able to start things on other hosts, we will put
436 Eventually when ipcluster is able to start things on other hosts, we will put
341 security back.
437 security back.
342
438
343 * 'cd --foo' searches directory history for string foo, and jumps to that dir.
439 * 'cd --foo' searches directory history for string foo, and jumps to that dir.
344 Last part of dir name is checked first. If no matches for that are found,
440 Last part of dir name is checked first. If no matches for that are found,
345 look at the whole path.
441 look at the whole path.
346
442
347
443
348 Bug fixes
444 Bug fixes
349 ---------
445 ---------
350
446
351 * The Windows installer has been fixed. Now all IPython scripts have ``.bat``
447 * The Windows installer has been fixed. Now all IPython scripts have ``.bat``
352 versions created. Also, the Start Menu shortcuts have been updated.
448 versions created. Also, the Start Menu shortcuts have been updated.
353
449
354 * The colors escapes in the multiengine client are now turned off on win32 as
450 * The colors escapes in the multiengine client are now turned off on win32 as
355 they don't print correctly.
451 they don't print correctly.
356
452
357 * The :mod:`IPython.kernel.scripts.ipengine` script was exec'ing
453 * The :mod:`IPython.kernel.scripts.ipengine` script was exec'ing
358 mpi_import_statement incorrectly, which was leading the engine to crash when
454 mpi_import_statement incorrectly, which was leading the engine to crash when
359 mpi was enabled.
455 mpi was enabled.
360
456
361 * A few subpackages had missing ``__init__.py`` files.
457 * A few subpackages had missing ``__init__.py`` files.
362
458
363 * The documentation is only created if Sphinx is found. Previously, the
459 * The documentation is only created if Sphinx is found. Previously, the
364 ``setup.py`` script would fail if it was missing.
460 ``setup.py`` script would fail if it was missing.
365
461
366 * Greedy ``cd`` completion has been disabled again (it was enabled in 0.8.4) as
462 * Greedy ``cd`` completion has been disabled again (it was enabled in 0.8.4) as
367 it caused problems on certain platforms.
463 it caused problems on certain platforms.
368
464
369
465
370 Backwards incompatible changes
466 Backwards incompatible changes
371 ------------------------------
467 ------------------------------
372
468
373 * The ``clusterfile`` options of the :command:`ipcluster` command has been
469 * The ``clusterfile`` options of the :command:`ipcluster` command has been
374 removed as it was not working and it will be replaced soon by something much
470 removed as it was not working and it will be replaced soon by something much
375 more robust.
471 more robust.
376
472
377 * The :mod:`IPython.kernel` configuration now properly find the user's
473 * The :mod:`IPython.kernel` configuration now properly find the user's
378 IPython directory.
474 IPython directory.
379
475
380 * In ipapi, the :func:`make_user_ns` function has been replaced with
476 * In ipapi, the :func:`make_user_ns` function has been replaced with
381 :func:`make_user_namespaces`, to support dict subclasses in namespace
477 :func:`make_user_namespaces`, to support dict subclasses in namespace
382 creation.
478 creation.
383
479
384 * :class:`IPython.kernel.client.Task` has been renamed
480 * :class:`IPython.kernel.client.Task` has been renamed
385 :class:`IPython.kernel.client.StringTask` to make way for new task types.
481 :class:`IPython.kernel.client.StringTask` to make way for new task types.
386
482
387 * The keyword argument `style` has been renamed `dist` in `scatter`, `gather`
483 * The keyword argument `style` has been renamed `dist` in `scatter`, `gather`
388 and `map`.
484 and `map`.
389
485
390 * Renamed the values that the rename `dist` keyword argument can have from
486 * Renamed the values that the rename `dist` keyword argument can have from
391 `'basic'` to `'b'`.
487 `'basic'` to `'b'`.
392
488
393 * IPython has a larger set of dependencies if you want all of its capabilities.
489 * IPython has a larger set of dependencies if you want all of its capabilities.
394 See the `setup.py` script for details.
490 See the `setup.py` script for details.
395
491
396 * The constructors for :class:`IPython.kernel.client.MultiEngineClient` and
492 * The constructors for :class:`IPython.kernel.client.MultiEngineClient` and
397 :class:`IPython.kernel.client.TaskClient` no longer take the (ip,port) tuple.
493 :class:`IPython.kernel.client.TaskClient` no longer take the (ip,port) tuple.
398 Instead they take the filename of a file that contains the FURL for that
494 Instead they take the filename of a file that contains the FURL for that
399 client. If the FURL file is in your IPYTHONDIR, it will be found automatically
495 client. If the FURL file is in your IPYTHONDIR, it will be found automatically
400 and the constructor can be left empty.
496 and the constructor can be left empty.
401
497
402 * The asynchronous clients in :mod:`IPython.kernel.asyncclient` are now created
498 * The asynchronous clients in :mod:`IPython.kernel.asyncclient` are now created
403 using the factory functions :func:`get_multiengine_client` and
499 using the factory functions :func:`get_multiengine_client` and
404 :func:`get_task_client`. These return a `Deferred` to the actual client.
500 :func:`get_task_client`. These return a `Deferred` to the actual client.
405
501
406 * The command line options to `ipcontroller` and `ipengine` have changed to
502 * The command line options to `ipcontroller` and `ipengine` have changed to
407 reflect the new Foolscap network protocol and the FURL files. Please see the
503 reflect the new Foolscap network protocol and the FURL files. Please see the
408 help for these scripts for details.
504 help for these scripts for details.
409
505
410 * The configuration files for the kernel have changed because of the Foolscap
506 * The configuration files for the kernel have changed because of the Foolscap
411 stuff. If you were using custom config files before, you should delete them
507 stuff. If you were using custom config files before, you should delete them
412 and regenerate new ones.
508 and regenerate new ones.
413
509
414 Changes merged in from IPython1
510 Changes merged in from IPython1
415 -------------------------------
511 -------------------------------
416
512
417 New features
513 New features
418 ............
514 ............
419
515
420 * Much improved ``setup.py`` and ``setupegg.py`` scripts. Because Twisted and
516 * Much improved ``setup.py`` and ``setupegg.py`` scripts. Because Twisted and
421 zope.interface are now easy installable, we can declare them as dependencies
517 zope.interface are now easy installable, we can declare them as dependencies
422 in our setupegg.py script.
518 in our setupegg.py script.
423
519
424 * IPython is now compatible with Twisted 2.5.0 and 8.x.
520 * IPython is now compatible with Twisted 2.5.0 and 8.x.
425
521
426 * Added a new example of how to use :mod:`ipython1.kernel.asynclient`.
522 * Added a new example of how to use :mod:`ipython1.kernel.asynclient`.
427
523
428 * Initial draft of a process daemon in :mod:`ipython1.daemon`. This has not
524 * Initial draft of a process daemon in :mod:`ipython1.daemon`. This has not
429 been merged into IPython and is still in `ipython1-dev`.
525 been merged into IPython and is still in `ipython1-dev`.
430
526
431 * The ``TaskController`` now has methods for getting the queue status.
527 * The ``TaskController`` now has methods for getting the queue status.
432
528
433 * The ``TaskResult`` objects not have information about how long the task
529 * The ``TaskResult`` objects not have information about how long the task
434 took to run.
530 took to run.
435
531
436 * We are attaching additional attributes to exceptions ``(_ipython_*)`` that
532 * We are attaching additional attributes to exceptions ``(_ipython_*)`` that
437 we use to carry additional info around.
533 we use to carry additional info around.
438
534
439 * New top-level module :mod:`asyncclient` that has asynchronous versions (that
535 * New top-level module :mod:`asyncclient` that has asynchronous versions (that
440 return deferreds) of the client classes. This is designed to users who want
536 return deferreds) of the client classes. This is designed to users who want
441 to run their own Twisted reactor.
537 to run their own Twisted reactor.
442
538
443 * All the clients in :mod:`client` are now based on Twisted. This is done by
539 * All the clients in :mod:`client` are now based on Twisted. This is done by
444 running the Twisted reactor in a separate thread and using the
540 running the Twisted reactor in a separate thread and using the
445 :func:`blockingCallFromThread` function that is in recent versions of Twisted.
541 :func:`blockingCallFromThread` function that is in recent versions of Twisted.
446
542
447 * Functions can now be pushed/pulled to/from engines using
543 * Functions can now be pushed/pulled to/from engines using
448 :meth:`MultiEngineClient.push_function` and
544 :meth:`MultiEngineClient.push_function` and
449 :meth:`MultiEngineClient.pull_function`.
545 :meth:`MultiEngineClient.pull_function`.
450
546
451 * Gather/scatter are now implemented in the client to reduce the work load
547 * Gather/scatter are now implemented in the client to reduce the work load
452 of the controller and improve performance.
548 of the controller and improve performance.
453
549
454 * Complete rewrite of the IPython docuementation. All of the documentation
550 * Complete rewrite of the IPython docuementation. All of the documentation
455 from the IPython website has been moved into docs/source as restructured
551 from the IPython website has been moved into docs/source as restructured
456 text documents. PDF and HTML documentation are being generated using
552 text documents. PDF and HTML documentation are being generated using
457 Sphinx.
553 Sphinx.
458
554
459 * New developer oriented documentation: development guidelines and roadmap.
555 * New developer oriented documentation: development guidelines and roadmap.
460
556
461 * Traditional ``ChangeLog`` has been changed to a more useful ``changes.txt``
557 * Traditional ``ChangeLog`` has been changed to a more useful ``changes.txt``
462 file that is organized by release and is meant to provide something more
558 file that is organized by release and is meant to provide something more
463 relevant for users.
559 relevant for users.
464
560
465 Bug fixes
561 Bug fixes
466 .........
562 .........
467
563
468 * Created a proper ``MANIFEST.in`` file to create source distributions.
564 * Created a proper ``MANIFEST.in`` file to create source distributions.
469
565
470 * Fixed a bug in the ``MultiEngine`` interface. Previously, multi-engine
566 * Fixed a bug in the ``MultiEngine`` interface. Previously, multi-engine
471 actions were being collected with a :class:`DeferredList` with
567 actions were being collected with a :class:`DeferredList` with
472 ``fireononeerrback=1``. This meant that methods were returning
568 ``fireononeerrback=1``. This meant that methods were returning
473 before all engines had given their results. This was causing extremely odd
569 before all engines had given their results. This was causing extremely odd
474 bugs in certain cases. To fix this problem, we have 1) set
570 bugs in certain cases. To fix this problem, we have 1) set
475 ``fireononeerrback=0`` to make sure all results (or exceptions) are in
571 ``fireononeerrback=0`` to make sure all results (or exceptions) are in
476 before returning and 2) introduced a :exc:`CompositeError` exception
572 before returning and 2) introduced a :exc:`CompositeError` exception
477 that wraps all of the engine exceptions. This is a huge change as it means
573 that wraps all of the engine exceptions. This is a huge change as it means
478 that users will have to catch :exc:`CompositeError` rather than the actual
574 that users will have to catch :exc:`CompositeError` rather than the actual
479 exception.
575 exception.
480
576
481 Backwards incompatible changes
577 Backwards incompatible changes
482 ..............................
578 ..............................
483
579
484 * All names have been renamed to conform to the lowercase_with_underscore
580 * All names have been renamed to conform to the lowercase_with_underscore
485 convention. This will require users to change references to all names like
581 convention. This will require users to change references to all names like
486 ``queueStatus`` to ``queue_status``.
582 ``queueStatus`` to ``queue_status``.
487
583
488 * Previously, methods like :meth:`MultiEngineClient.push` and
584 * Previously, methods like :meth:`MultiEngineClient.push` and
489 :meth:`MultiEngineClient.push` used ``*args`` and ``**kwargs``. This was
585 :meth:`MultiEngineClient.push` used ``*args`` and ``**kwargs``. This was
490 becoming a problem as we weren't able to introduce new keyword arguments into
586 becoming a problem as we weren't able to introduce new keyword arguments into
491 the API. Now these methods simple take a dict or sequence. This has also
587 the API. Now these methods simple take a dict or sequence. This has also
492 allowed us to get rid of the ``*All`` methods like :meth:`pushAll` and
588 allowed us to get rid of the ``*All`` methods like :meth:`pushAll` and
493 :meth:`pullAll`. These things are now handled with the ``targets`` keyword
589 :meth:`pullAll`. These things are now handled with the ``targets`` keyword
494 argument that defaults to ``'all'``.
590 argument that defaults to ``'all'``.
495
591
496 * The :attr:`MultiEngineClient.magicTargets` has been renamed to
592 * The :attr:`MultiEngineClient.magicTargets` has been renamed to
497 :attr:`MultiEngineClient.targets`.
593 :attr:`MultiEngineClient.targets`.
498
594
499 * All methods in the MultiEngine interface now accept the optional keyword
595 * All methods in the MultiEngine interface now accept the optional keyword
500 argument ``block``.
596 argument ``block``.
501
597
502 * Renamed :class:`RemoteController` to :class:`MultiEngineClient` and
598 * Renamed :class:`RemoteController` to :class:`MultiEngineClient` and
503 :class:`TaskController` to :class:`TaskClient`.
599 :class:`TaskController` to :class:`TaskClient`.
504
600
505 * Renamed the top-level module from :mod:`api` to :mod:`client`.
601 * Renamed the top-level module from :mod:`api` to :mod:`client`.
506
602
507 * Most methods in the multiengine interface now raise a :exc:`CompositeError`
603 * Most methods in the multiengine interface now raise a :exc:`CompositeError`
508 exception that wraps the user's exceptions, rather than just raising the raw
604 exception that wraps the user's exceptions, rather than just raising the raw
509 user's exception.
605 user's exception.
510
606
511 * Changed the ``setupNS`` and ``resultNames`` in the ``Task`` class to ``push``
607 * Changed the ``setupNS`` and ``resultNames`` in the ``Task`` class to ``push``
512 and ``pull``.
608 and ``pull``.
513
609
514
610
515 Release 0.8.4
611 Release 0.8.4
516 =============
612 =============
517
613
518 This was a quick release to fix an unfortunate bug that slipped into the 0.8.3
614 This was a quick release to fix an unfortunate bug that slipped into the 0.8.3
519 release. The ``--twisted`` option was disabled, as it turned out to be broken
615 release. The ``--twisted`` option was disabled, as it turned out to be broken
520 across several platforms.
616 across several platforms.
521
617
522
618
523 Release 0.8.3
619 Release 0.8.3
524 =============
620 =============
525
621
526 * pydb is now disabled by default (due to %run -d problems). You can enable
622 * pydb is now disabled by default (due to %run -d problems). You can enable
527 it by passing -pydb command line argument to IPython. Note that setting
623 it by passing -pydb command line argument to IPython. Note that setting
528 it in config file won't work.
624 it in config file won't work.
529
625
530
626
531 Release 0.8.2
627 Release 0.8.2
532 =============
628 =============
533
629
534 * %pushd/%popd behave differently; now "pushd /foo" pushes CURRENT directory
630 * %pushd/%popd behave differently; now "pushd /foo" pushes CURRENT directory
535 and jumps to /foo. The current behaviour is closer to the documented
631 and jumps to /foo. The current behaviour is closer to the documented
536 behaviour, and should not trip anyone.
632 behaviour, and should not trip anyone.
537
633
538
634
539 Older releases
635 Older releases
540 ==============
636 ==============
541
637
542 Changes in earlier releases of IPython are described in the older file
638 Changes in earlier releases of IPython are described in the older file
543 ``ChangeLog``. Please refer to this document for details.
639 ``ChangeLog``. Please refer to this document for details.
544
640
@@ -1,38 +1,38 b''
1 .. _history:
1 .. _history:
2
2
3 =======
3 =======
4 History
4 History
5 =======
5 =======
6
6
7 Origins
7 Origins
8 =======
8 =======
9
9
10 IPython was starting in 2001 by Fernando Perez. IPython as we know it
10 IPython was started in 2001 by Fernando Perez. IPython as we know it
11 today grew out of the following three projects:
11 today grew out of the following three projects:
12
12
13 * ipython by Fernando PΓ©rez. I was working on adding
13 * ipython by Fernando PΓ©rez. I was working on adding
14 Mathematica-type prompts and a flexible configuration system
14 Mathematica-type prompts and a flexible configuration system
15 (something better than $PYTHONSTARTUP) to the standard Python
15 (something better than $PYTHONSTARTUP) to the standard Python
16 interactive interpreter.
16 interactive interpreter.
17 * IPP by Janko Hauser. Very well organized, great usability. Had
17 * IPP by Janko Hauser. Very well organized, great usability. Had
18 an old help system. IPP was used as the 'container' code into
18 an old help system. IPP was used as the 'container' code into
19 which I added the functionality from ipython and LazyPython.
19 which I added the functionality from ipython and LazyPython.
20 * LazyPython by Nathan Gray. Simple but very powerful. The quick
20 * LazyPython by Nathan Gray. Simple but very powerful. The quick
21 syntax (auto parens, auto quotes) and verbose/colored tracebacks
21 syntax (auto parens, auto quotes) and verbose/colored tracebacks
22 were all taken from here.
22 were all taken from here.
23
23
24 Here is how Fernando describes it:
24 Here is how Fernando describes it:
25
25
26 When I found out about IPP and LazyPython I tried to join all three
26 When I found out about IPP and LazyPython I tried to join all three
27 into a unified system. I thought this could provide a very nice
27 into a unified system. I thought this could provide a very nice
28 working environment, both for regular programming and scientific
28 working environment, both for regular programming and scientific
29 computing: shell-like features, IDL/Matlab numerics, Mathematica-type
29 computing: shell-like features, IDL/Matlab numerics, Mathematica-type
30 prompt history and great object introspection and help facilities. I
30 prompt history and great object introspection and help facilities. I
31 think it worked reasonably well, though it was a lot more work than I
31 think it worked reasonably well, though it was a lot more work than I
32 had initially planned.
32 had initially planned.
33
33
34 Today and how we got here
34 Today and how we got here
35 =========================
35 =========================
36
36
37 This needs to be filled in.
37 This needs to be filled in.
38
38
@@ -1,116 +1,117 b''
1 """
1 """
2 ========
2 ========
3 numpydoc
3 numpydoc
4 ========
4 ========
5
5
6 Sphinx extension that handles docstrings in the Numpy standard format. [1]
6 Sphinx extension that handles docstrings in the Numpy standard format. [1]
7
7
8 It will:
8 It will:
9
9
10 - Convert Parameters etc. sections to field lists.
10 - Convert Parameters etc. sections to field lists.
11 - Convert See Also section to a See also entry.
11 - Convert See Also section to a See also entry.
12 - Renumber references.
12 - Renumber references.
13 - Extract the signature from the docstring, if it can't be determined otherwise.
13 - Extract the signature from the docstring, if it can't be determined otherwise.
14
14
15 .. [1] http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines#docstring-standard
15 .. [1] http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines#docstring-standard
16
16
17 """
17 """
18
18
19 import os, re, pydoc
19 import os, re, pydoc
20 from docscrape_sphinx import get_doc_object, SphinxDocString
20 from docscrape_sphinx import get_doc_object, SphinxDocString
21 import inspect
21 import inspect
22
22
23 def mangle_docstrings(app, what, name, obj, options, lines,
23 def mangle_docstrings(app, what, name, obj, options, lines,
24 reference_offset=[0]):
24 reference_offset=[0]):
25 if what == 'module':
25 if what == 'module':
26 # Strip top title
26 # Strip top title
27 title_re = re.compile(r'^\s*[#*=]{4,}\n[a-z0-9 -]+\n[#*=]{4,}\s*',
27 title_re = re.compile(r'^\s*[#*=]{4,}\n[a-z0-9 -]+\n[#*=]{4,}\s*',
28 re.I|re.S)
28 re.I|re.S)
29 lines[:] = title_re.sub('', "\n".join(lines)).split("\n")
29 lines[:] = title_re.sub('', "\n".join(lines)).split("\n")
30 else:
30 else:
31 doc = get_doc_object(obj, what, "\n".join(lines))
31 doc = get_doc_object(obj, what, "\n".join(lines))
32 lines[:] = str(doc).split("\n")
32 lines[:] = str(doc).split("\n")
33
33
34 if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and \
34 if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and \
35 obj.__name__:
35 obj.__name__:
36 if hasattr(obj, '__module__'):
36 if hasattr(obj, '__module__'):
37 v = dict(full_name="%s.%s" % (obj.__module__, obj.__name__))
37 v = dict(full_name="%s.%s" % (obj.__module__, obj.__name__))
38 else:
38 else:
39 v = dict(full_name=obj.__name__)
39 v = dict(full_name=obj.__name__)
40 lines += ['', '.. htmlonly::', '']
40 lines += ['', '.. htmlonly::', '']
41 lines += [' %s' % x for x in
41 lines += [' %s' % x for x in
42 (app.config.numpydoc_edit_link % v).split("\n")]
42 (app.config.numpydoc_edit_link % v).split("\n")]
43
43
44 # replace reference numbers so that there are no duplicates
44 # replace reference numbers so that there are no duplicates
45 references = []
45 references = []
46 for l in lines:
46 for l in lines:
47 l = l.strip()
47 l = l.strip()
48 if l.startswith('.. ['):
48 if l.startswith('.. ['):
49 try:
49 try:
50 references.append(int(l[len('.. ['):l.index(']')]))
50 references.append(int(l[len('.. ['):l.index(']')]))
51 except ValueError:
51 except ValueError:
52 print "WARNING: invalid reference in %s docstring" % name
52 print "WARNING: invalid reference in %s docstring" % name
53
53
54 # Start renaming from the biggest number, otherwise we may
54 # Start renaming from the biggest number, otherwise we may
55 # overwrite references.
55 # overwrite references.
56 references.sort()
56 references.sort()
57 if references:
57 if references:
58 for i, line in enumerate(lines):
58 for i, line in enumerate(lines):
59 for r in references:
59 for r in references:
60 new_r = reference_offset[0] + r
60 new_r = reference_offset[0] + r
61 lines[i] = lines[i].replace('[%d]_' % r,
61 lines[i] = lines[i].replace('[%d]_' % r,
62 '[%d]_' % new_r)
62 '[%d]_' % new_r)
63 lines[i] = lines[i].replace('.. [%d]' % r,
63 lines[i] = lines[i].replace('.. [%d]' % r,
64 '.. [%d]' % new_r)
64 '.. [%d]' % new_r)
65
65
66 reference_offset[0] += len(references)
66 reference_offset[0] += len(references)
67
67
68 def mangle_signature(app, what, name, obj, options, sig, retann):
68 def mangle_signature(app, what, name, obj, options, sig, retann):
69 # Do not try to inspect classes that don't define `__init__`
69 # Do not try to inspect classes that don't define `__init__`
70 if (inspect.isclass(obj) and
70 init = getattr(obj, '__init__', None)
71 'initializes x; see ' in pydoc.getdoc(obj.__init__)):
71 if (init is not None and
72 'initializes x; see ' in pydoc.getdoc(init)):
72 return '', ''
73 return '', ''
73
74
74 if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')): return
75 if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')): return
75 if not hasattr(obj, '__doc__'): return
76 if not hasattr(obj, '__doc__'): return
76
77
77 doc = SphinxDocString(pydoc.getdoc(obj))
78 doc = SphinxDocString(pydoc.getdoc(obj))
78 if doc['Signature']:
79 if doc['Signature']:
79 sig = re.sub("^[^(]*", "", doc['Signature'])
80 sig = re.sub("^[^(]*", "", doc['Signature'])
80 return sig, ''
81 return sig, ''
81
82
82 def initialize(app):
83 def initialize(app):
83 try:
84 try:
84 app.connect('autodoc-process-signature', mangle_signature)
85 app.connect('autodoc-process-signature', mangle_signature)
85 except:
86 except:
86 monkeypatch_sphinx_ext_autodoc()
87 monkeypatch_sphinx_ext_autodoc()
87
88
88 def setup(app, get_doc_object_=get_doc_object):
89 def setup(app, get_doc_object_=get_doc_object):
89 global get_doc_object
90 global get_doc_object
90 get_doc_object = get_doc_object_
91 get_doc_object = get_doc_object_
91
92
92 app.connect('autodoc-process-docstring', mangle_docstrings)
93 app.connect('autodoc-process-docstring', mangle_docstrings)
93 app.connect('builder-inited', initialize)
94 app.connect('builder-inited', initialize)
94 app.add_config_value('numpydoc_edit_link', None, True)
95 app.add_config_value('numpydoc_edit_link', None, True)
95
96
96 #------------------------------------------------------------------------------
97 #------------------------------------------------------------------------------
97 # Monkeypatch sphinx.ext.autodoc to accept argspecless autodocs (Sphinx < 0.5)
98 # Monkeypatch sphinx.ext.autodoc to accept argspecless autodocs (Sphinx < 0.5)
98 #------------------------------------------------------------------------------
99 #------------------------------------------------------------------------------
99
100
100 def monkeypatch_sphinx_ext_autodoc():
101 def monkeypatch_sphinx_ext_autodoc():
101 global _original_format_signature
102 global _original_format_signature
102 import sphinx.ext.autodoc
103 import sphinx.ext.autodoc
103
104
104 if sphinx.ext.autodoc.format_signature is our_format_signature:
105 if sphinx.ext.autodoc.format_signature is our_format_signature:
105 return
106 return
106
107
107 print "[numpydoc] Monkeypatching sphinx.ext.autodoc ..."
108 print "[numpydoc] Monkeypatching sphinx.ext.autodoc ..."
108 _original_format_signature = sphinx.ext.autodoc.format_signature
109 _original_format_signature = sphinx.ext.autodoc.format_signature
109 sphinx.ext.autodoc.format_signature = our_format_signature
110 sphinx.ext.autodoc.format_signature = our_format_signature
110
111
111 def our_format_signature(what, obj):
112 def our_format_signature(what, obj):
112 r = mangle_signature(None, what, None, obj, None, None, None)
113 r = mangle_signature(None, what, None, obj, None, None, None)
113 if r is not None:
114 if r is not None:
114 return r[0]
115 return r[0]
115 else:
116 else:
116 return _original_format_signature(what, obj)
117 return _original_format_signature(what, obj)
@@ -1,35 +1,37 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 """IPython release build script.
2 """IPython release build script.
3 """
3 """
4 from toollib import *
4 from toollib import *
5
5
6 # Get main ipython dir, this will raise if it doesn't pass some checks
6 # Get main ipython dir, this will raise if it doesn't pass some checks
7 ipdir = get_ipdir()
7 ipdir = get_ipdir()
8 cd(ipdir)
8 cd(ipdir)
9
9
10 # Load release info
10 # Load release info
11 execfile(pjoin('IPython','Release.py'))
11 execfile(pjoin('IPython','Release.py'))
12
12
13 # Check that everything compiles
13 # Check that everything compiles
14 compile_tree()
14 compile_tree()
15
15
16 # Cleanup
16 # Cleanup
17 for d in ['build','dist',pjoin('docs','build'),pjoin('docs','dist')]:
17 for d in ['build','dist',pjoin('docs','build'),pjoin('docs','dist'),
18 pjoin('docs','source','api','generated')]:
18 if os.path.isdir(d):
19 if os.path.isdir(d):
19 remove_tree(d)
20 remove_tree(d)
20
21
21 # Build source and binary distros
22 # Build source and binary distros
22 c('./setup.py sdist --formats=gztar,zip')
23 c('./setup.py sdist --formats=gztar,zip')
23
24
25
24 # Build eggs
26 # Build eggs
25 c('python2.5 ./setupegg.py bdist_egg')
27 #c('python2.5 ./setupegg.py bdist_egg')
26 c('python2.6 ./setupegg.py bdist_egg')
28 c('python2.6 ./setupegg.py bdist_egg')
27
29
28 # Call the windows build separately, so that the extra Windows scripts don't
30 # Call the windows build separately, so that the extra Windows scripts don't
29 # get pulled into Unix builds (setup.py has code which checks for
31 # get pulled into Unix builds (setup.py has code which checks for
30 # bdist_wininst)
32 # bdist_wininst)
31 c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py")
33 c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py")
32
34
33 # Change name so retarded Vista runs the installer correctly
35 # Change name so retarded Vista runs the installer correctly
34 c("rename 's/linux-i686/win32-setup/' dist/*.exe")
36 c("rename 's/linux-i686/win32-setup/' dist/*.exe")
35 c("rename 's/linux-x86_64/win32-setup/' dist/*.exe")
37 c("rename 's/linux-x86_64/win32-setup/' dist/*.exe")
@@ -1,21 +1,25 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 """Simple script to create a tarball with proper bzr version info.
2 """Simple script to create a tarball with proper git info.
3 """
3 """
4
4
5 import commands
5 import os
6 import os
6 import sys
7 import sys
7 import shutil
8 import shutil
8
9
9 from toollib import *
10 from toollib import *
10
11
11 execfile('../IPython/Release.py') # defines version_base
12 tag = commands.getoutput('git describe')
13 base_name = 'ipython-%s' % tag
14 tar_name = '%s.tgz' % base_name
12
15
13 ver = version_info()
16 # git archive is weird: Even if I give it a specific path, it still won't
17 # archive the whole tree. It seems the only way to get the whole tree is to cd
18 # to the top of the tree. There are long threads (since 2007) on the git list
19 # about this and it still doesn't work in a sensible way...
14
20
15 if ver['branch-nick'] == 'ipython':
21 start_dir = os.getcwd()
16 tarname = 'ipython-%s.bzr.r%s.tgz' % (version_base, ver['revno'])
22 cd('..')
17 else:
23 git_tpl = 'git archive --format=tar --prefix={0}/ HEAD | gzip > {1}'
18 tarname = 'ipython-%s.bzr.r%s.%s.tgz' % (version_base, ver['revno'],
24 c(git_tpl.format(base_name, tar_name))
19 ver['branch-nick'])
25 c('mv {0} tools/'.format(tar_name))
20
21 c('bzr export ' + tarname)
@@ -1,51 +1,52 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 """IPython release script.
2 """IPython release script.
3
3
4 This should only be run at real release time.
4 This should only be run at real release time.
5 """
5 """
6
6
7 from toollib import *
7 from toollib import *
8
8
9 # Get main ipython dir, this will raise if it doesn't pass some checks
9 # Get main ipython dir, this will raise if it doesn't pass some checks
10 ipdir = get_ipdir()
10 ipdir = get_ipdir()
11 tooldir = pjoin(ipdir,'tools')
11 tooldir = pjoin(ipdir,'tools')
12 distdir = pjoin(ipdir,'dist')
12 distdir = pjoin(ipdir,'dist')
13 # Where I keep static backups of each release
13 # Where I keep static backups of each release
14 ipbackupdir = os.path.expanduser('~/ipython/backup')
14 ipbackupdir = os.path.expanduser('~/ipython/backup')
15
15
16 # Start in main IPython dir
16 # Start in main IPython dir
17 cd(ipdir)
17 cd(ipdir)
18
18
19 # Load release info
19 # Load release info
20 execfile(pjoin('IPython','Release.py'))
20 execfile(pjoin('IPython','Release.py'))
21
21
22 print
22 print
23 print "Releasing IPython version $version"
23 print "Releasing IPython version $version"
24 print "=================================="
24 print "=================================="
25 print
25 print
26 print 'Source IPython directory:', ipdir
26 print 'Source IPython directory:', ipdir
27 print
27 print
28
28
29 # Perform local backup, go to tools dir to run it.
29 # Perform local backup, go to tools dir to run it.
30 cd(tooldir)
30 cd(tooldir)
31 c('./make_tarball.py')
31 c('./make_tarball.py')
32 c('mv ipython-*.tgz %s' % ipbackupdir)
32 c('mv ipython-*.tgz %s' % ipbackupdir)
33
33
34 # Build release files
34 # Build release files
35 c('./build_release %s' % ipdir)
35 c('./build_release %s' % ipdir)
36
36
37 # Register with the Python Package Index (PyPI)
37 # Register with the Python Package Index (PyPI)
38 print "Registering with PyPI..."
38 print "Registering with PyPI..."
39 cd(ipdir)
39 cd(ipdir)
40 c('./setup.py register')
40 c('./setup.py register')
41
41
42 # Upload all files
42 # Upload all files
43 c('./setup.py sdist --formats=gztar,zip upload')
43 cd(distdir)
44 cd(distdir)
44 print "Uploading distribution files..."
45 print "Uploading distribution files..."
45 c('scp * ipython@ipython.scipy.org:www/dist/')
46 c('scp * ipython@ipython.scipy.org:www/dist/')
46
47
47 print "Uploading backup files..."
48 print "Uploading backup files..."
48 cd(ipbackupdir)
49 cd(ipbackupdir)
49 c('scp `ls -1tr *tgz | tail -1` ipython@ipython.scipy.org:www/backup/')
50 c('scp `ls -1tr *tgz | tail -1` ipython@ipython.scipy.org:www/backup/')
50
51
51 print "Done!"
52 print "Done!"
@@ -1,55 +1,48 b''
1 """Various utilities common to IPython release and maintenance tools.
1 """Various utilities common to IPython release and maintenance tools.
2 """
2 """
3 # Library imports
3 # Library imports
4 import os
4 import os
5 import sys
5 import sys
6
6
7 from distutils.dir_util import remove_tree
7 from distutils.dir_util import remove_tree
8
8
9 # Useful shorthands
9 # Useful shorthands
10 pjoin = os.path.join
10 pjoin = os.path.join
11 cd = os.chdir
11 cd = os.chdir
12
12
13 # Utility functions
13 # Utility functions
14 def c(cmd):
14 def c(cmd):
15 """Run system command, raise SystemExit if it returns an error."""
15 """Run system command, raise SystemExit if it returns an error."""
16 print "$",cmd
16 print "$",cmd
17 stat = os.system(cmd)
17 stat = os.system(cmd)
18 #stat = 0 # Uncomment this and comment previous to run in debug mode
18 #stat = 0 # Uncomment this and comment previous to run in debug mode
19 if stat:
19 if stat:
20 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
20 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
21
21
22
22
23 def get_ipdir():
23 def get_ipdir():
24 """Get IPython directory from command line, or assume it's the one above."""
24 """Get IPython directory from command line, or assume it's the one above."""
25
25
26 # Initialize arguments and check location
26 # Initialize arguments and check location
27 try:
27 try:
28 ipdir = sys.argv[1]
28 ipdir = sys.argv[1]
29 except IndexError:
29 except IndexError:
30 ipdir = '..'
30 ipdir = '..'
31
31
32 ipdir = os.path.abspath(ipdir)
32 ipdir = os.path.abspath(ipdir)
33
33
34 cd(ipdir)
34 cd(ipdir)
35 if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
35 if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
36 raise SystemExit('Invalid ipython directory: %s' % ipdir)
36 raise SystemExit('Invalid ipython directory: %s' % ipdir)
37 return ipdir
37 return ipdir
38
38
39
39
40 def compile_tree():
40 def compile_tree():
41 """Compile all Python files below current directory."""
41 """Compile all Python files below current directory."""
42 vstr = '.'.join(map(str,sys.version_info[:2]))
42 vstr = '.'.join(map(str,sys.version_info[:2]))
43 stat = os.system('python %s/lib/python%s/compileall.py .' %
43 stat = os.system('python %s/lib/python%s/compileall.py .' %
44 (sys.prefix,vstr))
44 (sys.prefix,vstr))
45 if stat:
45 if stat:
46 msg = '*** ERROR: Some Python files in tree do NOT compile! ***\n'
46 msg = '*** ERROR: Some Python files in tree do NOT compile! ***\n'
47 msg += 'See messages above for the actual file that produced it.\n'
47 msg += 'See messages above for the actual file that produced it.\n'
48 raise SystemExit(msg)
48 raise SystemExit(msg)
49
50
51 def version_info():
52 """Return bzr version info as a dict."""
53 out = os.popen('bzr version-info')
54 pairs = (l.split(':',1) for l in out)
55 return dict(((k,v.strip()) for (k,v) in pairs))
General Comments 0
You need to be logged in to leave comments. Login now