summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/build/changelog/changelog_01.rst6
-rw-r--r--doc/build/changelog/changelog_03.rst14
-rw-r--r--doc/build/changelog/changelog_05.rst2
-rw-r--r--doc/build/core/connections.rst2
-rw-r--r--doc/build/core/metadata.rst2
-rw-r--r--doc/build/errors.rst2
-rw-r--r--doc/build/faq/connections.rst4
-rw-r--r--doc/build/orm/extensions/asyncio.rst2
-rw-r--r--doc/build/orm/mapped_sql_expr.rst2
-rw-r--r--doc/build/tutorial/data_insert.rst2
-rw-r--r--lib/sqlalchemy/dialects/postgresql/psycopg.py2
-rw-r--r--lib/sqlalchemy/engine/base.py2
-rw-r--r--lib/sqlalchemy/engine/cursor.py2
-rw-r--r--lib/sqlalchemy/ext/mypy/util.py2
-rw-r--r--lib/sqlalchemy/orm/path_registry.py4
-rw-r--r--lib/sqlalchemy/orm/query.py2
-rw-r--r--lib/sqlalchemy/orm/strategy_options.py2
-rw-r--r--lib/sqlalchemy/pool/base.py2
-rw-r--r--lib/sqlalchemy/sql/type_api.py2
-rw-r--r--lib/sqlalchemy/util/langhelpers.py4
-rw-r--r--setup.cfg1
-rw-r--r--test/base/test_result.py4
-rw-r--r--test/dialect/oracle/test_reflection.py2
-rw-r--r--test/dialect/postgresql/test_dialect.py2
-rw-r--r--test/dialect/postgresql/test_query.py2
-rw-r--r--test/dialect/postgresql/test_types.py2
-rw-r--r--test/dialect/test_sqlite.py2
-rw-r--r--test/ext/declarative/test_inheritance.py2
-rw-r--r--test/ext/test_baked.py6
-rw-r--r--test/orm/inheritance/test_manytomany.py2
-rw-r--r--test/orm/inheritance/test_relationship.py2
-rw-r--r--test/orm/inheritance/test_single.py4
-rw-r--r--test/orm/test_assorted_eager.py2
-rw-r--r--test/orm/test_cascade.py2
-rw-r--r--test/orm/test_core_compilation.py2
-rw-r--r--test/orm/test_deferred.py2
-rw-r--r--test/orm/test_deprecations.py2
-rw-r--r--test/orm/test_expire.py2
-rw-r--r--test/orm/test_joins.py2
-rw-r--r--test/orm/test_mapper.py2
-rw-r--r--test/orm/test_relationships.py8
-rw-r--r--test/requirements.py4
-rw-r--r--test/sql/test_operators.py4
43 files changed, 62 insertions, 63 deletions
diff --git a/doc/build/changelog/changelog_01.rst b/doc/build/changelog/changelog_01.rst
index cdffdc943..2122c36f2 100644
--- a/doc/build/changelog/changelog_01.rst
+++ b/doc/build/changelog/changelog_01.rst
@@ -434,7 +434,7 @@
:tags:
:tickets:
- added assertion to tx = session.begin(); tx.rollback(); tx.begin(), i.e. cant
+ added assertion to tx = session.begin(); tx.rollback(); tx.begin(), i.e. can't
use it after a rollback()
.. change::
@@ -863,7 +863,7 @@
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,
and the PassiveDefault thing was working the old way, i.e. they just execute on
- the DB side, the "cant get the row back without an OID" exception that occurred
+ the DB side, the "can't get the row back without an OID" exception that occurred
also will not happen unless someone (usually the ORM) explicitly asks for it.
.. change::
@@ -928,7 +928,7 @@
:tickets:
fix to postgres, where it will explicitly pre-execute a PassiveDefault on a table
- if it is a primary key column, pursuant to the ongoing "we cant get inserted rows
+ if it is a primary key column, pursuant to the ongoing "we can't get inserted rows
back from postgres" issue
.. change::
diff --git a/doc/build/changelog/changelog_03.rst b/doc/build/changelog/changelog_03.rst
index 1e34c0400..f2ffb81e3 100644
--- a/doc/build/changelog/changelog_03.rst
+++ b/doc/build/changelog/changelog_03.rst
@@ -770,7 +770,7 @@
:tickets:
supports_sane_rowcount() set to False due to ticket #370.
- versioned_id_col feature wont work in FB.
+ versioned_id_col feature won't work in FB.
.. change::
:tags: firebird
@@ -1211,7 +1211,7 @@
:tags: sql
:tickets:
- use_labels flag on select() wont auto-create labels for literal text
+ use_labels flag on select() won't auto-create labels for literal text
column elements, since we can make no assumptions about the text. to
create labels for literal columns, you can say "somecol AS
somelabel", or use literal_column("somecol").label("somelabel")
@@ -1220,7 +1220,7 @@
:tags: sql
:tickets:
- quoting wont occur for literal columns when they are "proxied" into
+ quoting won't occur for literal columns when they are "proxied" into
the column collection for their selectable (is_literal flag is
propagated). literal columns are specified via
literal_column("somestring").
@@ -1340,7 +1340,7 @@
placed in the select statement by something other than the eager
loader itself, to fix possibility of dupe columns as illustrated in. however, this means you have to be more careful with
the columns placed in the "order by" of Query.select(), that you
- have explicitly named them in your criterion (i.e. you cant rely on
+ have explicitly named them in your criterion (i.e. you can't rely on
the eager loader adding them in for you)
.. change::
@@ -1589,7 +1589,7 @@
:tags: oracle
:tickets: 363
- issues a log warning when a related table cant be reflected due to
+ issues a log warning when a related table can't be reflected due to
certain permission errors
.. change::
@@ -1733,7 +1733,7 @@
:tags: orm, bugs
:tickets:
- eager relation to an inheriting mapper wont fail if no rows returned for
+ eager relation to an inheriting mapper won't fail if no rows returned for
the relationship.
.. change::
@@ -2877,7 +2877,7 @@
:tags: orm
:tickets: 346
- session.flush() wont close a connection it opened
+ session.flush() won't close a connection it opened
.. change::
:tags: orm
diff --git a/doc/build/changelog/changelog_05.rst b/doc/build/changelog/changelog_05.rst
index 493a680f6..e998cb444 100644
--- a/doc/build/changelog/changelog_05.rst
+++ b/doc/build/changelog/changelog_05.rst
@@ -2526,7 +2526,7 @@
:tickets:
Wrote a docstring for Oracle dialect. Apparently that Ohloh
- "few source code comments" label is starting to sting :).
+ "few source code comments" label is starting to string :).
.. change::
:tags: oracle
diff --git a/doc/build/core/connections.rst b/doc/build/core/connections.rst
index 3de493686..2e188e20e 100644
--- a/doc/build/core/connections.rst
+++ b/doc/build/core/connections.rst
@@ -119,7 +119,7 @@ illustrated in the example below::
.. topic:: the Python DBAPI is where autobegin actually happens
The design of "commit as you go" is intended to be complementary to the
- design of the :term:`DBAPI`, which is the underyling database interface
+ design of the :term:`DBAPI`, which is the underlying database interface
that SQLAlchemy interacts with. In the DBAPI, the ``connection`` object does
not assume changes to the database will be automatically committed, instead
requiring in the default case that the ``connection.commit()`` method is
diff --git a/doc/build/core/metadata.rst b/doc/build/core/metadata.rst
index 909cfff4f..60f3f8d16 100644
--- a/doc/build/core/metadata.rst
+++ b/doc/build/core/metadata.rst
@@ -311,7 +311,7 @@ schema names on a per-connection or per-statement basis.
can be any number of "schemas" which then contain the actual table objects.
A table within a specific schema is referred towards explicitly using the
- syntax "<schemaname>.<tablename>". Constrast this to an architecture such
+ syntax "<schemaname>.<tablename>". Contrast this to an architecture such
as that of MySQL, where there are only "databases", however SQL statements
can refer to multiple databases at once, using the same syntax except it
is "<database>.<tablename>". On Oracle, this syntax refers to yet another
diff --git a/doc/build/errors.rst b/doc/build/errors.rst
index 4845963b0..e2c703e4c 100644
--- a/doc/build/errors.rst
+++ b/doc/build/errors.rst
@@ -1470,7 +1470,7 @@ the :term:`detached` state.
.. note:: The above reference to a "pre-buffered" vs. "un-buffered"
:class:`_result.Result` object refers to the process by which the ORM
converts incoming raw database rows from the :term:`DBAPI` into ORM
- objects. It does not imply whether or not the underyling ``cursor``
+ objects. It does not imply whether or not the underlying ``cursor``
object itself, which represents pending results from the DBAPI, is itself
buffered or unbuffered, as this is essentially a lower layer of buffering.
For background on buffering of the ``cursor`` results itself, see the
diff --git a/doc/build/faq/connections.rst b/doc/build/faq/connections.rst
index f8c4e5bca..02d088384 100644
--- a/doc/build/faq/connections.rst
+++ b/doc/build/faq/connections.rst
@@ -446,8 +446,8 @@ as all methods are proxied through::
attribute is also added which will always refer to the real driver-level
connection regardless of what API it presents.
-Accessing the underlying connnection for an asyncio driver
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Accessing the underlying connection for an asyncio driver
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When an asyncio driver is in use, there are two changes to the above
scheme. The first is that when using an :class:`_asyncio.AsyncConnection`,
diff --git a/doc/build/orm/extensions/asyncio.rst b/doc/build/orm/extensions/asyncio.rst
index a7d2fb16b..4e48ab74b 100644
--- a/doc/build/orm/extensions/asyncio.rst
+++ b/doc/build/orm/extensions/asyncio.rst
@@ -587,7 +587,7 @@ The above example prints something along the lines of::
particular SQLAlchemy API has been invoked by end-user code, and *before*
some other internal aspect of that API occurs.
- Constrast this to the architecture of the asyncio extension, which takes
+ Contrast this to the architecture of the asyncio extension, which takes
place on the **exterior** of SQLAlchemy's usual flow from end-user API to
DBAPI function.
diff --git a/doc/build/orm/mapped_sql_expr.rst b/doc/build/orm/mapped_sql_expr.rst
index eefd1d5d6..d9d675fd7 100644
--- a/doc/build/orm/mapped_sql_expr.rst
+++ b/doc/build/orm/mapped_sql_expr.rst
@@ -356,7 +356,7 @@ The :func:`.query_expression` mapping has these caveats:
query, such as the WHERE clause, the ORDER BY clause, and make use of the
ad-hoc expression; that is, this won't work::
- # wont work
+ # won't work
q = session.query(A).options(
with_expression(A.expr, A.x + A.y)
).filter(A.expr > 5).order_by(A.expr)
diff --git a/doc/build/tutorial/data_insert.rst b/doc/build/tutorial/data_insert.rst
index 90180154b..74b0aff56 100644
--- a/doc/build/tutorial/data_insert.rst
+++ b/doc/build/tutorial/data_insert.rst
@@ -245,7 +245,7 @@ as in the example below that builds upon the example stated in
which will be introduced later in this tutorial.
The RETURNING feature is generally [1]_ only
supported for statement executions that use a single set of bound
- parameters; that is, it wont work with the "executemany" form introduced
+ parameters; that is, it won't work with the "executemany" form introduced
at :ref:`tutorial_multiple_parameters`. Additionally, some dialects
such as the Oracle dialect only allow RETURNING to return a single row
overall, meaning it won't work with "INSERT..FROM SELECT" nor will it
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg.py b/lib/sqlalchemy/dialects/postgresql/psycopg.py
index 4219b4fff..911f46183 100644
--- a/lib/sqlalchemy/dialects/postgresql/psycopg.py
+++ b/lib/sqlalchemy/dialects/postgresql/psycopg.py
@@ -43,7 +43,7 @@ The asyncio version of the dialect may also be specified explicitly using the
asyncio_engine = create_async_engine("postgresql+psycopg_async://scott:tiger@localhost/test")
The ``psycopg`` dialect has the same API features as that of ``psycopg2``,
-with the exeption of the "fast executemany" helpers. The "fast executemany"
+with the exception of the "fast executemany" helpers. The "fast executemany"
helpers are expected to be generalized and ported to ``psycopg`` before the final
release of SQLAlchemy 2.0, however.
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index b11ffd871..470cfb449 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -187,7 +187,7 @@ class Connection(ConnectionEventsTarget):
keeping the effect of such an option localized to a "sub" connection.
.. versionchanged:: 2.0 The :meth:`_engine.Connection.execution_options`
- method, in constrast to other objects with this method, modifies
+ method, in contrast to other objects with this method, modifies
the connection in-place without creating copy of it.
As discussed elsewhere, the :meth:`_engine.Connection.execution_options`
diff --git a/lib/sqlalchemy/engine/cursor.py b/lib/sqlalchemy/engine/cursor.py
index 8247987fa..99a0b65ed 100644
--- a/lib/sqlalchemy/engine/cursor.py
+++ b/lib/sqlalchemy/engine/cursor.py
@@ -331,7 +331,7 @@ class CursorResultMetaData(ResultMetaData):
as with textual non-ordered columns.
The name-matched system of merging is the same as that used by
- SQLAlchemy for all cases up through te 0.9 series. Positional
+ SQLAlchemy for all cases up through the 0.9 series. Positional
matching for compiled SQL expressions was introduced in 1.0 as a
major performance feature, and positional matching for textual
:class:`_expression.TextualSelect` objects in 1.1.
diff --git a/lib/sqlalchemy/ext/mypy/util.py b/lib/sqlalchemy/ext/mypy/util.py
index 4d55cb728..0eefdb20f 100644
--- a/lib/sqlalchemy/ext/mypy/util.py
+++ b/lib/sqlalchemy/ext/mypy/util.py
@@ -245,7 +245,7 @@ def unbound_to_instance(
# TODO: figure out a more robust way to check this. The node is some
# kind of _SpecialForm, there's a typing.Optional that's _SpecialForm,
- # but I cant figure out how to get them to match up
+ # but I can't figure out how to get them to match up
if typ.name == "Optional":
# convert from "Optional?" to the more familiar
# UnionType[..., NoneType()]
diff --git a/lib/sqlalchemy/orm/path_registry.py b/lib/sqlalchemy/orm/path_registry.py
index f2768a6b6..7b04a798c 100644
--- a/lib/sqlalchemy/orm/path_registry.py
+++ b/lib/sqlalchemy/orm/path_registry.py
@@ -313,8 +313,8 @@ class TokenRegistry(PathRegistry):
def __getitem__(self, entity):
try:
return self.path[entity]
- except TypeError as te:
- raise IndexError(f"{entity}") from te
+ except TypeError as err:
+ raise IndexError(f"{entity}") from err
class PropRegistry(PathRegistry):
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index a2e247f14..018fb703d 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -378,7 +378,7 @@ class Query(
# it to provide a real expression object.
#
# from there, it starts to look much like Query itself won't be
- # passed into the execute process and wont generate its own cache
+ # passed into the execute process and won't generate its own cache
# key; this will all occur in terms of the ORM-enabled Select.
if (
not self._compile_options._set_base_alias
diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py
index 02068adce..6fcdfb27b 100644
--- a/lib/sqlalchemy/orm/strategy_options.py
+++ b/lib/sqlalchemy/orm/strategy_options.py
@@ -802,7 +802,7 @@ class _AbstractLoad(Generative, LoaderOption):
# scenario which should only be occurring in a loader
# that is against a non-aliased lead element with
# single path. otherwise the
- # "B" wont match into the B(B, B2).
+ # "B" won't match into the B(B, B2).
#
# i>=2 prevents this check from proceeding for
# the first path element.
diff --git a/lib/sqlalchemy/pool/base.py b/lib/sqlalchemy/pool/base.py
index 77e4761e8..984a497c7 100644
--- a/lib/sqlalchemy/pool/base.py
+++ b/lib/sqlalchemy/pool/base.py
@@ -792,7 +792,7 @@ class PoolProxiedConnection:
pool.
:class:`.PoolProxiedConnection` is basically the public-facing interface
- for the :class:`._ConnectionFairy` implemenatation object, users familiar
+ for the :class:`._ConnectionFairy` implementation object, users familiar
with :class:`._ConnectionFairy` can consider this object to be
equivalent.
diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py
index cc226d7e3..9d9b91cad 100644
--- a/lib/sqlalchemy/sql/type_api.py
+++ b/lib/sqlalchemy/sql/type_api.py
@@ -1742,7 +1742,7 @@ class TypeDecorator(ExternalType, SchemaEventTarget, TypeEngine):
in a result row subsequent to statement execution time.
Subclasses of :class:`_types.TypeDecorator` can override this method
- to provide custom column expresion behavior for the type. This
+ to provide custom column expression behavior for the type. This
implementation will **replace** that of the underlying implementation
type.
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index 52182a4f7..361b35010 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -1894,8 +1894,8 @@ def inject_param_text(doctext, inject_params):
lines.extend([line, to_inject, "\n"])
to_inject = None
elif line.endswith("::"):
- # TODO: this still wont cover if the code example itself has blank
- # lines in it, need to detect those via indentation.
+ # TODO: this still won't cover if the code example itself has
+ # blank lines in it, need to detect those via indentation.
lines.extend([line, doclines.popleft()])
continue
lines.append(line)
diff --git a/setup.cfg b/setup.cfg
index 80582f604..73303a830 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -126,7 +126,6 @@ ignore_errors = True
[mypy-sqlalchemy.ext.mypy.*]
ignore_errors = False
-
[sqla_testing]
requirement_cls = test.requirements:DefaultRequirements
profile_file = test/profiles.txt
diff --git a/test/base/test_result.py b/test/base/test_result.py
index b31e886da..8818ccb14 100644
--- a/test/base/test_result.py
+++ b/test/base/test_result.py
@@ -524,7 +524,7 @@ class ResultTest(fixtures.TestBase):
def test_one_unique(self):
# assert that one() counts rows after uniqueness has been applied.
- # this would raise if we didnt have unique
+ # this would raise if we didn't have unique
result = self._fixture(data=[(1, 1, 1), (1, 1, 1)])
row = result.unique().one()
@@ -541,7 +541,7 @@ class ResultTest(fixtures.TestBase):
def test_one_unique_mapping(self):
# assert that one() counts rows after uniqueness has been applied.
- # this would raise if we didnt have unique
+ # this would raise if we didn't have unique
result = self._fixture(data=[(1, 1, 1), (1, 1, 1)])
row = result.mappings().unique().one()
diff --git a/test/dialect/oracle/test_reflection.py b/test/dialect/oracle/test_reflection.py
index acf7d75d5..7dcd5bb1d 100644
--- a/test/dialect/oracle/test_reflection.py
+++ b/test/dialect/oracle/test_reflection.py
@@ -74,7 +74,7 @@ class MultiSchemaTest(fixtures.TestBase, AssertsCompiledSQL):
-- can't make a ref from local schema to the
-- remote schema's table without this,
- -- *and* cant give yourself a grant !
+ -- *and* can't give yourself a grant !
-- so we give it to public. ideas welcome.
grant references on %(test_schema)s.parent to public;
grant references on %(test_schema)s.child to public;
diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py
index 02d7ad483..57161e022 100644
--- a/test/dialect/postgresql/test_dialect.py
+++ b/test/dialect/postgresql/test_dialect.py
@@ -236,7 +236,7 @@ $$ LANGUAGE plpgsql;"""
"connection not open",
"could not receive data from server",
"could not send data to server",
- # psycopg2 client errors, psycopg2/conenction.h,
+ # psycopg2 client errors, psycopg2/connection.h,
# psycopg2/cursor.h
"connection already closed",
"cursor already closed",
diff --git a/test/dialect/postgresql/test_query.py b/test/dialect/postgresql/test_query.py
index fdce643f8..4e6ca46c1 100644
--- a/test/dialect/postgresql/test_query.py
+++ b/test/dialect/postgresql/test_query.py
@@ -1649,7 +1649,7 @@ class TableValuedRoundTripTest(fixtures.TestBase):
if cast_fn:
value = cast_fn(value, JSON)
- # why wont this work?!?!?
+ # why won't this work?!?!?
# should be exactly json_to_recordset(to_json('string'::text))
#
fn = (
diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py
index 5f8a41d1f..bcf43992b 100644
--- a/test/dialect/postgresql/test_types.py
+++ b/test/dialect/postgresql/test_types.py
@@ -3375,7 +3375,7 @@ class _RangeTypeRoundTrip(fixtures.TablesTest):
extras = psycopg_extras()
else:
- assert False, "Unknonw dialect"
+ assert False, "Unknown dialect"
return extras
@classmethod
diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py
index 141033c1b..37cdce344 100644
--- a/test/dialect/test_sqlite.py
+++ b/test/dialect/test_sqlite.py
@@ -1892,7 +1892,7 @@ class ConstraintReflectionTest(fixtures.TestBase):
"REFERENCES implicit_referred_comp)"
)
- # worst case - FK that refers to nonexistent table so we cant
+ # worst case - FK that refers to nonexistent table so we can't
# get pks. requires FK pragma is turned off
conn.exec_driver_sql(
"CREATE TABLE implicit_referrer_comp_fake "
diff --git a/test/ext/declarative/test_inheritance.py b/test/ext/declarative/test_inheritance.py
index 34bee1d14..64c32c76b 100644
--- a/test/ext/declarative/test_inheritance.py
+++ b/test/ext/declarative/test_inheritance.py
@@ -254,7 +254,7 @@ class ConcreteInhTest(
"concrete": True,
}
- # didnt call configure_mappers() again
+ # didn't call configure_mappers() again
assert_raises_message(
orm_exc.UnmappedClassError,
".*and has a mapping pending",
diff --git a/test/ext/test_baked.py b/test/ext/test_baked.py
index b3d6ebec2..ce051eadd 100644
--- a/test/ext/test_baked.py
+++ b/test/ext/test_baked.py
@@ -280,12 +280,12 @@ class LikeQueryTest(BakedTest):
# calling with *args
eq_(bq(sess).params(uname="fred").count(), 1)
# with multiple params, the **kwargs will be used
- bq += lambda q: q.filter(User.id == bindparam("anid"))
- eq_(bq(sess).params(uname="fred", anid=9).count(), 1)
+ bq += lambda q: q.filter(User.id == bindparam("an_id"))
+ eq_(bq(sess).params(uname="fred", an_id=9).count(), 1)
eq_(
# wrong id, so 0 results:
- bq(sess).params(uname="fred", anid=8).count(),
+ bq(sess).params(uname="fred", an_id=8).count(),
0,
)
diff --git a/test/orm/inheritance/test_manytomany.py b/test/orm/inheritance/test_manytomany.py
index e366a349c..a1305ac43 100644
--- a/test/orm/inheritance/test_manytomany.py
+++ b/test/orm/inheritance/test_manytomany.py
@@ -231,7 +231,7 @@ class InheritTest3(fixtures.MappedTest):
def define_tables(cls, metadata):
global foo, bar, blub, bar_foo, blub_bar, blub_foo
- # the 'data' columns are to appease SQLite which cant handle a blank
+ # the 'data' columns are to appease SQLite which can't handle a blank
# INSERT
foo = Table(
"foo",
diff --git a/test/orm/inheritance/test_relationship.py b/test/orm/inheritance/test_relationship.py
index fa66f90b8..5db607b45 100644
--- a/test/orm/inheritance/test_relationship.py
+++ b/test/orm/inheritance/test_relationship.py
@@ -2388,7 +2388,7 @@ class JoinedloadOverWPolyAliased(
cls is self.classes.Sub1
and Link.child.entity.class_ is self.classes.Parent
):
- # in 1.x we werent checking for this:
+ # in 1.x we weren't checking for this:
# query(Sub1).options(
# joinedload(Sub1.links).joinedload(Link.child).joinedload(Sub1.links)
# )
diff --git a/test/orm/inheritance/test_single.py b/test/orm/inheritance/test_single.py
index 1b3c6db74..5c18cc49e 100644
--- a/test/orm/inheritance/test_single.py
+++ b/test/orm/inheritance/test_single.py
@@ -597,8 +597,8 @@ class SingleInheritanceTest(testing.AssertsCompiledSQL, fixtures.MappedTest):
ra = aliased(Report, subq)
# this test previously used select_entity_from(). the standard
- # conversion to use aliased() neds to be adjusted to be against
- # Employee, not Manger, otherwise the ORM will add the manager single
+ # conversion to use aliased() needs to be adjusted to be against
+ # Employee, not Manager, otherwise the ORM will add the manager single
# inh criteria to the outside which will break the outer join
ma = aliased(Employee, subq)
diff --git a/test/orm/test_assorted_eager.py b/test/orm/test_assorted_eager.py
index 61251ddaf..bf70868b6 100644
--- a/test/orm/test_assorted_eager.py
+++ b/test/orm/test_assorted_eager.py
@@ -777,7 +777,7 @@ class EagerTest5(fixtures.MappedTest):
d2 = sess.get(DerivedII, "uid2")
sess.expunge_all()
- # object is not in the session; therefore the lazy load cant trigger
+ # object is not in the session; therefore the lazy load can't trigger
# here, eager load had to succeed
assert len([c for c in d2.comments]) == 1
diff --git a/test/orm/test_cascade.py b/test/orm/test_cascade.py
index 51ed50255..0bd1a6889 100644
--- a/test/orm/test_cascade.py
+++ b/test/orm/test_cascade.py
@@ -2166,7 +2166,7 @@ class M2OCascadeDeleteOrphanTestTwo(fixtures.MappedTest):
y = T3(data="T3a")
x = T2(data="T2a", t3=y)
- # cant attach the T3 to another T2
+ # can't attach the T3 to another T2
assert_raises(sa_exc.InvalidRequestError, T2, data="T2b", t3=y)
# set via backref tho is OK, unsets from previous parent
diff --git a/test/orm/test_core_compilation.py b/test/orm/test_core_compilation.py
index 000a96a42..b93d26d4a 100644
--- a/test/orm/test_core_compilation.py
+++ b/test/orm/test_core_compilation.py
@@ -1073,7 +1073,7 @@ class ExtraColsTest(QueryTest, AssertsCompiledSQL):
# the column properties
stmt = select(stmt.subquery())
- # TODO: shouldnt we be able to get to stmt.subquery().c.count ?
+ # TODO: shouldn't we be able to get to stmt.subquery().c.count ?
self.assert_compile(
stmt,
"SELECT anon_2.anon_1, anon_2.anon_3, anon_2.id, anon_2.name "
diff --git a/test/orm/test_deferred.py b/test/orm/test_deferred.py
index 0d7ccde90..db0033023 100644
--- a/test/orm/test_deferred.py
+++ b/test/orm/test_deferred.py
@@ -1597,7 +1597,7 @@ class InheritanceTest(_Polymorphic):
)
# note this doesn't apply to "bound" loaders since they don't seem
- # to have this ".*" featue.
+ # to have this ".*" feature.
def test_load_only_subclass_of_type(self):
s = fixture_session()
diff --git a/test/orm/test_deprecations.py b/test/orm/test_deprecations.py
index bae2a9707..b45ef0214 100644
--- a/test/orm/test_deprecations.py
+++ b/test/orm/test_deprecations.py
@@ -6633,4 +6633,4 @@ class Deferred_InheritanceTest(_deferred_InheritanceTest):
"people.person_id = managers.person_id ORDER BY people.person_id",
)
# note this doesn't apply to "bound" loaders since they don't seem
- # to have this ".*" featue.
+ # to have this ".*" feature.
diff --git a/test/orm/test_expire.py b/test/orm/test_expire.py
index 3e3488d52..58378956f 100644
--- a/test/orm/test_expire.py
+++ b/test/orm/test_expire.py
@@ -1007,7 +1007,7 @@ class ExpireTest(_fixtures.FixtureTest):
assert u.uname == "jack2"
assert "name" in u.__dict__
- # this wont work unless we add API hooks through the attr. system to
+ # this won't work unless we add API hooks through the attr. system to
# provide "expire" behavior on a synonym
# sess.expire(u, ['uname'])
# users.update(users.c.id==7).execute(name='jack3')
diff --git a/test/orm/test_joins.py b/test/orm/test_joins.py
index 58b09b67d..fa373f0e5 100644
--- a/test/orm/test_joins.py
+++ b/test/orm/test_joins.py
@@ -834,7 +834,7 @@ class JoinTest(QueryTest, AssertsCompiledSQL):
use_default_dialect=True,
)
- # this fails (and we cant quite fix right now).
+ # this fails (and we can't quite fix right now).
if False:
self.assert_compile(
sess.query(User, ualias)
diff --git a/test/orm/test_mapper.py b/test/orm/test_mapper.py
index b491604f3..a7888a2dd 100644
--- a/test/orm/test_mapper.py
+++ b/test/orm/test_mapper.py
@@ -920,7 +920,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
sess = fixture_session()
u1 = sess.get(User, 7)
u2 = sess.get(User, 8)
- # comparaison ops need to work
+ # comparison ops need to work
a1 = sess.query(Address).filter(Address.user == u1).one()
eq_(a1.id, 1)
a1.user = u2
diff --git a/test/orm/test_relationships.py b/test/orm/test_relationships.py
index 9ceaf4b6c..f552995a9 100644
--- a/test/orm/test_relationships.py
+++ b/test/orm/test_relationships.py
@@ -1035,7 +1035,7 @@ class OverlappingFksSiblingTest(fixtures.MappedTest):
@testing.provide_metadata
def test_works_two(self):
- # doesn't actually work with real FKs beacuse it creates conflicts :)
+ # doesn't actually work with real FKs because it creates conflicts :)
self._fixture_one(
add_b_a=True, add_b_a_overlaps="a_member", add_bsub1_a=True
)
@@ -1668,7 +1668,7 @@ class FKsAsPksTest(fixtures.MappedTest):
sess.commit()
def test_no_delete_PK_AtoB(self):
- """A cant be deleted without B because B would have no PK value."""
+ """A can't be deleted without B because B would have no PK value."""
tableB, A, B, tableA = (
self.tables.tableB,
@@ -1732,7 +1732,7 @@ class FKsAsPksTest(fixtures.MappedTest):
def test_nullPKsOK_BtoA(self, metadata, connection):
A, tableA = self.classes.A, self.tables.tableA
- # postgresql cant handle a nullable PK column...?
+ # postgresql can't handle a nullable PK column...?
tableC = Table(
"tablec",
metadata,
@@ -4722,7 +4722,7 @@ class SecondaryNestedJoinTest(
# here, the "lazy" strategy has to ensure the "secondary"
# table is part of the "select_from()", since it's a join().
- # referring to just the columns wont actually render all those
+ # referring to just the columns won't actually render all those
# join conditions.
self.assert_sql_execution(
testing.db,
diff --git a/test/requirements.py b/test/requirements.py
index 3934dd23f..e66443d18 100644
--- a/test/requirements.py
+++ b/test/requirements.py
@@ -472,7 +472,7 @@ class DefaultRequirements(SuiteRequirements):
"""
return fails_if(
self._mysql_not_mariadb_103,
- 'MySQL error 1093 "Cant specify target table '
+ "MySQL error 1093 \"Can't specify target table "
'for update in FROM clause", resolved by MariaDB 10.3',
)
@@ -649,7 +649,7 @@ class DefaultRequirements(SuiteRequirements):
@property
def dupe_order_by_ok(self):
- """target db wont choke if ORDER BY specifies the same expression
+ """target db won't choke if ORDER BY specifies the same expression
more than once
"""
diff --git a/test/sql/test_operators.py b/test/sql/test_operators.py
index 9e47f217f..93b49bb79 100644
--- a/test/sql/test_operators.py
+++ b/test/sql/test_operators.py
@@ -2700,7 +2700,7 @@ class MatchTest(fixtures.TestBase, testing.AssertsCompiledSQL):
)
def test_boolean_inversion_mysql(self):
- # because mysql doesnt have native boolean
+ # because mysql doesn't have native boolean
self.assert_compile(
~self.table1.c.myid.match("somstr"),
"NOT MATCH (mytable.myid) AGAINST (%s IN BOOLEAN MODE)",
@@ -2708,7 +2708,7 @@ class MatchTest(fixtures.TestBase, testing.AssertsCompiledSQL):
)
def test_boolean_inversion_mssql(self):
- # because mssql doesnt have native boolean
+ # because mssql doesn't have native boolean
self.assert_compile(
~self.table1.c.myid.match("somstr"),
"NOT CONTAINS (mytable.myid, :myid_1)",