- Use '/' key to quickly access this field.
- Enter a name of repository, or repository group for quick search.
- Prefix query to allow special search:
user:admin, to search for usernames, always global
user_group:devops, to search for user groups, always global
pr:303, to search for pull request number, title, or description, always global
commit:efced4, to search for commits, scoped to repositories or groups
file:models.py, to search for file paths, scoped to repositories or groups
For advanced full text search visit: repository search
docs: embed: add parameters to docstring
The docstring of IPython.terminal.embed.embed() does not document its
arguments. Add a "Parameters" section, and document each argument
appropriately:
- for 'header', rephrase the corresponding description from the
docstring of InteractiveShellEmbed.__call__, to which this argument is
passed (__call__ itself is missing from the generated API documentation
since sphinx.ext.autodoc does not document special members by default).
- for 'compile_flags', refer to the documentation of
InteractiveShellEmbed.mainloop, to which this argument is passed.
- for 'kwargs', refer to the constructor of InteractiveShellEmbed, and
fold in the sentence mentioning the 'config' argument.
docs: add more pointers to configuration of embedded IPython
The "Running IPython from Python" section of the docs under "Configuring
IPython" gives a nice example of how to set IPython configuration
options when embedding IPython. Add more pointer to this part of the
documentation by linking to it from the docstrings of
IPython.{embed_kernel, start_ipython, start_kernel} and
IPython.terminal.embed.embed.
While at it, consistenly refer to the config argument as "a traitlets
:class:`Config` object".
Finally, also mention that options can be set with a 'Config' object in
the small paragraph under "IPython options".
docs: refer to 'embed_kernel' in 'start_kernel's docstring
When 'start_kernel' was added in a10986ac3 (add IPython.start_kernel,
2013-07-04), its docstring was probably copied from that of
'start_ipython', such that instead of referencing its counterpart
'embed_kernel', it references 'start_ipython's counterpart 'embed'.
Correctly refer to 'embed_kernel'.
Revert "Update README to use optional dependency over requirements.txt"
In 4ab4de3bb (Update README to use optional dependency over
requirements.txt, 2022-09-06), docs/README.rst was changed to suggest
installing the requirements for the documentation build using 'pip
install .[doc] -U' instead of using docs/requirements.txt.
This works for a first build but since it is not an editable install,
any changes to the docstrings are not reflected in the generated API
section in subsequent builds, since Sphinx's autodoc extensions looks at
installed modules only.
Revert that commit, going back to suggesting 'pip install -U -r
docs/requirements.txt'. The requirements file itself consists of '-e
.[doc]' since 95de1fe40 (Move documentation requirements to setup.cfg,
2022-09-06) (the parent of the commit we are reverting), so this does
not change the list of installed packages.
This reverts commit 4ab4de3bbf08805262e4b67957faf2e2c588e382.
.gitignore: ignore 'docs/source/config/shortcuts/table.tsv'
The generated file 'docs/source/config/shortcuts/table.tsv' is generetad
by the documentation build since 64e72a955 (Restore shortcuts in
documentation, define identifiers, 2023-01-08) but it missing from
'.gitignore'. Add it now.
docs/autogen_shortcuts.py: support Python 3.8
In 64e72a955 (Restore shortcuts in documentation, define identifiers,
2023-01-08), some typing annotations were added to
docs/autogen_shortcuts.py using the builtin container type 'list'. This
feature is only available starting in Python 3.9 [1], but setup.cfg
lists Python 3.8 as the earliest supported Python version. This leads to
a failing documentation build in a Python 3.8 virtual environment.
Fix this by using the capitalized name 'List' from the 'typing' module
to keep Python 3.8 compatibility.
[1] https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections
Use single quotes in sql string literal (#13968)
the SQL spec requires that string literals use single quotes and column
references (or other identifiers) use double quotes. sqlite permits the
use of double quotes for string literals in "unambiguous cases". For
some reason, its understanding of what constitutes unambiguous has
changed recently - I'm on FreeBSD 14.0-CURRENT with sqlite 3.41.0 - and
attempting to do anything with ipython throws a very strange sqlite
operation error:
```
[+] ~% ipython --version (test) audrey@daisy [12:18:02 AM]
8.11.0
[+] ~% ipython (test) audrey@daisy [12:18:04 AM]
[TerminalIPythonApp] ERROR | Failed to create history session in /usr/home/audrey/.ipython/profile_default/history.sqlite. History will not be saved.
Traceback (most recent call last):
File "/usr/home/audrey/.virtualenvs/test/lib/python3.9/site-packages/IPython/core/history.py", line 545, in __init__
self.new_session()
File "/usr/home/audrey/.virtualenvs/test/lib/python3.9/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/usr/home/audrey/.virtualenvs/test/lib/python3.9/site-packages/IPython/core/history.py", line 60, in only_when_enabled
return f(self, *a, **kw)
File "/usr/home/audrey/.virtualenvs/test/lib/python3.9/site-packages/IPython/core/history.py", line 570, in new_session
cur = conn.execute("""INSERT INTO sessions VALUES (NULL, ?, NULL,
sqlite3.OperationalError: no such column:
Python 3.9.16 (main, Feb 28 2023, 01:31:45)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.11.0 -- An enhanced Interactive Python. Type '?' for help.
```
This patch fixes it. idk if this constitutes a bug in sqlite3, but this
is, I guess, more correct.