From: Alex Gaynor Date: Sat, 26 Apr 2014 20:13:13 +0000 (-0700) Subject: Fix many typos throughout the codebase X-Git-Tag: rel_0_8_7~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43d99ac61befcf485b8ea27cf5130e9f7e2b3223;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix many typos throughout the codebase cherry pick of those parts of 1caa7fa which went in without issue Found using: https://github.com/intgr/topy --- diff --git a/doc/build/changelog/changelog_01.rst b/doc/build/changelog/changelog_01.rst index 0f66f99e45..a8ce578f5c 100644 --- a/doc/build/changelog/changelog_01.rst +++ b/doc/build/changelog/changelog_01.rst @@ -48,7 +48,7 @@ :tags: :tickets: - types types types! still werent working....have to use TypeDecorator again :( + types types types! still weren't working....have to use TypeDecorator again :( .. change:: :tags: @@ -477,7 +477,7 @@ :tickets: fixed attributes bug where if an object is committed, its lazy-loaded list got - blown away if it hadnt been loaded + blown away if it hadn't been loaded .. change:: :tags: @@ -854,11 +854,11 @@ :tags: :tickets: - two issues related to postgres, which doesnt want to give you the "lastrowid" + two issues related to postgres, which doesn't want to give you the "lastrowid" since oids are deprecated: * postgres database-side defaults that are on primary key cols *do* execute - explicitly beforehand, even though thats not the idea of a PassiveDefault. this is + explicitly beforehand, even though that's not the idea of a PassiveDefault. this is because sequences on columns get reflected as PassiveDefaults, but need to be explicitly executed on a primary key col so we know what we just inserted. * if you did add a row that has a bunch of database-side defaults on it, diff --git a/doc/build/changelog/changelog_02.rst b/doc/build/changelog/changelog_02.rst index d85d57fdf6..3b926fa2b0 100644 --- a/doc/build/changelog/changelog_02.rst +++ b/doc/build/changelog/changelog_02.rst @@ -81,7 +81,7 @@ unit-of-work does a better check for "orphaned" objects that are part of a "delete-orphan" cascade, for certain conditions where the - parent isnt available to cascade from. + parent isn't available to cascade from. .. change:: :tags: @@ -164,7 +164,7 @@ so far will convert this to "TIME[STAMP] (WITH|WITHOUT) TIME ZONE", so that control over timezone presence is more controllable (psycopg2 returns datetimes with tzinfo's if available, which can create confusion - against datetimes that dont). + against datetimes that don't). .. change:: :tags: @@ -229,8 +229,8 @@ with the session, and the INSERT statements are then sorted within the mapper save_obj. the INSERT ordering has basically been pushed all the way to the end of the flush cycle. that way the various sorts and - organizations occuring within UOWTask (particularly the circular task - sort) dont have to worry about maintaining order (which they werent anyway) + organizations occurring within UOWTask (particularly the circular task + sort) don't have to worry about maintaining order (which they weren't anyway) .. change:: :tags: @@ -392,7 +392,7 @@ :tags: :tickets: - overhaul to MapperExtension calling scheme, wasnt working very well + overhaul to MapperExtension calling scheme, wasn't working very well previously .. change:: @@ -432,7 +432,7 @@ :tags: :tickets: - select_table mappers *still* werent always compiling + select_table mappers *still* weren't always compiling .. change:: :tags: @@ -647,7 +647,7 @@ :tickets: 206 utterly remarkable: added a single space between 'CREATE TABLE' - and '(' since *thats how MySQL indicates a non- + and '(' since *that's how MySQL indicates a non- reserved word tablename.....* .. change:: @@ -743,7 +743,7 @@ of an attribute is no longer micromanaged with each change and is instead part of a "CommittedState" object created when the instance is first loaded. HistoryArraySet is gone, the behavior of - list attributes is now more open ended (i.e. theyre not sets anymore). + list attributes is now more open ended (i.e. they're not sets anymore). .. change:: :tags: @@ -757,7 +757,7 @@ :tickets: fix to transaction control, so that repeated rollback() calls - dont fail (was failing pretty badly when flush() would raise + don't fail (was failing pretty badly when flush() would raise an exception in a larger try/except transaction block) .. change:: @@ -771,14 +771,14 @@ :tags: :tickets: - fixed bug where tables with schema names werent getting indexed in + fixed bug where tables with schema names weren't getting indexed in the MetaData object properly .. change:: :tags: :tickets: 207 - fixed bug where Column with redefined "key" property wasnt getting + fixed bug where Column with redefined "key" property wasn't getting type conversion happening in the ResultProxy .. change:: @@ -792,7 +792,7 @@ :tickets: fixed old bug where if a many-to-many table mapped as "secondary" - had extra columns, delete operations didnt work + had extra columns, delete operations didn't work .. change:: :tags: @@ -811,7 +811,7 @@ :tickets: 138 added NonExistentTable exception thrown when reflecting a table - that doesnt exist + that doesn't exist .. change:: :tags: @@ -1010,7 +1010,7 @@ :tags: :tickets: - placeholder dispose() method added to SingletonThreadPool, doesnt + placeholder dispose() method added to SingletonThreadPool, doesn't do anything yet .. change:: @@ -1018,7 +1018,7 @@ :tickets: rollback() is automatically called when an exception is raised, - but only if theres no transaction in process (i.e. works more like + but only if there's no transaction in process (i.e. works more like autocommit). .. change:: @@ -1114,7 +1114,7 @@ "oid" system has been totally moved into compile-time behavior; if they are used in an order_by where they are not available, the order_by - doesnt get compiled, fixes + doesn't get compiled, fixes .. change:: :tags: diff --git a/doc/build/changelog/changelog_03.rst b/doc/build/changelog/changelog_03.rst index 05e10e6649..7c0a1af26b 100644 --- a/doc/build/changelog/changelog_03.rst +++ b/doc/build/changelog/changelog_03.rst @@ -25,7 +25,7 @@ :tags: sql :tickets: 768 - dont assume join criterion consists only of column objects + don't assume join criterion consists only of column objects .. change:: :tags: sql @@ -305,7 +305,7 @@ :tags: sql :tickets: - ForeignKey to a table in a schema thats not the default schema + ForeignKey to a table in a schema that's not the default schema requires the schema to be explicit; i.e. ForeignKey('alt_schema.users.id') .. change:: @@ -558,7 +558,7 @@ :tags: sqlite :tickets: 603 - string PK column inserts dont get overwritten with OID + string PK column inserts don't get overwritten with OID .. change:: :tags: mssql @@ -634,7 +634,7 @@ parenthesis are applied to clauses via a new _Grouping construct. uses operator precedence to more intelligently apply parenthesis to clauses, provides cleaner nesting of clauses - (doesnt mutate clauses placed in other clauses, i.e. no 'parens' + (doesn't mutate clauses placed in other clauses, i.e. no 'parens' flag) .. change:: @@ -648,7 +648,7 @@ :tags: sql :tickets: 578 - removed "no group by's in a select thats part of a UNION" + removed "no group by's in a select that's part of a UNION" restriction .. change:: @@ -666,7 +666,7 @@ :tags: orm :tickets: - fixed bug in query.instances() that wouldnt handle more than + fixed bug in query.instances() that wouldn't handle more than on additional mapper or one additional column. .. change:: @@ -923,7 +923,7 @@ means their lengths are dialect-dependent. So on oracle a label that gets truncated to 30 chars will go out to 63 characters on postgres. Also, the true labelname is always attached as the - accessor on the parent Selectable so theres no need to be aware + accessor on the parent Selectable so there's no need to be aware of the "truncated" label names. .. change:: @@ -941,7 +941,7 @@ :tickets: 513 the "mini" column labels generated when using subqueries, which - are to work around glitchy SQLite behavior that doesnt understand + are to work around glitchy SQLite behavior that doesn't understand "foo.id" as equivalent to "id", are now only generated in the case that those named columns are selected from (part of) @@ -1120,7 +1120,7 @@ :tickets: mysql uses "DESCRIBE.", catching exceptions - if table doesnt exist, in order to determine if a table exists. + if table doesn't exist, in order to determine if a table exists. this supports unicode table names as well as schema names. tested with MySQL5 but should work with 4.1 series as well. (#557) @@ -1372,7 +1372,7 @@ more fixes to polymorphic relations, involving proper lazy-clause generation on many-to-one relationships to polymorphic mappers. also fixes to detection of "direction", more specific targeting of columns that belong to the polymorphic union vs. those - that dont. + that don't. .. change:: :tags: orm @@ -1468,7 +1468,7 @@ got binary working for any size input ! cx_oracle works fine, it was my fault as BINARY was being passed and not BLOB for - setinputsizes (also unit tests werent even setting input sizes). + setinputsizes (also unit tests weren't even setting input sizes). .. change:: :tags: oracle @@ -1798,7 +1798,7 @@ :tags: orm, bugs :tickets: - fix to deferred so that load operation doesnt mistakenly occur when only + fix to deferred so that load operation doesn't mistakenly occur when only PK col attributes are set .. change:: @@ -1948,7 +1948,7 @@ :tickets: type system slightly modified to support TypeDecorators that can be - overridden by the dialect (ok, thats not very clear, it allows the mssql + overridden by the dialect (ok, that's not very clear, it allows the mssql tweak below to be possible) .. change:: @@ -1998,7 +1998,7 @@ :tickets: 420 mysql is inconsistent with what kinds of quotes it uses in foreign keys - during a SHOW CREATE TABLE, reflection updated to accomodate for all three + during a SHOW CREATE TABLE, reflection updated to accommodate for all three styles .. change:: @@ -2133,7 +2133,7 @@ :tags: orm :tickets: 407 - fixed bug in mapper refresh/expire whereby eager loaders didnt properly + fixed bug in mapper refresh/expire whereby eager loaders didn't properly re-populate item lists .. change:: @@ -2265,7 +2265,7 @@ :tickets: MySQL detects errors 2006 (server has gone away) and 2014 - (commands out of sync) and invalidates the connection on which it occured. + (commands out of sync) and invalidates the connection on which it occurred. .. change:: :tags: @@ -2304,7 +2304,7 @@ :tickets: added onupdate and ondelete keyword arguments to ForeignKey; propagate - to underlying ForeignKeyConstraint if present. (dont propagate in the + to underlying ForeignKeyConstraint if present. (don't propagate in the other direction, however) .. change:: @@ -2415,9 +2415,9 @@ fixed bug in circular dependency sorting at flush time; if object A contained a cyclical many-to-one relationship to object B, and object B - was just attached to object A, *but* object B itself wasnt changed, + was just attached to object A, *but* object B itself wasn't changed, the many-to-one synchronize of B's primary key attribute to A's foreign key - attribute wouldnt occur. + attribute wouldn't occur. .. change:: :tags: orm @@ -2572,7 +2572,7 @@ a fair amount of cleanup to the schema package, removal of ambiguous methods, methods that are no longer needed. slightly more constrained - useage, greater emphasis on explicitness + usage, greater emphasis on explicitness .. change:: :tags: schema @@ -2671,7 +2671,7 @@ :tags: connections/pooling/execution :tickets: - fixed bug where Connection wouldnt lose its Transaction + fixed bug where Connection wouldn't lose its Transaction after commit/rollback .. change:: @@ -2744,7 +2744,7 @@ including the addition of a MutableType mixin which is implemented by PickleType. unit-of-work now tracks the "dirty" list as an expression of all persistent objects where the attribute manager detects changes. - The basic issue thats fixed is detecting changes on PickleType + The basic issue that's fixed is detecting changes on PickleType objects, but also generalizes type handling and "modified" object checking to be more complete and extensible. @@ -2850,7 +2850,7 @@ implemented "version check" logic in Query/Mapper, used when version_id_col is in effect and query.with_lockmode() - is used to get() an instance thats already loaded + is used to get() an instance that's already loaded .. change:: :tags: orm diff --git a/doc/build/changelog/changelog_04.rst b/doc/build/changelog/changelog_04.rst index 61ea28c119..1bd49871c1 100644 --- a/doc/build/changelog/changelog_04.rst +++ b/doc/build/changelog/changelog_04.rst @@ -1524,7 +1524,7 @@ transaction directly to the parent of the transaction that could be rolled back to. Now it rolls back the next transaction up that can handle it, but sets the current - transaction to it's parent and inactivates the + transaction to its parent and inactivates the transactions in between. Inactive transactions can only be rolled back or closed, any other call results in an error. @@ -1533,7 +1533,7 @@ subtransactions. - unitofwork flush didn't close the failed transaction - when the session was not in a transaction and commiting + when the session was not in a transaction and committing the transaction failed. .. change:: @@ -1562,7 +1562,7 @@ Better support for schemas in SQLite (linked in by ATTACH DATABASE ... AS name). In some cases in the past, schema - names were ommitted from generated SQL for SQLite. This is + names were omitted from generated SQL for SQLite. This is no longer the case. .. change:: @@ -3267,7 +3267,7 @@ :tags: :tickets: - The 'Smallinteger' compatiblity name (small i!) is no longer imported, + The 'Smallinteger' compatibility name (small i!) is no longer imported, but remains in schema.py for now. SmallInteger (big I!) is still imported. @@ -3628,7 +3628,7 @@ :tickets: 643 Class-level properties are now usable as query elements... no more - '.c.'! "Class.c.propname" is now superceded by "Class.propname". All + '.c.'! "Class.c.propname" is now superseded by "Class.propname". All clause operators are supported, as well as higher level operators such as Class.prop== for scalar attributes, Class.prop.contains() and Class.prop.any(`_ features an example using SQLAlchemy events diff --git a/doc/build/glossary.rst b/doc/build/glossary.rst index 6e4be73fec..85c0081282 100644 --- a/doc/build/glossary.rst +++ b/doc/build/glossary.rst @@ -370,7 +370,7 @@ Glossary A subquery comes in two general flavors, one known as a "scalar select" which specifically must return exactly one row and one column, and the other form which acts as a "derived table" and serves as a source of - rows for the FROM clause of another select. A scalar select is eligble + rows for the FROM clause of another select. A scalar select is eligible to be placed in the :term:`WHERE clause`, :term:`columns clause`, ORDER BY clause or HAVING clause of the enclosing select, whereas the derived table form is eligible to be placed in the FROM clause of the @@ -430,7 +430,7 @@ Glossary The above subquery refers to the ``user_account`` table, which is not itself in the ``FROM`` clause of this nested query. Instead, the ``user_account`` - table is recieved from the enclosing query, where each row selected from + table is received from the enclosing query, where each row selected from ``user_account`` results in a distinct execution of the subquery. A correlated subquery is in most cases present in the :term:`WHERE clause` diff --git a/doc/build/orm/events.rst b/doc/build/orm/events.rst index 2358619527..bb6e02d58d 100644 --- a/doc/build/orm/events.rst +++ b/doc/build/orm/events.rst @@ -6,7 +6,7 @@ ORM Events The ORM includes a wide variety of hooks available for subscription. .. versionadded:: 0.7 - The event supercedes the previous system of "extension" classes. + The event supersedes the previous system of "extension" classes. For an introduction to the event API, see :ref:`event_toplevel`. Non-ORM events such as those regarding connections and low-level statement execution are described in diff --git a/doc/build/orm/loading.rst b/doc/build/orm/loading.rst index 5f0230a21b..20d34c2318 100644 --- a/doc/build/orm/loading.rst +++ b/doc/build/orm/loading.rst @@ -172,7 +172,7 @@ the string ``'*'`` as the argument to any of these options:: session.query(MyClass).options(lazyload('*')) -Above, the ``lazyload('*')`` option will supercede the ``lazy`` setting +Above, the ``lazyload('*')`` option will supersede the ``lazy`` setting of all :func:`.relationship` constructs in use for that query, except for those which use the ``'dynamic'`` style of loading. If some relationships specify @@ -181,7 +181,7 @@ using ``lazyload('*')`` will unilaterally cause all those relationships to use ``'select'`` loading, e.g. emit a SELECT statement when each attribute is accessed. -The option does not supercede loader options stated in the +The option does not supersede loader options stated in the query, such as :func:`.eagerload`, :func:`.subqueryload`, etc. The query below will still use joined loading for the ``widget`` relationship:: diff --git a/doc/build/orm/session.rst b/doc/build/orm/session.rst index b4aea79fe4..3efeab9285 100644 --- a/doc/build/orm/session.rst +++ b/doc/build/orm/session.rst @@ -634,7 +634,7 @@ When given an instance, it follows these steps: * The new instance is returned. With :meth:`~.Session.merge`, the given "source" -instance is not modifed nor is it associated with the target :class:`.Session`, +instance is not modified nor is it associated with the target :class:`.Session`, and remains available to be merged with any number of other :class:`.Session` objects. :meth:`~.Session.merge` is useful for taking the state of any kind of object structure without regard for its @@ -686,7 +686,7 @@ Merge Tips :meth:`~.Session.merge` is an extremely useful method for many purposes. However, it deals with the intricate border between objects that are transient/detached and -those that are persistent, as well as the automated transferrence of state. +those that are persistent, as well as the automated transference of state. The wide variety of scenarios that can present themselves here often require a more careful approach to the state of objects. Common problems with merge usually involve some unexpected state regarding the object being passed to :meth:`~.Session.merge`. @@ -1368,7 +1368,7 @@ deleting the row entirely. relationship, SQLAlchemy's default behavior of setting a foreign key to ``NULL`` can be caught in one of two ways: - * The easiest and most common is just to to set the + * The easiest and most common is just to set the foreign-key-holding column to ``NOT NULL`` at the database schema level. An attempt by SQLAlchemy to set the column to NULL will fail with a simple NOT NULL constraint exception. @@ -1668,7 +1668,7 @@ is closed out after the :meth:`.Session.flush` operation completes. of usage, and can in some cases lead to concurrent connection checkouts. - In the absense of a demarcated transaction, the :class:`.Session` + In the absence of a demarcated transaction, the :class:`.Session` cannot make appropriate decisions as to when autoflush should occur nor when auto-expiration should occur, so these features should be disabled with ``autoflush=False, expire_on_commit=False``. diff --git a/examples/sharding/attribute_shard.py b/examples/sharding/attribute_shard.py index 410346838f..34b1be5b21 100644 --- a/examples/sharding/attribute_shard.py +++ b/examples/sharding/attribute_shard.py @@ -109,7 +109,7 @@ def id_chooser(query, ident): given a primary key, returns a list of shards to search. here, we don't have any particular information from a - pk so we just return all shard ids. often, youd want to do some + pk so we just return all shard ids. often, you'd want to do some kind of round-robin strategy here so that requests are evenly distributed among DBs. diff --git a/lib/sqlalchemy/dialects/firebird/kinterbasdb.py b/lib/sqlalchemy/dialects/firebird/kinterbasdb.py index 72a8ad5b38..67812bfafd 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 04af406684..595d6ea7bb 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 a8102e0d22..cbfb415f2a 100644 --- a/lib/sqlalchemy/dialects/oracle/base.py +++ b/lib/sqlalchemy/dialects/oracle/base.py @@ -871,7 +871,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 d01c072979..5e04abb267 100644 --- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py +++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py @@ -168,7 +168,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 @@ -651,7 +651,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 c797f8efea..959bf47be9 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 268a89724b..f43cffd193 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/engine/base.py b/lib/sqlalchemy/engine/base.py index 8d0f1ba784..860649130c 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -994,7 +994,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 824c96fd73..c28598613a 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -184,7 +184,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(). """ @@ -432,7 +432,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 ec9179e68b..8813c0955d 100644 --- a/lib/sqlalchemy/events.py +++ b/lib/sqlalchemy/events.py @@ -71,7 +71,7 @@ class DDLEvents(event.Events): """ 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. @@ -87,7 +87,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. @@ -103,7 +103,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. @@ -119,7 +119,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. @@ -347,7 +347,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_con: @@ -580,7 +580,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/orderinglist.py b/lib/sqlalchemy/ext/orderinglist.py index 172d3792c5..4febbfd710 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 485b3b0e7d..a2d24240af 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 cbbdb477b8..527e40ef20 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -191,7 +191,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/strategies.py b/lib/sqlalchemy/orm/strategies.py index 07f7558335..0b003b52e2 100644 --- a/lib/sqlalchemy/orm/strategies.py +++ b/lib/sqlalchemy/orm/strategies.py @@ -1043,7 +1043,7 @@ class JoinedLoader(AbstractRelationshipLoader): column_collection=None, parentmapper=None, allow_innerjoin=True, **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 @@ -1270,7 +1270,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 11518398cc..3a39232a2c 100644 --- a/lib/sqlalchemy/orm/util.py +++ b/lib/sqlalchemy/orm/util.py @@ -123,7 +123,7 @@ def polymorphic_union(table_map, typecolname, for key in table_map.keys(): 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/testing/engines.py b/lib/sqlalchemy/testing/engines.py index 7de29a2bbd..20bc3f7b0f 100644 --- a/lib/sqlalchemy/testing/engines.py +++ b/lib/sqlalchemy/testing/engines.py @@ -49,7 +49,7 @@ class ConnectionKiller(object): def _after_test_ctx(self): pass # 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 5c5e691545..57f85434b7 100644 --- a/lib/sqlalchemy/testing/entities.py +++ b/lib/sqlalchemy/testing/entities.py @@ -51,7 +51,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 c43a7d0606..2bc12c5aab 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -4,7 +4,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/util/_collections.py b/lib/sqlalchemy/util/_collections.py index 08d989e1be..0510d69334 100644 --- a/lib/sqlalchemy/util/_collections.py +++ b/lib/sqlalchemy/util/_collections.py @@ -820,7 +820,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 @@ -869,7 +869,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 e5fc651cef..a8c59868ed 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -155,7 +155,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. diff --git a/test/aaa_profiling/test_memusage.py b/test/aaa_profiling/test_memusage.py index 57bddc8592..659af3a94c 100644 --- a/test/aaa_profiling/test_memusage.py +++ b/test/aaa_profiling/test_memusage.py @@ -507,7 +507,7 @@ class MemUsageTest(EnsureZeroed): sess.delete(a) sess.flush() - # dont need to clear_mappers() + # don't need to clear_mappers() del B del A @@ -574,7 +574,7 @@ class MemUsageTest(EnsureZeroed): sess.delete(a) sess.flush() - # dont need to clear_mappers() + # don't need to clear_mappers() del B del A diff --git a/test/aaa_profiling/test_pool.py b/test/aaa_profiling/test_pool.py index cf41d2684e..498c83b1bf 100644 --- a/test/aaa_profiling/test_pool.py +++ b/test/aaa_profiling/test_pool.py @@ -15,7 +15,7 @@ class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults): def teardown(self): # the tests leave some fake connections - # around which dont necessarily + # around which don't necessarily # get gc'ed as quickly as we'd like, # on backends like pypy, python3.2 pool_module._refs.clear() diff --git a/test/dialect/mssql/test_query.py b/test/dialect/mssql/test_query.py index 6a12744a73..715eebb848 100644 --- a/test/dialect/mssql/test_query.py +++ b/test/dialect/mssql/test_query.py @@ -248,7 +248,7 @@ class QueryTest(testing.AssertsExecutionResults, fixtures.TestBase): testing.db, lambda: engine.execute(t1.insert()), ExactSQL("INSERT INTO t1 DEFAULT VALUES"), - # we dont have an event for + # we don't have an event for # "SELECT @@IDENTITY" part here. # this will be in 0.8 with #2459 ) diff --git a/test/dialect/postgresql/test_query.py b/test/dialect/postgresql/test_query.py index 82b49d974b..064f0c3724 100644 --- a/test/dialect/postgresql/test_query.py +++ b/test/dialect/postgresql/test_query.py @@ -148,7 +148,7 @@ class InsertTest(fixtures.TestBase, AssertsExecutionResults): table.insert(inline=True).execute({'data': 'd8'}) - # note that the test framework doesnt capture the "preexecute" + # note that the test framework doesn't capture the "preexecute" # of a seqeuence or default. we just see it in the bind params. self.assert_sql(self.engine, go, [], with_sequences=[ diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 60a15db3bb..9caae0898d 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -395,7 +395,7 @@ class TimezoneTest(fixtures.TestBase): psycopg will return a datetime with a tzinfo attached to it, if postgresql returns it. python then will not let you compare a - datetime with a tzinfo to a datetime that doesnt have one. this + datetime with a tzinfo to a datetime that doesn't have one. this test illustrates two ways to have datetime types with and without timezone info. """ diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py index 24598af96c..60ff06064f 100644 --- a/test/engine/test_execute.py +++ b/test/engine/test_execute.py @@ -282,7 +282,7 @@ class ExecuteTest(fixtures.TestBase): self._test_stmt_exception_pickleable(Exception("hello world")) @testing.crashes("postgresql+psycopg2", - "Older versions dont support cursor pickling, newer ones do") + "Older versions don't support cursor pickling, newer ones do") @testing.fails_on("mysql+oursql", "Exception doesn't come back exactly the same from pickle") @testing.fails_on("oracle+cx_oracle", diff --git a/test/engine/test_reconnect.py b/test/engine/test_reconnect.py index e1e50c8813..d3885b5c36 100644 --- a/test/engine/test_reconnect.py +++ b/test/engine/test_reconnect.py @@ -146,7 +146,7 @@ class MockReconnectTest(fixtures.TestBase): assert not conn.closed assert conn.invalidated - # close shouldnt break + # close shouldn't break conn.close() is_not_(self.db.pool, db_pool) diff --git a/test/ext/declarative/test_basic.py b/test/ext/declarative/test_basic.py index 1596b78d35..062b136ad1 100644 --- a/test/ext/declarative/test_basic.py +++ b/test/ext/declarative/test_basic.py @@ -1092,7 +1092,7 @@ class DeclarativeTest(DeclarativeTestBase): name = Column('name', String(50)) # this is not "valid" but we want to test that Address.id - # doesnt get stuck into user's table + # doesn't get stuck into user's table adr_count = Address.id diff --git a/test/ext/declarative/test_inheritance.py b/test/ext/declarative/test_inheritance.py index 1a3a4aba54..5fc27b2c82 100644 --- a/test/ext/declarative/test_inheritance.py +++ b/test/ext/declarative/test_inheritance.py @@ -151,7 +151,7 @@ class DeclarativeInheritanceTest(DeclarativeTestBase): # assert that the "id" column is available without a second # load. as of 0.7, the ColumnProperty tests all columns - # in it's list to see which is present in the row. + # in its list to see which is present in the row. sess.expunge_all() diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index 0ac17db89f..5127a1aba4 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -1096,7 +1096,7 @@ class FlushTest(fixtures.MappedTest): # create an Admin, and append a Role. the dependency processors # corresponding to the "roles" attribute for the Admin mapper and the User mapper - # have to ensure that two dependency processors dont fire off and insert the + # have to ensure that two dependency processors don't fire off and insert the # many to many row twice. a = Admin() a.roles.append(adminrole) diff --git a/test/orm/test_assorted_eager.py b/test/orm/test_assorted_eager.py index e815f84b41..33c511eb6e 100644 --- a/test/orm/test_assorted_eager.py +++ b/test/orm/test_assorted_eager.py @@ -290,7 +290,7 @@ class EagerTest2(fixtures.MappedTest): def test_eager_terminate(self): """Eager query generation does not include the same mapper's table twice. - Or, that bi-directional eager loads dont include each other in eager + Or, that bi-directional eager loads don't include each other in eager query generation. """ diff --git a/test/orm/test_attributes.py b/test/orm/test_attributes.py index f8cb1f75d9..381d7e9956 100644 --- a/test/orm/test_attributes.py +++ b/test/orm/test_attributes.py @@ -218,7 +218,7 @@ class AttributesTest(fixtures.ORMTest): attributes.register_attribute(MyTest2, 'b', uselist=False, useobject=False) - # shouldnt be pickling callables at the class level + # shouldn't be pickling callables at the class level def somecallable(state, passive): return None @@ -1320,7 +1320,7 @@ class PendingBackrefTest(fixtures.ORMTest): p = Post("post 5") - # setting blog doesnt call 'posts' callable, calls with no fetch + # setting blog doesn't call 'posts' callable, calls with no fetch p.blog = b eq_( lazy_posts.mock_calls, [ diff --git a/test/orm/test_backref_mutations.py b/test/orm/test_backref_mutations.py index 925eedfa90..7b86ba3e81 100644 --- a/test/orm/test_backref_mutations.py +++ b/test/orm/test_backref_mutations.py @@ -395,7 +395,7 @@ class O2OScalarBackrefMoveTest(_fixtures.FixtureTest): # backref fires assert u1.address is a2 - # didnt work this way tho + # didn't work this way tho assert a1.user is u1 # moves appropriately after commit diff --git a/test/orm/test_cycles.py b/test/orm/test_cycles.py index 1da57b050a..59f8198f05 100644 --- a/test/orm/test_cycles.py +++ b/test/orm/test_cycles.py @@ -383,7 +383,7 @@ class BiDirectionalManyToOneTest(fixtures.MappedTest): # the bug here is that the dependency sort comes up with T1/T2 in a # cycle, but there are no T1/T2 objects to be saved. therefore no # "cyclical subtree" gets generated, and one or the other of T1/T2 - # gets lost, and processors on T3 dont fire off. the test will then + # gets lost, and processors on T3 don't fire off. the test will then # fail because the FK's on T3 are not nullable. o3 = T3() o3.t1 = o1 @@ -592,7 +592,7 @@ class OneToManyManyToOneTest(fixtures.MappedTest): def test_cycle(self): """ - This test has a peculiar aspect in that it doesnt create as many + This test has a peculiar aspect in that it doesn't create as many dependent relationships as the other tests, and revealed a small glitch in the circular dependency sorting. diff --git a/test/orm/test_expire.py b/test/orm/test_expire.py index 0b1350e0aa..c9ac62dcef 100644 --- a/test/orm/test_expire.py +++ b/test/orm/test_expire.py @@ -46,7 +46,7 @@ class ExpireTest(_fixtures.FixtureTest): # change the value in the DB users.update(users.c.id==7, values=dict(name='jack')).execute() sess.expire(u) - # object isnt refreshed yet, using dict to bypass trigger + # object isn't refreshed yet, using dict to bypass trigger assert u.__dict__.get('name') != 'jack' assert 'name' in attributes.instance_state(u).expired_attributes @@ -666,7 +666,7 @@ class ExpireTest(_fixtures.FixtureTest): assert 'addresses' not in u.__dict__ # hit the lazy loader. just does the lazy load, - # doesnt do the overall refresh + # doesn't do the overall refresh def go(): assert u.addresses[0].email_address=='ed@wood.com' self.assert_sql_count(testing.db, go, 1) @@ -1248,7 +1248,7 @@ class RefreshTest(_fixtures.FixtureTest): def test_refresh_with_lazy(self): """test that when a lazy loader is set as a trigger on an object's attribute - (at the attribute level, not the class level), a refresh() operation doesnt + (at the attribute level, not the class level), a refresh() operation doesn't fire the lazy loader or create any problems""" User, Address, addresses, users = (self.classes.User, diff --git a/test/orm/test_froms.py b/test/orm/test_froms.py index 8c332fb30d..0f13c1f6c1 100644 --- a/test/orm/test_froms.py +++ b/test/orm/test_froms.py @@ -2333,8 +2333,8 @@ class TestOverlyEagerEquivalentCols(fixtures.MappedTest): sess.add(b2) sess.flush() - # theres an overlapping ForeignKey here, so not much option except - # to artifically control the flush order + # there's an overlapping ForeignKey here, so not much option except + # to artificially control the flush order b2.sub2 = [s2] sess.flush() diff --git a/test/orm/test_mapper.py b/test/orm/test_mapper.py index 9cd0c77eda..0ca3480dd3 100644 --- a/test/orm/test_mapper.py +++ b/test/orm/test_mapper.py @@ -64,7 +64,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL): x = "something" @property def y(self): - return "somethign else" + return "something else" m = mapper(Foo, users, properties={"addresses":relationship(Address)}) @@ -101,7 +101,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL): x = "something" @property def y(self): - return "somethign else" + return "something else" m = mapper(Foo, users) a1 = aliased(Foo) diff --git a/test/orm/test_merge.py b/test/orm/test_merge.py index e1474f39b1..aeddc04a68 100644 --- a/test/orm/test_merge.py +++ b/test/orm/test_merge.py @@ -748,7 +748,7 @@ class MergeTest(_fixtures.FixtureTest): 'converted' to represent the correct objects. However, at the moment I'd rather not support this use case; if you are merging with load=False, you're typically dealing with caching and the - merged objects shouldnt be 'dirty'. + merged objects shouldn't be 'dirty'. """ @@ -782,7 +782,7 @@ class MergeTest(_fixtures.FixtureTest): self.assert_sql_count(testing.db, go, 0) def test_no_load_disallows_dirty(self): - """load=False doesnt support 'dirty' objects right now + """load=False doesn't support 'dirty' objects right now (see test_no_load_with_eager()). Therefore lets assert it. @@ -899,7 +899,7 @@ class MergeTest(_fixtures.FixtureTest): 'somenewaddress') # this use case is not supported; this is with a pending Address - # on the pre-merged object, and we currently dont support + # on the pre-merged object, and we currently don't support # 'dirty' objects being merged with load=False. in this case, # the empty '_state.parents' collection would be an issue, since # the optimistic flag is False in _is_orphan() for pending diff --git a/test/orm/test_naturalpks.py b/test/orm/test_naturalpks.py index e11adb5c68..e2132e0fad 100644 --- a/test/orm/test_naturalpks.py +++ b/test/orm/test_naturalpks.py @@ -107,7 +107,7 @@ class NaturalPKTest(fixtures.MappedTest): users.update(values={User.username:'jack'}).execute(username='ed') # expire/refresh works off of primary key. the PK is gone - # in this case so theres no way to look it up. criterion- + # in this case so there's no way to look it up. criterion- # based session invalidation could solve this [ticket:911] sess.expire(u1) assert_raises(sa.orm.exc.ObjectDeletedError, getattr, u1, 'username') diff --git a/test/orm/test_query.py b/test/orm/test_query.py index 8cba3558d1..e49dd22e0a 100644 --- a/test/orm/test_query.py +++ b/test/orm/test_query.py @@ -528,7 +528,7 @@ class GetTest(QueryTest): u.addresses[0].email_address = 'lala' u.orders[1].items[2].description = 'item 12' - # test that lazy load doesnt change child items + # test that lazy load doesn't change child items s.query(User).populate_existing().all() assert u.addresses[0].email_address == 'lala' assert u.orders[1].items[2].description == 'item 12' @@ -1364,7 +1364,7 @@ class FilterTest(QueryTest, AssertsCompiledSQL): assert [Address(id=2), Address(id=3), Address(id=4)] == \ sess.query(Address).join("user").filter(Address.user.has(User.name.like('%ed%'), id=8)).order_by(Address.id).all() - # test has() doesnt' get subquery contents adapted by aliased join + # test has() doesn't get subquery contents adapted by aliased join assert [Address(id=2), Address(id=3), Address(id=4)] == \ sess.query(Address).join("user", aliased=True).filter(Address.user.has(User.name.like('%ed%'), id=8)).order_by(Address.id).all() diff --git a/test/orm/test_session.py b/test/orm/test_session.py index 7c2e8a3b86..31ddf6da0d 100644 --- a/test/orm/test_session.py +++ b/test/orm/test_session.py @@ -826,7 +826,7 @@ class SessionStateWFixtureTest(_fixtures.FixtureTest): assert len(u.addresses) == 3 assert newad not in u.addresses - # pending objects dont get expired + # pending objects don't get expired assert newad.email_address == 'a new address' def test_expunge_cascade(self): diff --git a/test/orm/test_unitofwork.py b/test/orm/test_unitofwork.py index 6eb737a245..53d207622d 100644 --- a/test/orm/test_unitofwork.py +++ b/test/orm/test_unitofwork.py @@ -1305,7 +1305,7 @@ class SaveTest(_fixtures.FixtureTest): session.add_all((u, u2)) session.flush() - # assert the first one retreives the same from the identity map + # assert the first one retrieves the same from the identity map nu = session.query(m).get(u.id) assert u is nu @@ -1425,7 +1425,7 @@ class SaveTest(_fixtures.FixtureTest): mapper(Order, orders, properties={ 'description': sa.orm.deferred(orders.c.description)}) - # dont set deferred attribute, commit session + # don't set deferred attribute, commit session o = Order(id=42) session = create_session(autocommit=False) session.add(o) diff --git a/test/orm/test_versioning.py b/test/orm/test_versioning.py index abb08c536d..779b76f4ab 100644 --- a/test/orm/test_versioning.py +++ b/test/orm/test_versioning.py @@ -107,7 +107,7 @@ class VersioningTest(fixtures.MappedTest): else: s1.commit() - # new in 0.5 ! dont need to close the session + # new in 0.5 ! don't need to close the session f1 = s1.query(Foo).get(f1.id) f2 = s1.query(Foo).get(f2.id) diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index c05ee50c4a..21cc7b4b45 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -1866,7 +1866,7 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): expected_test_params_list ) - # check that params() doesnt modify original statement + # check that params() doesn't modify original statement s = select([table1], or_(table1.c.myid == bindparam('myid'), table2.c.otherid == bindparam('myotherid'))) diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py index a01929f700..a9a540fe9c 100644 --- a/test/sql/test_functions.py +++ b/test/sql/test_functions.py @@ -427,7 +427,7 @@ class ExecuteTest(fixtures.TestBase): @testing.fails_on_everything_except('postgresql') def test_as_from(self): - # TODO: shouldnt this work on oracle too ? + # TODO: shouldn't this work on oracle too ? x = func.current_date(bind=testing.db).execute().scalar() y = func.current_date(bind=testing.db).select().execute().scalar() z = func.current_date(bind=testing.db).scalar() diff --git a/test/sql/test_generative.py b/test/sql/test_generative.py index 8b2abef0e9..260f9dbcb2 100644 --- a/test/sql/test_generative.py +++ b/test/sql/test_generative.py @@ -18,7 +18,7 @@ class TraversalTest(fixtures.TestBase, AssertsExecutionResults): def setup_class(cls): global A, B - # establish two ficticious ClauseElements. + # establish two fictitious ClauseElements. # define deep equality semantics as well as deep # identity semantics. class A(ClauseElement): diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py index c4b73d1d5f..4921672e17 100644 --- a/test/sql/test_metadata.py +++ b/test/sql/test_metadata.py @@ -334,7 +334,7 @@ class MetaDataTest(fixtures.TestBase, ComparesTables): table_c.c.bar.onupdate.arg) == 'z' assert isinstance(table2_c.c.id.default, Sequence) - # constraints dont get reflected for any dialect right + # constraints don't get reflected for any dialect right # now if has_constraints: diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index f5db2dde81..84b84b1ba8 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -216,7 +216,7 @@ class SelectableTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled jj = select([table1.c.col1.label('bar_col1')]) jjj = join(table1, jj, table1.c.col1 == jj.c.bar_col1) - # test column directly agaisnt itself + # test column directly against itself assert jjj.corresponding_column(jjj.c.table1_col1) \ is jjj.c.table1_col1