summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-12-07 20:13:26 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-12-07 20:13:26 +0000
commit9bab01d37baba445ba7ebd1c7c2df3d2d5661794 (patch)
tree2dcb83f4a6602f0404d636154f3e7276882e711a
parent0dbbd6fe669afed79be8f639455e324ab9b817ca (diff)
downloadsqlalchemy-9bab01d37baba445ba7ebd1c7c2df3d2d5661794.tar.gz
- convert __init__ and :members: to be compatible with autoclass_content='both'
-rw-r--r--doc/build/conf.py4
-rw-r--r--doc/build/reference/sqlalchemy/connections.rst1
-rw-r--r--doc/build/reference/sqlalchemy/pooling.rst12
-rw-r--r--doc/build/reference/sqlalchemy/types.rst32
-rw-r--r--lib/sqlalchemy/pool.py19
-rw-r--r--lib/sqlalchemy/types.py21
6 files changed, 34 insertions, 55 deletions
diff --git a/doc/build/conf.py b/doc/build/conf.py
index da6d8d663..c9f56f96e 100644
--- a/doc/build/conf.py
+++ b/doc/build/conf.py
@@ -16,8 +16,8 @@ import sys, os
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
-sys.path.append(os.path.abspath('.'))
-sys.path.append(os.path.abspath('../../lib'))
+sys.path.insert(0, os.path.abspath('../../lib'))
+sys.path.insert(0, os.path.abspath('.'))
import sqlalchemy
diff --git a/doc/build/reference/sqlalchemy/connections.rst b/doc/build/reference/sqlalchemy/connections.rst
index 1136ae654..877b73231 100644
--- a/doc/build/reference/sqlalchemy/connections.rst
+++ b/doc/build/reference/sqlalchemy/connections.rst
@@ -24,6 +24,7 @@ Connectables
.. autoclass:: Connectable
:members:
+ :undoc-members:
Result Objects
--------------
diff --git a/doc/build/reference/sqlalchemy/pooling.rst b/doc/build/reference/sqlalchemy/pooling.rst
index dbd483d59..5bc2d04ea 100644
--- a/doc/build/reference/sqlalchemy/pooling.rst
+++ b/doc/build/reference/sqlalchemy/pooling.rst
@@ -74,11 +74,11 @@ Builtin Pool Implementations
----------------------------
.. autoclass:: AssertionPool
- :members: __init__
+ :members:
:show-inheritance:
.. autoclass:: NullPool
- :members: __init__
+ :members:
:show-inheritance:
.. autoclass:: sqlalchemy.pool.Pool
@@ -87,18 +87,16 @@ Builtin Pool Implementations
:undoc-members:
:inherited-members:
- .. automethod:: __init__
-
.. autoclass:: sqlalchemy.pool.QueuePool
- :members: __init__
+ :members:
:show-inheritance:
.. autoclass:: SingletonThreadPool
- :members: __init__
+ :members:
:show-inheritance:
.. autoclass:: StaticPool
- :members: __init__
+ :members:
:show-inheritance:
diff --git a/doc/build/reference/sqlalchemy/types.rst b/doc/build/reference/sqlalchemy/types.rst
index fd9f06e47..00a78edf0 100644
--- a/doc/build/reference/sqlalchemy/types.rst
+++ b/doc/build/reference/sqlalchemy/types.rst
@@ -39,63 +39,48 @@ type is emitted in ``CREATE TABLE``, such as ``VARCHAR`` see `SQL
Standard Types`_ and the other sections of this chapter.
.. autoclass:: String
- :members: __init__
:show-inheritance:
.. autoclass:: Unicode
- :members: __init__
:show-inheritance:
.. autoclass:: Text
- :members: __init__
:show-inheritance:
.. autoclass:: UnicodeText
- :members: __init__
:show-inheritance:
.. autoclass:: Integer
- :members: __init__
:show-inheritance:
.. autoclass:: SmallInteger
- :members: __init__
:show-inheritance:
.. autoclass:: Numeric
- :members: __init__
:show-inheritance:
.. autoclass:: Float
- :members: __init__
:show-inheritance:
.. autoclass:: DateTime
- :members: __init__
:show-inheritance:
.. autoclass:: Date
- :members: __init__
:show-inheritance:
.. autoclass:: Time
- :members: __init__
:show-inheritance:
.. autoclass:: Interval
- :members: __init__
:show-inheritance:
.. autoclass:: Boolean
- :members: __init__
:show-inheritance:
.. autoclass:: Binary
- :members: __init__
:show-inheritance:
.. autoclass:: PickleType
- :members: __init__
:show-inheritance:
@@ -107,71 +92,54 @@ name when ``CREATE TABLE`` is issued. Some types may not be supported
on all databases.
.. autoclass:: INT
- :members: __init__
:show-inheritance:
.. autoclass:: sqlalchemy.types.INTEGER
- :members: __init__
:show-inheritance:
.. autoclass:: CHAR
- :members: __init__
:show-inheritance:
.. autoclass:: VARCHAR
- :members: __init__
:show-inheritance:
.. autoclass:: NCHAR
- :members: __init__
:show-inheritance:
.. autoclass:: TEXT
- :members: __init__
:show-inheritance:
.. autoclass:: FLOAT
- :members: __init__
:show-inheritance:
.. autoclass:: NUMERIC
- :members: __init__
:show-inheritance:
.. autoclass:: DECIMAL
- :members: __init__
:show-inheritance:
.. autoclass:: TIMESTAMP
- :members: __init__
:show-inheritance:
.. autoclass:: DATETIME
- :members: __init__
:show-inheritance:
.. autoclass:: CLOB
- :members: __init__
:show-inheritance:
.. autoclass:: BLOB
- :members: __init__
:show-inheritance:
.. autoclass:: BOOLEAN
- :members: __init__
:show-inheritance:
.. autoclass:: SMALLINT
- :members: __init__
:show-inheritance:
.. autoclass:: DATE
- :members: __init__
:show-inheritance:
.. autoclass:: TIME
- :members: __init__
:show-inheritance:
diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py
index cd5ef800b..4bb19d6ee 100644
--- a/lib/sqlalchemy/pool.py
+++ b/lib/sqlalchemy/pool.py
@@ -60,7 +60,8 @@ class Pool(object):
def __init__(self, creator, recycle=-1, echo=None, use_threadlocal=False,
reset_on_return=True, listeners=None):
- """Construct a Pool.
+ """
+ Construct a Pool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
@@ -455,10 +456,11 @@ class SingletonThreadPool(Pool):
default, and also requires a singleton connection if a :memory: database
is being used.
- Options are the same as those of Pool, as well as:
+ Options are the same as those of :class:`Pool`, as well as:
- pool_size: 5
- The number of threads in which to maintain connections at once.
+ :param pool_size: The number of threads in which to maintain connections
+ at once. Defaults to five.
+
"""
def __init__(self, creator, pool_size=5, **params):
@@ -529,7 +531,8 @@ class QueuePool(Pool):
def __init__(self, creator, pool_size=5, max_overflow=10, timeout=30,
**params):
- """Construct a QueuePool.
+ """
+ Construct a QueuePool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
@@ -692,7 +695,8 @@ class StaticPool(Pool):
"""A Pool of exactly one connection, used for all requests."""
def __init__(self, creator, **params):
- """Construct a StaticPool.
+ """
+ Construct a StaticPool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
@@ -766,7 +770,8 @@ class AssertionPool(Pool):
## TODO: modify this to handle an arbitrary connection count.
def __init__(self, creator, **params):
- """Construct an AssertionPool.
+ """
+ Construct an AssertionPool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py
index 0ca251eb1..70022b354 100644
--- a/lib/sqlalchemy/types.py
+++ b/lib/sqlalchemy/types.py
@@ -401,7 +401,8 @@ class String(Concatenable, TypeEngine):
"""
def __init__(self, length=None, convert_unicode=False, assert_unicode=None):
- """Create a string-holding type.
+ """
+ Create a string-holding type.
:param length: optional, a length for the column for use in
DDL statements. May be safely omitted if no ``CREATE
@@ -517,7 +518,8 @@ class Unicode(String):
"""
def __init__(self, length=None, **kwargs):
- """Create a Unicode-converting String type.
+ """
+ Create a Unicode-converting String type.
:param length: optional, a length for the column for use in
DDL statements. May be safely omitted if no ``CREATE
@@ -535,7 +537,8 @@ class UnicodeText(Text):
"""A synonym for Text(convert_unicode=True, assert_unicode='warn')."""
def __init__(self, length=None, **kwargs):
- """Create a Unicode-converting Text type.
+ """
+ Create a Unicode-converting Text type.
:param length: optional, a length for the column for use in
DDL statements. May be safely omitted if no ``CREATE
@@ -576,7 +579,8 @@ class Numeric(TypeEngine):
"""
def __init__(self, precision=10, scale=2, asdecimal=True, length=None):
- """Construct a Numeric.
+ """
+ Construct a Numeric.
:param precision: the numeric precision for use in DDL ``CREATE TABLE``.
@@ -625,7 +629,8 @@ class Float(Numeric):
"""A type for ``float`` numbers."""
def __init__(self, precision=10, asdecimal=False, **kwargs):
- """Construct a Float.
+ """
+ Construct a Float.
:param precision: the numeric precision for use in DDL ``CREATE TABLE``.
@@ -688,7 +693,8 @@ class Binary(TypeEngine):
"""
def __init__(self, length=None):
- """Construct a Binary type.
+ """
+ Construct a Binary type.
:param length: optional, a length for the column for use in
DDL statements. May be safely omitted if no ``CREATE
@@ -728,7 +734,8 @@ class PickleType(MutableType, TypeDecorator):
impl = Binary
def __init__(self, protocol=pickle.HIGHEST_PROTOCOL, pickler=None, mutable=True, comparator=None):
- """Construct a PickleType.
+ """
+ Construct a PickleType.
:param protocol: defaults to ``pickle.HIGHEST_PROTOCOL``.