summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/dialects/firebird/kinterbasdb.py2
-rw-r--r--lib/sqlalchemy/dialects/mysql/zxjdbc.py2
-rw-r--r--lib/sqlalchemy/dialects/oracle/base.py2
-rw-r--r--lib/sqlalchemy/dialects/oracle/cx_oracle.py4
-rw-r--r--lib/sqlalchemy/dialects/postgresql/hstore.py2
-rw-r--r--lib/sqlalchemy/dialects/postgresql/psycopg2.py4
-rw-r--r--lib/sqlalchemy/dialects/sqlite/base.py10
-rw-r--r--lib/sqlalchemy/engine/base.py2
-rw-r--r--lib/sqlalchemy/engine/interfaces.py4
-rw-r--r--lib/sqlalchemy/events.py12
-rw-r--r--lib/sqlalchemy/ext/automap.py2
-rw-r--r--lib/sqlalchemy/ext/declarative/__init__.py4
-rw-r--r--lib/sqlalchemy/ext/orderinglist.py2
-rw-r--r--lib/sqlalchemy/log.py2
-rw-r--r--lib/sqlalchemy/orm/attributes.py2
-rw-r--r--lib/sqlalchemy/orm/events.py6
-rw-r--r--lib/sqlalchemy/orm/mapper.py8
-rw-r--r--lib/sqlalchemy/orm/relationships.py2
-rw-r--r--lib/sqlalchemy/orm/session.py4
-rw-r--r--lib/sqlalchemy/orm/strategies.py4
-rw-r--r--lib/sqlalchemy/orm/util.py2
-rw-r--r--lib/sqlalchemy/schema.py2
-rw-r--r--lib/sqlalchemy/sql/compiler.py2
-rw-r--r--lib/sqlalchemy/sql/ddl.py4
-rw-r--r--lib/sqlalchemy/sql/elements.py10
-rw-r--r--lib/sqlalchemy/sql/schema.py8
-rw-r--r--lib/sqlalchemy/sql/selectable.py6
-rw-r--r--lib/sqlalchemy/sql/type_api.py2
-rw-r--r--lib/sqlalchemy/sql/util.py4
-rw-r--r--lib/sqlalchemy/testing/assertions.py2
-rw-r--r--lib/sqlalchemy/testing/engines.py2
-rw-r--r--lib/sqlalchemy/testing/entities.py2
-rw-r--r--lib/sqlalchemy/testing/requirements.py2
-rw-r--r--lib/sqlalchemy/types.py2
-rw-r--r--lib/sqlalchemy/util/_collections.py4
-rw-r--r--lib/sqlalchemy/util/langhelpers.py2
36 files changed, 68 insertions, 68 deletions
diff --git a/lib/sqlalchemy/dialects/firebird/kinterbasdb.py b/lib/sqlalchemy/dialects/firebird/kinterbasdb.py
index b8a83a07b..afd62ffd3 100644
--- a/lib/sqlalchemy/dialects/firebird/kinterbasdb.py
+++ b/lib/sqlalchemy/dialects/firebird/kinterbasdb.py
@@ -24,7 +24,7 @@ also accepts the following:
* ``concurrency_level`` - set the backend policy with regards to threading
issues: by default SQLAlchemy uses policy 1. See the linked documents
- below for futher information.
+ below for further information.
.. seealso::
diff --git a/lib/sqlalchemy/dialects/mysql/zxjdbc.py b/lib/sqlalchemy/dialects/mysql/zxjdbc.py
index b5fcfbdaf..5f8825f36 100644
--- a/lib/sqlalchemy/dialects/mysql/zxjdbc.py
+++ b/lib/sqlalchemy/dialects/mysql/zxjdbc.py
@@ -19,7 +19,7 @@ SQLAlchemy zxjdbc dialects pass unicode straight through to the
zxjdbc/JDBC layer. To allow multiple character sets to be sent from the
MySQL Connector/J JDBC driver, by default SQLAlchemy sets its
``characterEncoding`` connection property to ``UTF-8``. It may be
-overriden via a ``create_engine`` URL parameter.
+overridden via a ``create_engine`` URL parameter.
"""
import re
diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py
index 8bacb885f..5dcc93f79 100644
--- a/lib/sqlalchemy/dialects/oracle/base.py
+++ b/lib/sqlalchemy/dialects/oracle/base.py
@@ -961,7 +961,7 @@ class OracleDialect(default.DefaultDialect):
def get_table_names(self, connection, schema=None, **kw):
schema = self.denormalize_name(schema or self.default_schema_name)
- # note that table_names() isnt loading DBLINKed or synonym'ed tables
+ # note that table_names() isn't loading DBLINKed or synonym'ed tables
if schema is None:
schema = self.default_schema_name
s = sql.text(
diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py
index b8ee90b53..d485820f9 100644
--- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py
+++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py
@@ -255,7 +255,7 @@ The "decimal point is present" logic itself is also sensitive to
locale. Under OCI_, this is controlled by the NLS_LANG
environment variable. Upon first connection, the dialect runs a
test to determine the current "decimal" character, which can be
-a comma "," for european locales. From that point forward the
+a comma "," for European locales. From that point forward the
outputtypehandler uses that character to represent a decimal
point. Note that cx_oracle 5.0.3 or greater is required
when dealing with numerics with locale settings that don't use
@@ -741,7 +741,7 @@ class OracleDialect_cx_oracle(OracleDialect):
def _detect_decimal_char(self, connection):
"""detect if the decimal separator character is not '.', as
- is the case with european locale settings for NLS_LANG.
+ is the case with European locale settings for NLS_LANG.
cx_oracle itself uses similar logic when it formats Python
Decimal objects to strings on the bind side (as of 5.0.3),
diff --git a/lib/sqlalchemy/dialects/postgresql/hstore.py b/lib/sqlalchemy/dialects/postgresql/hstore.py
index 76562088d..74419460b 100644
--- a/lib/sqlalchemy/dialects/postgresql/hstore.py
+++ b/lib/sqlalchemy/dialects/postgresql/hstore.py
@@ -52,7 +52,7 @@ def _parse_error(hstore_str, pos):
def _parse_hstore(hstore_str):
- """Parse an hstore from it's literal string representation.
+ """Parse an hstore from its literal string representation.
Attempts to approximate PG's hstore input parsing rules as closely as
possible. Although currently this is not strictly necessary, since the
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py
index 714b9618c..c4f7c032d 100644
--- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py
+++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py
@@ -102,7 +102,7 @@ This overrides the encoding specified in the Postgresql client configuration.
:func:`.create_engine`.
SQLAlchemy can also be instructed to skip the usage of the psycopg2
-``UNICODE`` extension and to instead utilize it's own unicode encode/decode
+``UNICODE`` extension and to instead utilize its own unicode encode/decode
services, which are normally reserved only for those DBAPIs that don't
fully support unicode directly. Passing ``use_native_unicode=False`` to
:func:`.create_engine` will disable usage of ``psycopg2.extensions.UNICODE``.
@@ -169,7 +169,7 @@ connection, a sequence like the following is performed:
If this function returns a list of HSTORE identifiers, we then determine that
the ``HSTORE`` extension is present.
-2. If the ``use_native_hstore`` flag is at it's default of ``True``, and
+2. If the ``use_native_hstore`` flag is at its default of ``True``, and
we've detected that ``HSTORE`` oids are available, the
``psycopg2.extensions.register_hstore()`` extension is invoked for all
connections.
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py
index 90df9c192..7687493b2 100644
--- a/lib/sqlalchemy/dialects/sqlite/base.py
+++ b/lib/sqlalchemy/dialects/sqlite/base.py
@@ -100,7 +100,7 @@ table.
Constraint checking on SQLite has three prerequisites:
* At least version 3.6.19 of SQLite must be in use
-* The SQLite libary must be compiled *without* the SQLITE_OMIT_FOREIGN_KEY
+* The SQLite library must be compiled *without* the SQLITE_OMIT_FOREIGN_KEY
or SQLITE_OMIT_TRIGGER symbols enabled.
* The ``PRAGMA foreign_keys = ON`` statement must be emitted on all connections
before use.
@@ -244,7 +244,7 @@ class DATETIME(_DateTimeMixin, sqltypes.DateTime):
:param regexp: regular expression which will be applied to incoming result
rows. If the regexp contains named groups, the resulting match dict is
applied to the Python datetime() constructor as keyword arguments.
- Otherwise, if positional groups are used, the the datetime() constructor
+ Otherwise, if positional groups are used, the datetime() constructor
is called with positional arguments via
``*map(int, match_obj.groups(0))``.
"""
@@ -337,7 +337,7 @@ class DATE(_DateTimeMixin, sqltypes.Date):
incoming result rows. If the regexp contains named groups, the
resulting match dict is applied to the Python date() constructor
as keyword arguments. Otherwise, if positional groups are used, the
- the date() constructor is called with positional arguments via
+ date() constructor is called with positional arguments via
``*map(int, match_obj.groups(0))``.
"""
@@ -397,7 +397,7 @@ class TIME(_DateTimeMixin, sqltypes.Time):
:param regexp: regular expression which will be applied to incoming result
rows. If the regexp contains named groups, the resulting match dict is
applied to the Python time() constructor as keyword arguments. Otherwise,
- if positional groups are used, the the time() constructor is called with
+ if positional groups are used, the time() constructor is called with
positional arguments via ``*map(int, match_obj.groups(0))``.
"""
@@ -874,7 +874,7 @@ class SQLiteDialect(default.DefaultDialect):
def _resolve_type_affinity(self, type_):
"""Return a data type from a reflected column, using affinity tules.
- SQLite's goal for universal compatability introduces some complexity
+ SQLite's goal for universal compatibility introduces some complexity
during reflection, as a column's defined type might not actually be a
type that SQLite understands - or indeed, my not be defined *at all*.
Internally, SQLite handles this with a 'data type affinity' for each
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index 9f656cac8..bb3b82eea 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -1078,7 +1078,7 @@ class Connection(Connectable):
self._reentrant_error = True
try:
# non-DBAPI error - if we already got a context,
- # or theres no string statement, don't wrap it
+ # or there's no string statement, don't wrap it
should_wrap = isinstance(e, self.dialect.dbapi.Error) or \
(statement is not None and context is None)
diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py
index 737225863..22801c284 100644
--- a/lib/sqlalchemy/engine/interfaces.py
+++ b/lib/sqlalchemy/engine/interfaces.py
@@ -189,7 +189,7 @@ class Dialect(object):
The connection passed here is a SQLAlchemy Connection object,
with full capabilities.
- The initalize() method of the base dialect should be called via
+ The initialize() method of the base dialect should be called via
super().
"""
@@ -443,7 +443,7 @@ class Dialect(object):
:meth:`.Dialect.do_autocommit`
hook is provided for DBAPIs that need some extra commands emitted
after a commit in order to enter the next transaction, when the
- SQLAlchemy :class:`.Connection` is used in it's default "autocommit"
+ SQLAlchemy :class:`.Connection` is used in its default "autocommit"
mode.
:param dbapi_connection: a DBAPI connection, typically
diff --git a/lib/sqlalchemy/events.py b/lib/sqlalchemy/events.py
index 9ba6de68b..908ce378f 100644
--- a/lib/sqlalchemy/events.py
+++ b/lib/sqlalchemy/events.py
@@ -74,7 +74,7 @@ class DDLEvents(event.Events):
_dispatch_target = SchemaEventTarget
def before_create(self, target, connection, **kw):
- """Called before CREATE statments are emitted.
+ """Called before CREATE statements are emitted.
:param target: the :class:`.MetaData` or :class:`.Table`
object which is the target of the event.
@@ -90,7 +90,7 @@ class DDLEvents(event.Events):
"""
def after_create(self, target, connection, **kw):
- """Called after CREATE statments are emitted.
+ """Called after CREATE statements are emitted.
:param target: the :class:`.MetaData` or :class:`.Table`
object which is the target of the event.
@@ -106,7 +106,7 @@ class DDLEvents(event.Events):
"""
def before_drop(self, target, connection, **kw):
- """Called before DROP statments are emitted.
+ """Called before DROP statements are emitted.
:param target: the :class:`.MetaData` or :class:`.Table`
object which is the target of the event.
@@ -122,7 +122,7 @@ class DDLEvents(event.Events):
"""
def after_drop(self, target, connection, **kw):
- """Called after DROP statments are emitted.
+ """Called after DROP statements are emitted.
:param target: the :class:`.MetaData` or :class:`.Table`
object which is the target of the event.
@@ -348,7 +348,7 @@ class PoolEvents(event.Events):
The :meth:`.PoolEvents.reset` event is usually followed by the
- the :meth:`.PoolEvents.checkin` event is called, except in those
+ :meth:`.PoolEvents.checkin` event is called, except in those
cases where the connection is discarded immediately after reset.
:param dbapi_connection: a DBAPI connection.
@@ -611,7 +611,7 @@ class ConnectionEvents(event.Events):
This event is called with the DBAPI exception instance
received from the DBAPI itself, *before* SQLAlchemy wraps the
- exception with it's own exception wrappers, and before any
+ exception with its own exception wrappers, and before any
other operations are performed on the DBAPI cursor; the
existing transaction remains in effect as well as any state
on the cursor.
diff --git a/lib/sqlalchemy/ext/automap.py b/lib/sqlalchemy/ext/automap.py
index dfc838da3..922ba1642 100644
--- a/lib/sqlalchemy/ext/automap.py
+++ b/lib/sqlalchemy/ext/automap.py
@@ -231,7 +231,7 @@ by which this works for many-to-one and one-to-many relationships is as follows:
object present is matched up to the class to which it is to be mapped,
if any, else it is skipped.
-3. As the :class:`.ForeignKeyConstraint` we are examining correponds to a reference
+3. As the :class:`.ForeignKeyConstraint` we are examining corresponds to a reference
from the immediate mapped class,
the relationship will be set up as a many-to-one referring to the referred class;
a corresponding one-to-many backref will be created on the referred class referring
diff --git a/lib/sqlalchemy/ext/declarative/__init__.py b/lib/sqlalchemy/ext/declarative/__init__.py
index 4010789b6..a77405e54 100644
--- a/lib/sqlalchemy/ext/declarative/__init__.py
+++ b/lib/sqlalchemy/ext/declarative/__init__.py
@@ -971,7 +971,7 @@ The condition above is resolved using a lambda::
primaryjoin=lambda: Target.id==cls.target_id
)
-or alternatively, the string form (which ultmately generates a lambda)::
+or alternatively, the string form (which ultimately generates a lambda)::
class RefTargetMixin(object):
@declared_attr
@@ -1053,7 +1053,7 @@ string values to an implementing class::
Above, the ``HasStringCollection`` mixin produces a :func:`.relationship`
which refers to a newly generated class called ``StringAttribute``. The
-``StringAttribute`` class is generated with it's own :class:`.Table`
+``StringAttribute`` class is generated with its own :class:`.Table`
definition which is local to the parent class making usage of the
``HasStringCollection`` mixin. It also produces an :func:`.association_proxy`
object which proxies references to the ``strings`` attribute onto the ``value``
diff --git a/lib/sqlalchemy/ext/orderinglist.py b/lib/sqlalchemy/ext/orderinglist.py
index c4ba6d571..5ea4a6a90 100644
--- a/lib/sqlalchemy/ext/orderinglist.py
+++ b/lib/sqlalchemy/ext/orderinglist.py
@@ -103,7 +103,7 @@ attribute, so that the ordering is correct when first loaded.
SQLAlchemy's unit of work performs all INSERTs before DELETEs within a
single flush. In the case of a primary key, it will trade
an INSERT/DELETE of the same primary key for an UPDATE statement in order
- to lessen the impact of this lmitation, however this does not take place
+ to lessen the impact of this limitation, however this does not take place
for a UNIQUE column.
A future feature will allow the "DELETE before INSERT" behavior to be
possible, allevating this limitation, though this feature will require
diff --git a/lib/sqlalchemy/log.py b/lib/sqlalchemy/log.py
index 935761d5f..b42bd3dbd 100644
--- a/lib/sqlalchemy/log.py
+++ b/lib/sqlalchemy/log.py
@@ -21,7 +21,7 @@ import logging
import sys
# set initial level to WARN. This so that
-# log statements don't occur in the absense of explicit
+# log statements don't occur in the absence of explicit
# logging being enabled for 'sqlalchemy'.
rootlogger = logging.getLogger('sqlalchemy')
if rootlogger.level == logging.NOTSET:
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index 3a786c73d..bf7dab4e7 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -98,7 +98,7 @@ class QueryableAttribute(interfaces._MappedAttribute,
any other kind of SQL expression other than a :class:`.Column`,
the attribute will refer to the :attr:`.MapperProperty.info` dictionary
associated directly with the :class:`.ColumnProperty`, assuming the SQL
- expression itself does not have it's own ``.info`` attribute
+ expression itself does not have its own ``.info`` attribute
(which should be the case, unless a user-defined SQL construct
has defined one).
diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py
index 078f4d12f..6bc6b17ff 100644
--- a/lib/sqlalchemy/orm/events.py
+++ b/lib/sqlalchemy/orm/events.py
@@ -1648,7 +1648,7 @@ class AttributeEvents(event.Events):
replaces it.
:param initiator: An instance of :class:`.attributes.Event`
representing the initiation of the event. May be modified
- from it's original value by backref handlers in order to control
+ from its original value by backref handlers in order to control
chained event propagation.
.. versionchanged:: 0.9.0 the ``initiator`` argument is now
@@ -1669,7 +1669,7 @@ class AttributeEvents(event.Events):
:param value: the value being removed.
:param initiator: An instance of :class:`.attributes.Event`
representing the initiation of the event. May be modified
- from it's original value by backref handlers in order to control
+ from its original value by backref handlers in order to control
chained event propagation.
.. versionchanged:: 0.9.0 the ``initiator`` argument is now
@@ -1697,7 +1697,7 @@ class AttributeEvents(event.Events):
or expired.
:param initiator: An instance of :class:`.attributes.Event`
representing the initiation of the event. May be modified
- from it's original value by backref handlers in order to control
+ from its original value by backref handlers in order to control
chained event propagation.
.. versionchanged:: 0.9.0 the ``initiator`` argument is now
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index a939cb9c7..3e93840a1 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -210,7 +210,7 @@ class Mapper(_InspectionAttr):
See the section :ref:`concrete_inheritance` for an example.
:param confirm_deleted_rows: defaults to True; when a DELETE occurs
- of one more more rows based on specific primary keys, a warning is
+ of one more rows based on specific primary keys, a warning is
emitted when the number of rows matched does not equal the number
of rows expected. This parameter may be set to False to handle the case
where database ON DELETE CASCADE rules may be deleting some of those
@@ -913,7 +913,7 @@ class Mapper(_InspectionAttr):
if self.inherit_condition is None:
# figure out inherit condition from our table to the
# immediate table of the inherited mapper, not its
- # full table which could pull in other stuff we dont
+ # full table which could pull in other stuff we don't
# want (allows test/inheritance.InheritTest4 to pass)
self.inherit_condition = sql_util.join_condition(
self.inherits.local_table,
@@ -1311,7 +1311,7 @@ class Mapper(_InspectionAttr):
setter = True
if isinstance(self.polymorphic_on, util.string_types):
- # polymorphic_on specified as as string - link
+ # polymorphic_on specified as a string - link
# it to mapped ColumnProperty
try:
self.polymorphic_on = self._props[self.polymorphic_on]
@@ -2463,7 +2463,7 @@ class Mapper(_InspectionAttr):
# attempt to skip dependencies that are not
# significant to the inheritance chain
# for two tables that are related by inheritance.
- # while that dependency may be important, it's techinically
+ # while that dependency may be important, it's technically
# not what we mean to sort on here.
parent = table_to_mapper.get(fk.parent.table)
dep = table_to_mapper.get(fk.column.table)
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py
index 0d9ee87b3..b7992c9bd 100644
--- a/lib/sqlalchemy/orm/relationships.py
+++ b/lib/sqlalchemy/orm/relationships.py
@@ -666,7 +666,7 @@ class RelationshipProperty(StrategizedProperty):
.. seealso::
- :ref:`self_referential` - in-depth explaination of how
+ :ref:`self_referential` - in-depth explanation of how
:paramref:`~.relationship.remote_side`
is used to configure self-referential relationships.
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index 613ca82c4..89d9946ee 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -1016,7 +1016,7 @@ class Session(_SessionClassMethods):
self._deleted = {}
# TODO: need much more test coverage for bind_mapper() and similar !
- # TODO: + crystalize + document resolution order
+ # TODO: + crystallize + document resolution order
# vis. bind_mapper/bind_table
def bind_mapper(self, mapper, bind):
@@ -1194,7 +1194,7 @@ class Session(_SessionClassMethods):
e.add_detail(
"raised as a result of Query-invoked autoflush; "
"consider using a session.no_autoflush block if this "
- "flush is occuring prematurely")
+ "flush is occurring prematurely")
util.raise_from_cause(e)
def refresh(self, instance, attribute_names=None, lockmode=None):
diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py
index 4a07e7856..3ebadd62b 100644
--- a/lib/sqlalchemy/orm/strategies.py
+++ b/lib/sqlalchemy/orm/strategies.py
@@ -1033,7 +1033,7 @@ class JoinedLoader(AbstractRelationshipLoader):
def setup_query(self, context, entity, path, loadopt, adapter, \
column_collection=None, parentmapper=None,
**kwargs):
- """Add a left outer join to the statement thats being constructed."""
+ """Add a left outer join to the statement that's being constructed."""
if not context.query._enable_eagerloads:
return
@@ -1337,7 +1337,7 @@ class JoinedLoader(AbstractRelationshipLoader):
self.mapper.identity_key_from_row(row, decorator)
return decorator
except KeyError:
- # no identity key - dont return a row
+ # no identity key - don't return a row
# processor, will cause a degrade to lazy
return False
diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py
index dd85f2ef1..8694705a4 100644
--- a/lib/sqlalchemy/orm/util.py
+++ b/lib/sqlalchemy/orm/util.py
@@ -141,7 +141,7 @@ def polymorphic_union(table_map, typecolname,
for key in table_map:
table = table_map[key]
- # mysql doesnt like selecting from a select;
+ # mysql doesn't like selecting from a select;
# make it an alias of the select
if isinstance(table, sql.Select):
table = table.alias()
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py
index 8556272a6..743d1b40e 100644
--- a/lib/sqlalchemy/schema.py
+++ b/lib/sqlalchemy/schema.py
@@ -4,7 +4,7 @@
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
-"""Compatiblity namespace for sqlalchemy.sql.schema and related.
+"""Compatibility namespace for sqlalchemy.sql.schema and related.
"""
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 31193ab17..169dc2cc3 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -2143,7 +2143,7 @@ class SQLCompiler(Compiled):
c in implicit_return_defaults:
self.returning.append(c)
elif not c.primary_key:
- # dont add primary key column to postfetch
+ # don't add primary key column to postfetch
self.postfetch.append(c)
else:
values.append(
diff --git a/lib/sqlalchemy/sql/ddl.py b/lib/sqlalchemy/sql/ddl.py
index bda876502..2a282ed57 100644
--- a/lib/sqlalchemy/sql/ddl.py
+++ b/lib/sqlalchemy/sql/ddl.py
@@ -295,7 +295,7 @@ class DDL(DDLElement):
%(fullname)s - the Table name including schema, quoted if needed
The DDL's "context", if any, will be combined with the standard
- substutions noted above. Keys present in the context will override
+ substitutions noted above. Keys present in the context will override
the standard substitutions.
"""
@@ -394,7 +394,7 @@ class DDL(DDLElement):
class _CreateDropBase(DDLElement):
- """Base class for DDL constucts that represent CREATE and DROP or
+ """Base class for DDL constructs that represent CREATE and DROP or
equivalents.
The common theme of _CreateDropBase is a single
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index 5ebc7478a..aef3a6c85 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -143,7 +143,7 @@ def type_coerce(expression, type_):
passed to :func:`.type_coerce` as targets.
For example, if a type implements the :meth:`.TypeEngine.bind_expression`
method or :meth:`.TypeEngine.bind_processor` method or equivalent,
- these functions will take effect at statement compliation/execution time
+ these functions will take effect at statement compilation/execution time
when a literal value is passed, as in::
# bound-value handling of MyStringType will be applied to the
@@ -158,7 +158,7 @@ def type_coerce(expression, type_):
or a Python string which will be coerced into a bound literal value.
:param type_: A :class:`.TypeEngine` class or instance indicating
- the type to which the the expression is coerced.
+ the type to which the expression is coerced.
.. seealso::
@@ -854,7 +854,7 @@ class BindParameter(ColumnElement):
expr = users_table.c.name == 'Wendy'
The above expression will produce a :class:`.BinaryExpression`
- contruct, where the left side is the :class:`.Column` object
+ construct, where the left side is the :class:`.Column` object
representing the ``name`` column, and the right side is a :class:`.BindParameter`
representing the literal value::
@@ -1916,7 +1916,7 @@ class Case(ColumnElement):
languages. It returns an instance of :class:`.Case`.
:func:`.case` in its usual form is passed a list of "when"
- contructs, that is, a list of conditions and results as tuples::
+ constructs, that is, a list of conditions and results as tuples::
from sqlalchemy import case
@@ -2508,7 +2508,7 @@ class BinaryExpression(ColumnElement):
"""Represent an expression that is ``LEFT <operator> RIGHT``.
A :class:`.BinaryExpression` is generated automatically
- whenever two column expressions are used in a Python binary expresion::
+ whenever two column expressions are used in a Python binary expression::
>>> from sqlalchemy.sql import column
>>> column('a') + column('b')
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index 2aad60c8f..e8f1ffae1 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -1836,7 +1836,7 @@ class ColumnDefault(DefaultGenerator):
def _maybe_wrap_callable(self, fn):
"""Wrap callables that don't accept a context.
- This is to allow easy compatiblity with default callables
+ This is to allow easy compatibility with default callables
that aren't specific to accepting of a context.
"""
@@ -2785,7 +2785,7 @@ class Index(DialectKWArgs, ColumnCollectionMixin, SchemaItem):
:param \*expressions:
Column expressions to include in the index. The expressions
are normally instances of :class:`.Column`, but may also
- be arbitrary SQL expressions which ultmately refer to a
+ be arbitrary SQL expressions which ultimately refer to a
:class:`.Column`.
:param unique=False:
@@ -2973,7 +2973,7 @@ class MetaData(SchemaItem):
The values associated with each "constraint class" or "constraint
mnemonic" key are string naming templates, such as
``"uq_%(table_name)s_%(column_0_name)s"``,
- which decribe how the name should be composed. The values associated
+ which describe how the name should be composed. The values associated
with user-defined "token" keys should be callables of the form
``fn(constraint, table)``, which accepts the constraint/index
object and :class:`.Table` as arguments, returning a string
@@ -3387,7 +3387,7 @@ class ThreadLocalMetaData(MetaData):
self.__engines[bind] = e
self.context._engine = e
else:
- # TODO: this is squirrely. we shouldnt have to hold onto engines
+ # TODO: this is squirrely. we shouldn't have to hold onto engines
# in a case like this
if bind not in self.__engines:
self.__engines[bind] = bind
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index afcf437e9..61abe815d 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -2060,7 +2060,7 @@ class Select(HasPrefixes, GenerativeSelect):
Use this parameter to explicitly specify "from" objects which are not
automatically locatable. This could include
:class:`~sqlalchemy.schema.Table` objects that aren't otherwise present,
- or :class:`.Join` objects whose presence will supercede that of the
+ or :class:`.Join` objects whose presence will supersede that of the
:class:`~sqlalchemy.schema.Table` objects already located in the other
clauses.
@@ -2403,7 +2403,7 @@ class Select(HasPrefixes, GenerativeSelect):
# here is the same item is _correlate as in _from_obj but the
# _correlate version has an annotation on it - (specifically
# RelationshipProperty.Comparator._criterion_exists() does
- # this). Also keep _correlate liberally open with it's previous
+ # this). Also keep _correlate liberally open with its previous
# contents, as this set is used for matching, not rendering.
self._correlate = set(clone(f) for f in
self._correlate).union(self._correlate)
@@ -2411,7 +2411,7 @@ class Select(HasPrefixes, GenerativeSelect):
# 4. clone other things. The difficulty here is that Column
# objects are not actually cloned, and refer to their original
# .table, resulting in the wrong "from" parent after a clone
- # operation. Hence _from_cloned and _from_obj supercede what is
+ # operation. Hence _from_cloned and _from_obj supersede what is
# present here.
self._raw_columns = [clone(c, **kw) for c in self._raw_columns]
for attr in '_whereclause', '_having', '_order_by_clause', \
diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py
index 1f534c55e..48b447b37 100644
--- a/lib/sqlalchemy/sql/type_api.py
+++ b/lib/sqlalchemy/sql/type_api.py
@@ -1050,7 +1050,7 @@ def adapt_type(typeobj, colspecs):
except KeyError:
pass
else:
- # couldnt adapt - so just return the type itself
+ # couldn't adapt - so just return the type itself
# (it may be a user-defined type)
return typeobj
# if we adapted the given generic type to a database-specific type,
diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py
index 50ce30aaf..639f53ddc 100644
--- a/lib/sqlalchemy/sql/util.py
+++ b/lib/sqlalchemy/sql/util.py
@@ -94,7 +94,7 @@ def visit_binary_product(fn, expr):
def visit(element):
if isinstance(element, ScalarSelect):
- # we dont want to dig into correlated subqueries,
+ # we don't want to dig into correlated subqueries,
# those are just column elements by themselves
yield element
elif element.__visit_name__ == 'binary' and \
@@ -321,7 +321,7 @@ def reduce_columns(columns, *clauses, **kw):
This function is primarily used to determine the most minimal "primary key"
from a selectable, by reducing the set of primary key columns present
- in the the selectable to just those that are not repeated.
+ in the selectable to just those that are not repeated.
"""
ignore_nonexistent_tables = kw.pop('ignore_nonexistent_tables', False)
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index edc9df047..9373e2dc4 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -172,7 +172,7 @@ def _assert_no_stray_pool_connections():
# so the error doesn't at least keep happening.
pool._refs.clear()
_STRAY_CONNECTION_FAILURES = 0
- assert False, "Stray conections in cleanup: %s" % err
+ assert False, "Stray connections in cleanup: %s" % err
def eq_(a, b, msg=None):
diff --git a/lib/sqlalchemy/testing/engines.py b/lib/sqlalchemy/testing/engines.py
index d27be3cde..1d1498620 100644
--- a/lib/sqlalchemy/testing/engines.py
+++ b/lib/sqlalchemy/testing/engines.py
@@ -57,7 +57,7 @@ class ConnectionKiller(object):
def _after_test_ctx(self):
# this can cause a deadlock with pg8000 - pg8000 acquires
- # prepared statment lock inside of rollback() - if async gc
+ # prepared statement lock inside of rollback() - if async gc
# is collecting in finalize_fairy, deadlock.
# not sure if this should be if pypy/jython only.
# note that firebird/fdb definitely needs this though
diff --git a/lib/sqlalchemy/testing/entities.py b/lib/sqlalchemy/testing/entities.py
index 9309abfd8..ccde77a7e 100644
--- a/lib/sqlalchemy/testing/entities.py
+++ b/lib/sqlalchemy/testing/entities.py
@@ -57,7 +57,7 @@ class ComparableEntity(BasicEntity):
_recursion_stack.add(id(self))
try:
- # pick the entity thats not SA persisted as the source
+ # pick the entity that's not SA persisted as the source
try:
self_key = sa.orm.attributes.instance_state(self).key
except sa.orm.exc.NO_STATE:
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py
index 07b5697e2..04e8ad272 100644
--- a/lib/sqlalchemy/testing/requirements.py
+++ b/lib/sqlalchemy/testing/requirements.py
@@ -10,7 +10,7 @@ Provides decorators to mark tests requiring specific feature support from the
target database.
External dialect test suites should subclass SuiteRequirements
-to provide specific inclusion/exlusions.
+to provide specific inclusion/exclusions.
"""
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py
index 3994bd4a8..31d1dbac0 100644
--- a/lib/sqlalchemy/types.py
+++ b/lib/sqlalchemy/types.py
@@ -4,7 +4,7 @@
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
-"""Compatiblity namespace for sqlalchemy.sql.types.
+"""Compatibility namespace for sqlalchemy.sql.types.
"""
diff --git a/lib/sqlalchemy/util/_collections.py b/lib/sqlalchemy/util/_collections.py
index c0a24ba4f..be80a072e 100644
--- a/lib/sqlalchemy/util/_collections.py
+++ b/lib/sqlalchemy/util/_collections.py
@@ -859,7 +859,7 @@ class LRUCache(dict):
try:
del self[item[0]]
except KeyError:
- # if we couldnt find a key, most
+ # if we couldn't find a key, most
# likely some other thread broke in
# on us. loop around and try again
break
@@ -908,7 +908,7 @@ class ScopedRegistry(object):
return self.scopefunc() in self.registry
def set(self, obj):
- """Set the value forthe current scope."""
+ """Set the value for the current scope."""
self.registry[self.scopefunc()] = obj
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index 8a1164e77..ad1c286f3 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -200,7 +200,7 @@ def get_cls_kwargs(cls, _set=None):
Probes a class's __init__ method, collecting all named arguments. If the
__init__ defines a \**kwargs catch-all, then the constructor is presumed to
- pass along unrecognized keywords to it's base classes, and the collection
+ pass along unrecognized keywords to its base classes, and the collection
process is repeated recursively on each of the bases.
Uses a subset of inspect.getargspec() to cut down on method overhead.