mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Merge branch 'sphinx-1.6'
This commit is contained in:
commit
582fd95986
|
@ -1,3 +1,3 @@
|
|||
# Packages only needed to build the docs
|
||||
Pygments>=1.5
|
||||
Sphinx>=1.2,<=1.3
|
||||
Pygments>=2.2,<2.3
|
||||
Sphinx>=1.6,<=1.7
|
||||
|
|
|
@ -551,7 +551,7 @@ The ``connection`` class
|
|||
the session.
|
||||
|
||||
.. doctest::
|
||||
:options: NORMALIZE_WHITESPACE
|
||||
:options: +NORMALIZE_WHITESPACE
|
||||
|
||||
>>> cur.execute("CREATE TABLE foo (id serial PRIMARY KEY);")
|
||||
>>> pprint(conn.notices)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
from docutils import nodes
|
||||
|
||||
from sphinx.locale import _
|
||||
from sphinx.util.compat import Directive, make_admonition
|
||||
from docutils.parsers.rst import Directive
|
||||
|
||||
class extension_node(nodes.Admonition, nodes.Element): pass
|
||||
|
||||
|
@ -29,12 +29,11 @@ class Extension(Directive):
|
|||
option_spec = {}
|
||||
|
||||
def run(self):
|
||||
nodes = make_admonition(extension_node,
|
||||
self.name, [_('DB API extension')], self.options,
|
||||
self.content, self.lineno, self.content_offset,
|
||||
self.block_text, self.state, self.state_machine)
|
||||
nodes[0]['classes'].append('dbapi-extension')
|
||||
return nodes
|
||||
node = extension_node('\n'.join(self.content))
|
||||
node += nodes.title(_('DB API extension'), _('DB API extension'))
|
||||
self.state.nested_parse(self.content, self.content_offset, node)
|
||||
node['classes'].append('dbapi-extension')
|
||||
return [node]
|
||||
|
||||
|
||||
def visit_extension_node(self, node):
|
||||
|
|
Loading…
Reference in New Issue
Block a user