summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-12-01 21:37:49 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2017-12-01 21:42:14 -0800
commite335d6d2234a7bb1d83741f851dba5dbbabd6e3c (patch)
treebe5545f9f2c20bc41b500d4aac462fd40c0ea8d8 /doc/src
parenta51160317c680662c52e4a1a6b4d11beae37f205 (diff)
downloadpsycopg2-e335d6d2234a7bb1d83741f851dba5dbbabd6e3c.tar.gz
Trim trailing whitespace from all files throughout project
Many editors automatically trim whitespace on save. By trimming all files in one go, makes future diffs cleaner without extraneous whitespace changes.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/advanced.rst2
-rw-r--r--doc/src/connection.rst12
-rw-r--r--doc/src/cursor.rst44
-rw-r--r--doc/src/faq.rst1
-rw-r--r--doc/src/index.rst1
-rw-r--r--doc/src/pool.rst3
-rwxr-xr-xdoc/src/tools/lib/dbapi_extension.py1
-rw-r--r--doc/src/tools/lib/sql_role.py5
-rw-r--r--doc/src/tools/lib/ticket_role.py1
-rwxr-xr-xdoc/src/tools/stitch_text.py3
-rw-r--r--doc/src/tz.rst3
-rw-r--r--doc/src/usage.rst1
12 files changed, 34 insertions, 43 deletions
diff --git a/doc/src/advanced.rst b/doc/src/advanced.rst
index b2b8afe..d1683b8 100644
--- a/doc/src/advanced.rst
+++ b/doc/src/advanced.rst
@@ -188,7 +188,7 @@ representation into the previously defined `!Point` class:
... return Point(float(m.group(1)), float(m.group(2)))
... else:
... raise InterfaceError("bad point representation: %r" % value)
-
+
In order to create a mapping from a PostgreSQL type (either standard or
user-defined), its OID must be known. It can be retrieved either by the second
diff --git a/doc/src/connection.rst b/doc/src/connection.rst
index 454f80d..6f13ecd 100644
--- a/doc/src/connection.rst
+++ b/doc/src/connection.rst
@@ -22,7 +22,7 @@ The ``connection`` class
:ref:`thread-safety` for details.
.. method:: cursor(name=None, cursor_factory=None, scrollable=None, withhold=False)
-
+
Return a new `cursor` object using the connection.
If *name* is specified, the returned cursor will be a :ref:`server
@@ -274,8 +274,8 @@ The ``connection`` class
.. __: http://jdbc.postgresql.org/
- Xids returned by `!tpc_recover()` also have extra attributes
- `~psycopg2.extensions.Xid.prepared`, `~psycopg2.extensions.Xid.owner`,
+ Xids returned by `!tpc_recover()` also have extra attributes
+ `~psycopg2.extensions.Xid.prepared`, `~psycopg2.extensions.Xid.owner`,
`~psycopg2.extensions.Xid.database` populated with the values read
from the server.
@@ -626,7 +626,7 @@ The ``connection`` class
pair: Server; Parameters
.. method:: get_parameter_status(parameter)
-
+
Look up a current parameter setting of the server.
Potential values for ``parameter`` are: ``server_version``,
@@ -708,7 +708,7 @@ The ``connection`` class
The number is formed by converting the major, minor, and revision
numbers into two-decimal-digit numbers and appending them together.
For example, version 8.1.5 will be returned as ``80105``.
-
+
.. seealso:: libpq docs for `PQserverVersion()`__ for details.
.. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQSERVERVERSION
@@ -722,7 +722,7 @@ The ``connection`` class
.. attribute:: status
A read-only integer representing the status of the connection.
- Symbolic constants for the values are defined in the module
+ Symbolic constants for the values are defined in the module
`psycopg2.extensions`: see :ref:`connection-status-constants`
for the available values.
diff --git a/doc/src/cursor.rst b/doc/src/cursor.rst
index 417ab6c..5a6935e 100644
--- a/doc/src/cursor.rst
+++ b/doc/src/cursor.rst
@@ -34,10 +34,10 @@ The ``cursor`` class
many cursors from the same connection and should use each cursor from
a single thread. See :ref:`thread-safety` for details.
-
- .. attribute:: description
- This read-only attribute is a sequence of 7-item sequences.
+ .. attribute:: description
+
+ This read-only attribute is a sequence of 7-item sequences.
Each of these sequences is a named tuple (a regular tuple if
:func:`collections.namedtuple` is not available) containing information
@@ -65,7 +65,7 @@ The ``cursor`` class
This attribute will be `!None` for operations that do not return rows
or if the cursor has not had an operation invoked via the
|execute*|_ methods yet.
-
+
.. |pg_type| replace:: :sql:`pg_type`
.. _pg_type: http://www.postgresql.org/docs/current/static/catalog-pg-type.html
.. _PQgetlength: http://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQGETLENGTH
@@ -78,7 +78,7 @@ The ``cursor`` class
regular tuples.
.. method:: close()
-
+
Close the cursor now (rather than whenever `del` is executed).
The cursor will be unusable from this point forward; an
`~psycopg2.InterfaceError` will be raised if any operation is
@@ -88,7 +88,7 @@ The ``cursor`` class
the method is automatically called at the end of the ``with``
block.
-
+
.. attribute:: closed
Read-only boolean attribute: specifies if the cursor is closed
@@ -235,7 +235,7 @@ The ``cursor`` class
The `mogrify()` method is a Psycopg extension to the |DBAPI|.
.. method:: setinputsizes(sizes)
-
+
This method is exposed in compliance with the |DBAPI|. It currently
does nothing but it is safe to call it.
@@ -281,17 +281,17 @@ The ``cursor`` class
>>> cur.execute("SELECT * FROM test WHERE id = %s", (3,))
>>> cur.fetchone()
(3, 42, 'bar')
-
+
A `~psycopg2.ProgrammingError` is raised if the previous call
to |execute*|_ did not produce any result set or no call was issued
yet.
.. method:: fetchmany([size=cursor.arraysize])
-
+
Fetch the next set of rows of a query result, returning a list of
tuples. An empty list is returned when no more rows are available.
-
+
The number of rows to fetch per call is specified by the parameter.
If it is not given, the cursor's `~cursor.arraysize` determines
the number of rows to be fetched. The method should try to fetch as
@@ -309,7 +309,7 @@ The ``cursor`` class
A `~psycopg2.ProgrammingError` is raised if the previous call to
|execute*|_ did not produce any result set or no call was issued yet.
-
+
Note there are performance considerations involved with the size
parameter. For optimal performance, it is usually best to use the
`~cursor.arraysize` attribute. If the size parameter is used,
@@ -344,7 +344,7 @@ The ``cursor`` class
`~psycopg2.ProgrammingError` is raised and the cursor position is
not changed.
- .. note::
+ .. note::
According to the |DBAPI|_, the exception raised for a cursor out
of bound should have been `!IndexError`. The best option is
@@ -364,7 +364,7 @@ The ``cursor`` class
.. attribute:: arraysize
-
+
This read/write attribute specifies the number of rows to fetch at a
time with `~cursor.fetchmany()`. It defaults to 1 meaning to fetch
a single row at a time.
@@ -378,20 +378,20 @@ The ``cursor`` class
default is 2000.
.. versionadded:: 2.4
-
+
.. extension::
The `itersize` attribute is a Psycopg extension to the |DBAPI|.
- .. attribute:: rowcount
-
+ .. attribute:: rowcount
+
This read-only attribute specifies the number of rows that the last
|execute*|_ produced (for :abbr:`DQL (Data Query Language)` statements
- like :sql:`SELECT`) or affected (for
+ like :sql:`SELECT`) or affected (for
:abbr:`DML (Data Manipulation Language)` statements like :sql:`UPDATE`
or :sql:`INSERT`).
-
+
The attribute is -1 in case no |execute*| has been performed on
the cursor or the row count of the last operation if it can't be
determined by the interface.
@@ -400,7 +400,7 @@ The ``cursor`` class
The |DBAPI|_ interface reserves to redefine the latter case to
have the object return `!None` instead of -1 in future versions
of the specification.
-
+
.. attribute:: rownumber
@@ -457,7 +457,7 @@ The ``cursor`` class
command:
>>> cur.execute("INSERT INTO test (num, data) VALUES (%s, %s)", (42, 'bar'))
- >>> cur.statusmessage
+ >>> cur.statusmessage
'INSERT 0 1'
.. extension::
@@ -490,13 +490,13 @@ The ``cursor`` class
.. method:: nextset()
-
+
This method is not supported (PostgreSQL does not have multiple data
sets) and will raise a `~psycopg2.NotSupportedError` exception.
.. method:: setoutputsize(size [, column])
-
+
This method is exposed in compliance with the |DBAPI|. It currently
does nothing but it is safe to call it.
diff --git a/doc/src/faq.rst b/doc/src/faq.rst
index 0ef4c70..5824d2b 100644
--- a/doc/src/faq.rst
+++ b/doc/src/faq.rst
@@ -334,4 +334,3 @@ Psycopg raises *ImportError: cannot import name tz* on import in mod_wsgi / ASP,
.. _egg: http://peak.telecommunity.com/DevCenter/PythonEggs
.. __: http://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache
.. __: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonEggs
-
diff --git a/doc/src/index.rst b/doc/src/index.rst
index 30ba8fa..852bbc2 100644
--- a/doc/src/index.rst
+++ b/doc/src/index.rst
@@ -65,4 +65,3 @@ Psycopg 2 is both Unicode and Python 3 friendly.
**To Do items in the documentation**
.. todolist::
-
diff --git a/doc/src/pool.rst b/doc/src/pool.rst
index 32bca54..7624dc8 100644
--- a/doc/src/pool.rst
+++ b/doc/src/pool.rst
@@ -57,8 +57,7 @@ be used.
.. autoclass:: PersistentConnectionPool
- .. note::
+ .. note::
This pool class is mostly designed to interact with Zope and probably
not useful in generic applications.
-
diff --git a/doc/src/tools/lib/dbapi_extension.py b/doc/src/tools/lib/dbapi_extension.py
index 7ab656f..23d9165 100755
--- a/doc/src/tools/lib/dbapi_extension.py
+++ b/doc/src/tools/lib/dbapi_extension.py
@@ -49,4 +49,3 @@ def setup(app):
text=(visit_extension_node, depart_extension_node))
app.add_directive('extension', Extension)
-
diff --git a/doc/src/tools/lib/sql_role.py b/doc/src/tools/lib/sql_role.py
index 8fb8ab8..43347b4 100644
--- a/doc/src/tools/lib/sql_role.py
+++ b/doc/src/tools/lib/sql_role.py
@@ -12,10 +12,9 @@ from docutils import nodes, utils
from docutils.parsers.rst import roles
def sql_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
- text = utils.unescape(text)
+ text = utils.unescape(text)
options['classes'] = ['sql']
return [nodes.literal(rawtext, text, **options)], []
-
+
def setup(app):
roles.register_local_role('sql', sql_role)
-
diff --git a/doc/src/tools/lib/ticket_role.py b/doc/src/tools/lib/ticket_role.py
index d8ded22..0ee3d63 100644
--- a/doc/src/tools/lib/ticket_role.py
+++ b/doc/src/tools/lib/ticket_role.py
@@ -56,4 +56,3 @@ def setup(app):
app.add_config_value('ticket_remap_offset', None, 'env')
app.add_role('ticket', ticket_role)
app.add_role('tickets', ticket_role)
-
diff --git a/doc/src/tools/stitch_text.py b/doc/src/tools/stitch_text.py
index c9ed99a..b36727b 100755
--- a/doc/src/tools/stitch_text.py
+++ b/doc/src/tools/stitch_text.py
@@ -57,7 +57,6 @@ def emit(basename, txt_dir):
# some space between sections
sys.stdout.write("\n\n")
-
+
if __name__ == '__main__':
sys.exit(main())
-
diff --git a/doc/src/tz.rst b/doc/src/tz.rst
index 6e2e981..06333f8 100644
--- a/doc/src/tz.rst
+++ b/doc/src/tz.rst
@@ -8,9 +8,8 @@
This module holds two different tzinfo implementations that can be used as the
`tzinfo` argument to `~datetime.datetime` constructors, directly passed to
Psycopg functions or used to set the `cursor.tzinfo_factory` attribute in
-cursors.
+cursors.
.. autoclass:: psycopg2.tz.FixedOffsetTimezone
.. autoclass:: psycopg2.tz.LocalTimezone
-
diff --git a/doc/src/usage.rst b/doc/src/usage.rst
index 5dcab8f..e52bb9f 100644
--- a/doc/src/usage.rst
+++ b/doc/src/usage.rst
@@ -1017,4 +1017,3 @@ For further details see the documentation for the above methods.
.. __: http://www.opengroup.org/bookstore/catalog/c193.htm
.. __: http://jdbc.postgresql.org/
-