From: Min ho Kim Date: Sun, 21 Jul 2019 00:51:29 +0000 (+1000) Subject: Fix typos X-Git-Tag: rel_1_3_6~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00e7a0eeae050ffb21b7abe2d6583ef32f119684;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix typos (cherry picked from commit 7e588aadaab27a53b226a4637be9b4022ab46956) Change-Id: Ibd2fbf365ed2b8f0d1765ef7271d28ab3a2d073a --- diff --git a/doc/build/changelog/changelog_13.rst b/doc/build/changelog/changelog_13.rst index 384e8b348a..55ec00f630 100644 --- a/doc/build/changelog/changelog_13.rst +++ b/doc/build/changelog/changelog_13.rst @@ -33,7 +33,7 @@ two levels deep, in conjunction with modification to primary key values, where those primary key columns are also linked together in a foreign key relationship as is typical for joined table inheritance. The intermediary - table in a three-level inheritance hierachy will now get its UPDATE if + table in a three-level inheritance hierarchy will now get its UPDATE if only the primary key value has changed and passive_updates=False (e.g. foreign key constraints not being enforced), whereas before it would be skipped; similarly, with passive_updates=True (e.g. ON UPDATE CASCADE in @@ -190,7 +190,7 @@ hybrid attributes when they made use of the ``@hybrid_property.expression`` decorator to return an alternate SQL expression, or when the hybrid returned an arbitrary :class:`.PropComparator`, at the expression level. - This involved futher generalization of the heuristics used to detect the + This involved further generalization of the heuristics used to detect the type of object being proxied at the level of :class:`.QueryableAttribute`, to better detect if the descriptor ultimately serves mapped classes or column expressions. @@ -765,10 +765,10 @@ :tickets: 4446 Fixed issue in association proxy due to :ticket:`3423` which caused the use - of custom :class:`.PropComparator` objects with hybrid attribites, such as + of custom :class:`.PropComparator` objects with hybrid attributes, such as the one demonstrated in the ``dictlike-polymorphic`` example to not function within an association proxy. The strictness that was added in - :ticket:`3423` has been relaxed, and additional logic to accomodate for + :ticket:`3423` has been relaxed, and additional logic to accommodate for an association proxy that links to a custom hybrid have been added. .. change:: @@ -870,7 +870,7 @@ Reworked :class:`.AssociationProxy` to store state that's specific to a parent class in a separate object, so that a single - :class:`.AssocationProxy` can serve for multiple parent classes, as is + :class:`.AssociationProxy` can serve for multiple parent classes, as is intrinsic to inheritance, without any ambiguity in the state returned by it. A new method :meth:`.AssociationProxy.for_class` is added to allow inspection of class-specific state. @@ -1173,7 +1173,7 @@ Fixed bug where declarative would not update the state of the :class:`.Mapper` as far as what attributes were present, when additional attributes were added or removed after the mapper attribute collections had - already been called and memoized. Addtionally, a ``NotImplementedError`` + already been called and memoized. Additionally, a ``NotImplementedError`` is now raised if a fully mapped attribute (e.g. column, relationship, etc.) is deleted from a class that is currently mapped, since the mapper will not function correctly if the attribute has been removed. diff --git a/doc/build/changelog/migration_06.rst b/doc/build/changelog/migration_06.rst index 28a74b9e8f..7024f25b69 100644 --- a/doc/build/changelog/migration_06.rst +++ b/doc/build/changelog/migration_06.rst @@ -640,7 +640,7 @@ feature can be disabled by specifying Type System Changes =================== -New Archicture +New Architecture -------------- The type system has been completely reworked behind the diff --git a/doc/build/changelog/migration_13.rst b/doc/build/changelog/migration_13.rst index 15e67fdd51..b749f56230 100644 --- a/doc/build/changelog/migration_13.rst +++ b/doc/build/changelog/migration_13.rst @@ -419,7 +419,7 @@ Given a mapping as:: a_id = Column(Integer, ForeignKey(A.id), primary_key=True) b_id = Column(Integer, ForeignKey(B.id), primary_key=True) -An assigment to ``A.b`` will generate an ``AB`` object:: +An assignment to ``A.b`` will generate an ``AB`` object:: a.b = B() diff --git a/doc/build/changelog/unreleased_13/4624.rst b/doc/build/changelog/unreleased_13/4624.rst index 4e8fc4921f..bd9236a2ef 100644 --- a/doc/build/changelog/unreleased_13/4624.rst +++ b/doc/build/changelog/unreleased_13/4624.rst @@ -5,6 +5,6 @@ Enhanced MySQL/MariaDB version string parsing to accommodate for exotic MariaDB version strings where the "MariaDB" word is embedded among other alphanumeric characters such as "MariaDBV1". This detection is critical in - order to correctly accomodate for API features that have split between MySQL + order to correctly accommodate for API features that have split between MySQL and MariaDB such as the "transaction_isolation" system variable. diff --git a/doc/build/core/tutorial.rst b/doc/build/core/tutorial.rst index cc7ce5463a..d9a0dfd308 100644 --- a/doc/build/core/tutorial.rst +++ b/doc/build/core/tutorial.rst @@ -1520,7 +1520,7 @@ another function :func:`.type_coerce` which is closely related to :func:`.cast`, in that it sets up a Python expression as having a specific SQL database type, but does not render the ``CAST`` keyword or datatype on the database side. :func:`.type_coerce` is particularly important when dealing -with the :class:`.types.JSON` datatype, which typicaly has an intricate +with the :class:`.types.JSON` datatype, which typically has an intricate relationship with string-oriented datatypes on different platforms and may not even be an explicit datatype, such as on SQLite and MariaDB. Below, we use :func:`.type_coerce` to deliver a Python structure as a JSON diff --git a/doc/build/orm/extensions/associationproxy.rst b/doc/build/orm/extensions/associationproxy.rst index 5670a787df..8e699efa96 100644 --- a/doc/build/orm/extensions/associationproxy.rst +++ b/doc/build/orm/extensions/associationproxy.rst @@ -524,7 +524,7 @@ Given a mapping as:: a_id = Column(Integer, ForeignKey(A.id), primary_key=True) b_id = Column(Integer, ForeignKey(B.id), primary_key=True) -An assigment to ``A.b`` will generate an ``AB`` object:: +An assignment to ``A.b`` will generate an ``AB`` object:: a.b = B() diff --git a/doc/build/orm/inheritance.rst b/doc/build/orm/inheritance.rst index cd796f7a77..c8f372e285 100644 --- a/doc/build/orm/inheritance.rst +++ b/doc/build/orm/inheritance.rst @@ -730,7 +730,7 @@ the :paramref:`.mapper.with_polymorphic` parameter:: 'polymorphic_identity': 'manager', 'concrete': True} -Alternatvely, the same :class:`.Table` objects can be used in +Alternatively, the same :class:`.Table` objects can be used in fully "classical" style, without using Declarative at all. A constructor similar to that supplied by Declarative is illustrated:: diff --git a/doc/build/orm/loading_relationships.rst b/doc/build/orm/loading_relationships.rst index 5acdeaf145..cf64833e60 100644 --- a/doc/build/orm/loading_relationships.rst +++ b/doc/build/orm/loading_relationships.rst @@ -72,7 +72,7 @@ Configuring Loader Strategies at Mapping Time The loader strategy for a particular relationship can be configured at mapping time to take place in all cases where an object of the mapped -type is loaded, in the absense of any query-level options that modify it. +type is loaded, in the absence of any query-level options that modify it. This is configured using the :paramref:`.relationship.lazy` parameter to :func:`.relationship`; common values for this parameter include ``select``, ``joined``, ``subquery`` and ``selectin``. diff --git a/examples/space_invaders/space_invaders.py b/examples/space_invaders/space_invaders.py index 34d233da18..ed6c47abc0 100644 --- a/examples/space_invaders/space_invaders.py +++ b/examples/space_invaders/space_invaders.py @@ -656,14 +656,14 @@ def move_missile(session, window, state): ) missile.blank(window) if glyph or missile.top_bound: - # missle is done + # missile is done session.delete(missile) state["missile"] = None if glyph: # score! score(session, window, state, glyph) else: - # move missle up one character. + # move missile up one character. missile.y -= 1 diff --git a/examples/versioned_history/history_meta.py b/examples/versioned_history/history_meta.py index 2a331443d7..22b019bd70 100644 --- a/examples/versioned_history/history_meta.py +++ b/examples/versioned_history/history_meta.py @@ -182,7 +182,7 @@ class Versioned(object): __table_args__ = {"sqlite_autoincrement": True} """Use sqlite_autoincrement, to ensure unique integer values - are used for new rows even for rows taht have been deleted.""" + are used for new rows even for rows that have been deleted.""" def versioned_objects(iter_): diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py index 1973f5fda9..e837e46001 100644 --- a/lib/sqlalchemy/orm/persistence.py +++ b/lib/sqlalchemy/orm/persistence.py @@ -736,7 +736,7 @@ def _collect_update_commands( # have changed the primary key of the row; propagate this event to # other columns that expect to have been modified. this normally # occurs after the UPDATE is emitted however we invoke it here - # explicitly in the absense of our invoking an UPDATE + # explicitly in the absence of our invoking an UPDATE for m, equated_pairs in mapper._table_to_equated[table]: sync.populate( state, diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py index b40fad332b..ccb0efe606 100644 --- a/lib/sqlalchemy/orm/relationships.py +++ b/lib/sqlalchemy/orm/relationships.py @@ -1662,7 +1662,7 @@ class RelationshipProperty(StrategizedProperty): # for a full merge, pre-load the destination collection, # so that individual _merge of each item pulls from identity # map for those already present. - # also assumes CollectionAttrbiuteImpl behavior of loading + # also assumes CollectionAttributeImpl behavior of loading # "old" list in any case dest_state.get_impl(self.key).get(dest_state, dest_dict) diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py index f274bfdc6e..a95099a743 100644 --- a/lib/sqlalchemy/orm/strategies.py +++ b/lib/sqlalchemy/orm/strategies.py @@ -2295,7 +2295,7 @@ class SelectInLoader(AbstractRelationshipLoader, util.MemoizedSlots): if not query_info.load_with_join: # the Bundle we have in the "omit_join" case is against raw, non # annotated columns, so to ensure the Query knows its primary - # entity, we add it explictly. If we made the Bundle against + # entity, we add it explicitly. If we made the Bundle against # annotated columns, we hit a performance issue in this specific # case, which is detailed in issue #4347. q.add_criteria(lambda q: q.select_from(effective_entity)) diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index 980fb3e734..178342d227 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -242,7 +242,7 @@ class Load(Generative, MapperOption): elif _is_mapped_class(attr): # TODO: this does not appear to be a valid codepath. "attr" # would never be a mapper. This block is present in 1.2 - # as well howver does not seem to be accessed in any tests. + # as well however does not seem to be accessed in any tests. if not orm_util._entity_corresponds_to_use_path_impl( attr.parent, path[-1] ): diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 29376a59c8..b94857fed7 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -3463,7 +3463,7 @@ class IdentifierPreparer(object): """keyword sequence filter. a filter for elements that are intended to represent keyword sequences, - such as "INITIALLY", "INTIALLY DEFERRED", etc. no special characters + such as "INITIALLY", "INITIALLY DEFERRED", etc. no special characters should be present. .. versionadded:: 1.3 diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 58f92d2ea2..c150b95129 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -3792,7 +3792,7 @@ class MetaData(SchemaItem): .. note:: - As refered above, the :paramref:`.MetaData.schema` parameter + As referred above, the :paramref:`.MetaData.schema` parameter only refers to the **default value** that will be applied to the :paramref:`.Table.schema` parameter of an incoming :class:`.Table` object. It does not refer to how the diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 1a7e81f113..614201c35c 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -47,7 +47,7 @@ class _LookupExpressionAdapter(object): """Mixin expression adaptations based on lookup tables. - These rules are currenly used by the numeric, integer and date types + These rules are currently used by the numeric, integer and date types which have detailed cross-expression coercion rules. """ diff --git a/test/aaa_profiling/test_memusage.py b/test/aaa_profiling/test_memusage.py index d172c4a87d..7368bc5a7e 100644 --- a/test/aaa_profiling/test_memusage.py +++ b/test/aaa_profiling/test_memusage.py @@ -958,7 +958,7 @@ class MemUsageWBackendTest(EnsureZeroed): go() - # fails on newer versions of pysqlite due to unusual memory behvior + # fails on newer versions of pysqlite due to unusual memory behavior # in pysqlite itself. background at: # http://thread.gmane.org/gmane.comp.python.db.pysqlite.user/2290 diff --git a/test/dialect/mssql/test_types.py b/test/dialect/mssql/test_types.py index 54dd6876a4..f88eb928ca 100644 --- a/test/dialect/mssql/test_types.py +++ b/test/dialect/mssql/test_types.py @@ -560,7 +560,7 @@ class TypeRoundTripTest( "1234.58965E-2", "1.521E+15", # previously, these were at -1E-25, which were inserted - # cleanly howver we only got back 20 digits of accuracy. + # cleanly however we only got back 20 digits of accuracy. # pyodbc as of 4.0.22 now disallows the silent truncation. "-1E-20", "1E-20", diff --git a/test/orm/test_froms.py b/test/orm/test_froms.py index 1cccfff268..76cb4f6db6 100644 --- a/test/orm/test_froms.py +++ b/test/orm/test_froms.py @@ -2461,7 +2461,7 @@ class MixedEntitiesTest(QueryTest, AssertsCompiledSQL): "WHERE addresses.email_address > :email_address_1", ) - # second, 'email_address' matches up to the aggreagte, and we get a + # second, 'email_address' matches up to the aggregate, and we get a # smooth JOIN from users->subquery and that's it self.assert_compile( sess.query(User, ag2.email_address) diff --git a/test/orm/test_relationships.py b/test/orm/test_relationships.py index 1e7ebf48cd..0767fbf1c6 100644 --- a/test/orm/test_relationships.py +++ b/test/orm/test_relationships.py @@ -744,7 +744,7 @@ class OverlappingFksSiblingTest(fixtures.TestBase): bsub2.a = a2 session.commit() - assert bsub1.a is a2 # beacuse bsub1.a_member is not a relationship + assert bsub1.a is a2 # because bsub1.a_member is not a relationship assert bsub2.a is a1 # because bsub2.a is viewonly=True # everyone has a B.a relationship diff --git a/test/orm/test_unitofwork.py b/test/orm/test_unitofwork.py index f23a934e1e..13c5907a4f 100644 --- a/test/orm/test_unitofwork.py +++ b/test/orm/test_unitofwork.py @@ -1132,7 +1132,7 @@ class DefaultTest(fixtures.MappedTest): eq_(h3.hoho, althohoval) def go(): - # test deferred load of attribues, one select per instance + # test deferred load of attributes, one select per instance self.assert_(h2.hoho == h4.hoho == h5.hoho == hohoval) self.sql_count_(3, go) diff --git a/test/sql/test_insert_exec.py b/test/sql/test_insert_exec.py index 7905dc4bc9..85cdeca4b2 100644 --- a/test/sql/test_insert_exec.py +++ b/test/sql/test_insert_exec.py @@ -263,7 +263,7 @@ class InsertExecTest(fixtures.TablesTest): eq_(r.inserted_primary_key, [0]) @testing.fails_on( - "sqlite", "sqlite autoincremnt doesn't work with composite pks" + "sqlite", "sqlite autoincrement doesn't work with composite pks" ) @testing.provide_metadata def test_misordered_lastrow(self):