Skip to content

Commit 413a077

Browse files
authored
Some documentation updates. (#15084)
2 parents df6b2d0 + 6240d23 commit 413a077

28 files changed

Lines changed: 128 additions & 211 deletions

IPython/core/completer.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@
8585
8686
We welcome any feedback on these new API, and we also encourage you to try this
8787
module in debug mode (start IPython with ``--Completer.debug=True``) in order
88-
to have extra logging information if :any:`jedi` is crashing, or if current
88+
to have extra logging information if :mod:`jedi` is crashing, or if current
8989
IPython completer pending deprecations are returning results not yet handled
90-
by :any:`jedi`
90+
by :mod:`jedi`
9191
9292
Using Jedi for tab completion allow snippets like the following to work without
9393
having to execute any code:
@@ -99,7 +99,7 @@
9999
executing almost any code unlike the deprecated :any:`IPCompleter.greedy`
100100
option.
101101
102-
Be sure to update :any:`jedi` to the latest stable version or to try the
102+
Be sure to update :mod:`jedi` to the latest stable version or to try the
103103
current development version to get better completions.
104104
105105
Matchers
@@ -149,7 +149,7 @@
149149
and requires a literal ``2`` for v2 Matchers.
150150
151151
Once the API stabilises future versions may relax the requirement for specifying
152-
``matcher_api_version`` by switching to :any:`functools.singledispatch`, therefore
152+
``matcher_api_version`` by switching to :func:`functools.singledispatch`, therefore
153153
please do not rely on the presence of ``matcher_api_version`` for any purposes.
154154
155155
Suppression of competing matchers
@@ -487,7 +487,7 @@ class Completion:
487487
It will also raise unless use in proper context manager.
488488
489489
This act as a middle ground :any:`Completion` object between the
490-
:any:`jedi.api.classes.Completion` object and the Prompt Toolkit completion
490+
:class:`jedi.api.classes.Completion` object and the Prompt Toolkit completion
491491
object. While Jedi need a lot of information about evaluator and how the
492492
code should be ran/inspected, PromptToolkit (and other frontend) mostly
493493
need user facing information.
@@ -858,7 +858,7 @@ def rectify_completions(text: str, completions: _IC, *, _debug: bool = False) ->
858858
859859
Notes
860860
-----
861-
:any:`jedi.api.classes.Completion` s returned by Jedi may not have the same start and end, though
861+
:class:`jedi.api.classes.Completion` s returned by Jedi may not have the same start and end, though
862862
the Jupyter Protocol requires them to behave like so. This will readjust
863863
the completion to have the same ``start`` and ``end`` by padding both
864864
extremities with surrounding text.
@@ -988,9 +988,9 @@ class Completer(Configurable):
988988
no item/attribute evaluation, no access to locals/globals,
989989
no evaluation of any operations or comparisons.
990990
- ``limited``: access to all namespaces, evaluation of hard-coded methods
991-
(for example: :any:`dict.keys`, :any:`object.__getattr__`,
992-
:any:`object.__getitem__`) on allow-listed objects (for example:
993-
:any:`dict`, :any:`list`, :any:`tuple`, ``pandas.Series``),
991+
(for example: :py:meth:`dict.keys`, :py:meth:`object.__getattr__`,
992+
:py:meth:`object.__getitem__`) on allow-listed objects (for example:
993+
:py:class:`dict`, :py:class:`list`, :py:class:`tuple`, ``pandas.Series``),
994994
- ``unsafe``: evaluation of all methods and function calls but not of
995995
syntax with side-effects like `del x`,
996996
- ``dangerous``: completely arbitrary evaluation; does not support auto-import.
@@ -3305,7 +3305,7 @@ def completions(self, text: str, offset: int)->Iterator[Completion]:
33053305
33063306
.. note::
33073307
3308-
If ``IPCompleter.debug`` is :any:`True` will yield a ``--jedi/ipython--``
3308+
If ``IPCompleter.debug`` is :py:data:`True` will yield a ``--jedi/ipython--``
33093309
fake Completion token to distinguish completion returned by Jedi
33103310
and usual IPython completion.
33113311

IPython/core/display_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def display(
137137
-------
138138
handle: DisplayHandle
139139
Returns a handle on updatable displays for use with :func:`update_display`,
140-
if `display_id` is given. Returns :any:`None` if no `display_id` is given
140+
if `display_id` is given. Returns :py:data:`None` if no `display_id` is given
141141
(default).
142142
143143
Examples

IPython/core/formatters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ class BaseFormatter(Configurable):
366366
dictionaries is through the :meth:`for_type` and :meth:`for_type_by_name`
367367
methods.
368368
369-
If no function/callable is found to compute the format data, ``None`` is
369+
If no function/callable is found to compute the format data, :py:data:`None` is
370370
returned and this format type is not used.
371371
"""
372372

README.rst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,11 @@ Welcome to IPython. Our full documentation is available on `ipython.readthedocs
2929
contribute to the project.
3030
IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.
3131

32-
**IPython versions and Python Support**
32+
**Python Support**
3333

34-
Starting after IPython 8.16, we will progressively transition to `Spec-0000 <https://scientific-python.org/specs/spec-0000/>`_.
34+
Starting after IPython 8.16, we progressively transition to `Spec-0000 <https://scientific-python.org/specs/spec-0000/>`_.
3535

36-
Starting with IPython 7.10, IPython follows `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_
37-
38-
**IPython 7.17+** requires Python version 3.7 and above.
39-
40-
**IPython 7.10+** requires Python version 3.6 and above.
41-
42-
**IPython 7.0** requires Python version 3.5 and above.
43-
44-
**IPython 6.x** requires Python version 3.3 and above.
45-
46-
**IPython 5.x LTS** is the compatible release for Python 2.7.
47-
If you require Python 2 support, you **must** use IPython 5.x LTS. Please
48-
update your project configurations and requirements as necessary.
36+
IPython requires Python 3.11 or newer.
4937

5038

5139
The Notebook, Qt console and a number of other pieces are now parts of *Jupyter*.

docs/source/config/custommagics.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,8 @@ instantiate the class yourself before registration:
127127

128128
.. note::
129129

130-
In early IPython versions 0.12 and before the line magics were
131-
created using a :func:`define_magic` API function. This API has been
132-
replaced with the above in IPython 0.13 and then completely removed
133-
in IPython 5. Maintainers of IPython extensions that still use the
134-
:func:`define_magic` function are advised to adjust their code
135-
for the current API.
130+
The legacy :func:`define_magic` API function has been removed.
131+
Extensions should use the decorator-based API shown above.
136132

137133

138134
Accessing user namespace and local scope

docs/source/config/eventloops.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ Integrating with GUI event loops
44

55
When the user types ``%gui qt``, IPython integrates itself with the Qt event
66
loop, so you can use both a GUI and an interactive prompt together. IPython
7-
supports a number of common GUI toolkits, but from IPython 3.0, it is possible
8-
to integrate other event loops without modifying IPython itself.
7+
supports a number of common GUI toolkits, and it is possible to integrate
8+
other event loops without modifying IPython itself.
99

1010
Supported event loops include ``qt5``, ``qt6``, ``gtk2``, ``gtk3``, ``gtk4``,
1111
``wx``, ``osx`` and ``tk``. Make sure the event loop you specify matches the
1212
GUI toolkit used by your own code.
1313

14+
.. note::
15+
16+
``gtk2`` is deprecated and GTK3 or GTK4 should be used instead for new projects.
17+
1418
To make IPython GUI event loop integration occur automatically at every
1519
startup, set the ``c.InteractiveShellApp.gui`` configuration key in your
1620
IPython profile (see :ref:`setting_config`).

docs/source/config/extensions/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Extensions bundled with IPython
9090

9191
* ``octavemagic`` used to be bundled, but is now part of `oct2py <https://blink1073.github.io/oct2py/>`_.
9292
Use ``%load_ext oct2py.ipython`` to load it.
93-
* ``rmagic`` is now part of `rpy2 <http://rpy.sourceforge.net/>`_. Use
93+
* ``rmagic`` is now part of `rpy2 <https://rpy2.github.io/>`_. Use
9494
``%load_ext rpy2.ipython`` to load it, and see :mod:`rpy2.ipython.rmagic` for
9595
details of how to use it.
9696
* ``cythonmagic`` used to be bundled, but is now part of `cython <https://github.com/cython/cython/>`_

docs/source/config/integrating.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Note that these are surrounded by single, not double underscores.
7979
- ?
8080

8181
If the methods don't exist, the standard ``repr()`` is used.
82-
If a method exists and returns ``None``, it is treated the same as if it does not exist.
82+
If a method exists and returns :py:data:`None`, it is treated the same as if it does not exist.
8383
In general, *all* available formatters will be called when an object is displayed,
8484
and it is up to the UI to select which to display.
8585
A given formatter should not generally change its output based on what other formats are available -

docs/source/development/pycompat.rst

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ sidebar, allowing you to come back to previous sections or skip ahead, if needed
8181

8282

8383
The latest development version is always available from IPython's `GitHub
84-
repository <http://github.com/ipython/ipython>`_.
84+
repository <https://github.com/ipython/ipython>`_.
8585

8686

8787
.. toctree::

0 commit comments

Comments
 (0)