##// END OF EJS Templates
Merge pull request #6290 from takluyver/deprecate-rmagic...
Min RK -
r17757:38db4169 merge
parent child Browse files
Show More
@@ -0,0 +1,2 b''
1 - The ``rmagic`` extension is deprecated, as it is now part of rpy2. See
2 :mod:`rpy2.ipython.rmagic`.
@@ -48,6 +48,7 b' import sys'
48 import tempfile
48 import tempfile
49 from glob import glob
49 from glob import glob
50 from shutil import rmtree
50 from shutil import rmtree
51 import warnings
51
52
52 # numpy and rpy2 imports
53 # numpy and rpy2 imports
53
54
@@ -689,6 +690,16 b' __doc__ = __doc__.format('
689
690
690 def load_ipython_extension(ip):
691 def load_ipython_extension(ip):
691 """Load the extension in IPython."""
692 """Load the extension in IPython."""
693 warnings.warn("The rmagic extension in IPython is deprecated in favour of "
694 "rpy2.ipython. If available, that will be loaded instead.\n"
695 "http://rpy.sourceforge.net/")
696 try:
697 import rpy2.ipython
698 except ImportError:
699 pass # Fall back to our own implementation for now
700 else:
701 return rpy2.ipython.load_ipython_extension(ip)
702
692 ip.register_magics(RMagics)
703 ip.register_magics(RMagics)
693 # Initialising rpy2 interferes with readline. Since, at this point, we've
704 # Initialising rpy2 interferes with readline. Since, at this point, we've
694 # probably just loaded rpy2, we reset the delimiters. See issue gh-2759.
705 # probably just loaded rpy2, we reset the delimiters. See issue gh-2759.
@@ -140,7 +140,6 b" have['pexpect'] = test_for('IPython.external.pexpect')"
140 have['pymongo'] = test_for('pymongo')
140 have['pymongo'] = test_for('pymongo')
141 have['pygments'] = test_for('pygments')
141 have['pygments'] = test_for('pygments')
142 have['qt'] = test_for('IPython.external.qt')
142 have['qt'] = test_for('IPython.external.qt')
143 have['rpy2'] = test_for('rpy2')
144 have['sqlite3'] = test_for('sqlite3')
143 have['sqlite3'] = test_for('sqlite3')
145 have['cython'] = test_for('Cython')
144 have['cython'] = test_for('Cython')
146 have['tornado'] = test_for('tornado.version_info', (3,1,0), callback=None)
145 have['tornado'] = test_for('tornado.version_info', (3,1,0), callback=None)
@@ -255,9 +254,8 b" sec = test_sections['extensions']"
255 if not have['cython']:
254 if not have['cython']:
256 sec.exclude('cythonmagic')
255 sec.exclude('cythonmagic')
257 sec.exclude('tests.test_cythonmagic')
256 sec.exclude('tests.test_cythonmagic')
258 if not have['rpy2'] or not have['numpy']:
257 # This is deprecated in favour of rpy2
259 sec.exclude('rmagic')
258 sec.exclude('rmagic')
260 sec.exclude('tests.test_rmagic')
261 # autoreload does some strange stuff, so move it to its own test section
259 # autoreload does some strange stuff, so move it to its own test section
262 sec.exclude('autoreload')
260 sec.exclude('autoreload')
263 sec.exclude('tests.test_autoreload')
261 sec.exclude('tests.test_autoreload')
@@ -189,7 +189,8 b' html_additional_pages = {'
189 # Output file base name for HTML help builder.
189 # Output file base name for HTML help builder.
190 htmlhelp_basename = 'ipythondoc'
190 htmlhelp_basename = 'ipythondoc'
191
191
192 intersphinx_mapping = {'python': ('http://docs.python.org/2/', None)}
192 intersphinx_mapping = {'python': ('http://docs.python.org/2/', None),
193 'rpy2': ('http://rpy.sourceforge.net/rpy2/doc-2.4/html/', None)}
193
194
194 # Options for LaTeX output
195 # Options for LaTeX output
195 # ------------------------
196 # ------------------------
@@ -92,9 +92,11 b' Extensions bundled with IPython'
92
92
93 autoreload
93 autoreload
94 cythonmagic
94 cythonmagic
95 rmagic
96 storemagic
95 storemagic
97 sympyprinting
96 sympyprinting
98
97
99 * ``octavemagic`` used to be bundled, but is now part of `oct2py <http://blink1073.github.io/oct2py/docs/>`_.
98 * ``octavemagic`` used to be bundled, but is now part of `oct2py <http://blink1073.github.io/oct2py/docs/>`_.
100 Use ``%load_ext oct2py.ipython`` to load it.
99 Use ``%load_ext oct2py.ipython`` to load it.
100 * ``rmagic`` is now part of `rpy2 <http://rpy.sourceforge.net/>`_. Use
101 ``%load_ext rpy2.ipython`` to load it, and see :mod:`rpy2.ipython.rmagic` for
102 details of how to use it.
@@ -41,7 +41,7 b' extend, :meth:`~IPython.config.loader.LazyConfigValue.prepend` (like'
41 extend, but at the front), add and update (which works both for dicts
41 extend, but at the front), add and update (which works both for dicts
42 and sets)::
42 and sets)::
43
43
44 c.InteractiveShellApp.extensions.append('rmagic')
44 c.InteractiveShellApp.extensions.append('cythonmagic')
45
45
46 .. versionadded:: 2.0
46 .. versionadded:: 2.0
47 list, dict and set methods for config values
47 list, dict and set methods for config values
@@ -317,7 +317,7 b' extremely useful. The following extensions are provided:'
317 .. _octave: http://www.gnu.org/software/octave
317 .. _octave: http://www.gnu.org/software/octave
318 .. _oct2py: http://pypi.python.org/pypi/oct2py
318 .. _oct2py: http://pypi.python.org/pypi/oct2py
319
319
320 **R magics** (extension :ref:`rmagic <extensions_rmagic>`)
320 **R magics** (extension ``rmagic``)
321 This extension provides several magics that support calling code written in
321 This extension provides several magics that support calling code written in
322 the R_ language for statistical data analysis. You can execute
322 the R_ language for statistical data analysis. You can execute
323 single-lines or whole blocks of R code, capture both output and figures
323 single-lines or whole blocks of R code, capture both output and figures
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now