Fixed bug where when using extended attribute instrumentation system,
the correct exception would not be raised when :func:`.class_mapper`
were called with an invalid input that also happened to not
- be weak referencable, such as an integer.
+ be weak referenceable, such as an integer.
.. change::
:tags: bug, tests, pypy
:tickets: 5735
Improved the unit of work topological sorting system such that the
- toplogical sort is now deterministic based on the sorting of the input set,
+ topological sort is now deterministic based on the sorting of the input set,
which itself is now sorted at the level of mappers, so that the same inputs
of affected mappers should produce the same output every time, among
mappers / tables that don't have any dependency on each other. This further
The bulk update and delete methods :meth:`.Query.update` and
:meth:`.Query.delete`, as well as their 2.0-style counterparts, now make
use of RETURNING when the "fetch" strategy is used in order to fetch the
- list of affected primary key identites, rather than emitting a separate
+ list of affected primary key identities, rather than emitting a separate
SELECT, when the backend in use supports RETURNING. Additionally, the
"fetch" strategy will in ordinary cases not expire the attributes that have
been updated, and will instead apply the updated values directly in the
:tags: bug, postgresql
:tickets: 12728
- Re-raise catched ``CancelledError`` in the terminate method of the
+ Re-raise caught ``CancelledError`` in the terminate method of the
asyncpg dialect to avoid possible hangs of the code execution.
into a SQL expression in a boolean context, for programs where future
annotations mode was not enabled. This case is now handled explicitly and
a new error message has also been tailored for this case. In addition, as
- there are at least half a dozen distinct error scenarios for intepretation
+ there are at least half a dozen distinct error scenarios for interpretation
of the :class:`.Mapped` construct, these scenarios have all been unified
under a new subclass of :class:`.ArgumentError` called
:class:`.MappedAnnotationError`, to provide some continuity between these
``connection.transaction()`` call sent to asyncpg sends ``None`` for
``isolation_level`` if not otherwise set in the SQLAlchemy dialect/wrapper,
thereby allowing asyncpg to make use of the server level setting for
- ``isolation_level`` in the absense of a client-level setting. Previously,
+ ``isolation_level`` in the absence of a client-level setting. Previously,
this behavior of asyncpg was blocked by a hardcoded ``read_committed``.
.. change::
versioned table needs to default to the most recent version number in the
history table on INSERT, to suit the use case of a table where rows are
deleted, and can then be replaced by new rows that re-use the same primary
- key identity. This fix adds an additonal SELECT query per INSERT in the
+ key identity. This fix adds an additional SELECT query per INSERT in the
main table, which may be inefficient; for cases where primary keys are not
re-used, the default function may be omitted. Patch courtesy Philipp H.
v. Loewenfeld.
Fixed internal typing issues to establish compatibility with mypy 1.11.0.
Note that this does not include issues which have arisen with the
- deprecated mypy plugin used by SQLAlchemy 1.4-style code; see the addiional
+ deprecated mypy plugin used by SQLAlchemy 1.4-style code; see the additional
change note for this plugin indicating revised compatibility.
.. changelog::
:tickets: 11306
Fixed issue in cursor handling which affected handling of duplicate
- :class:`_sql.Column` or similar objcts in the columns clause of
- :func:`_sql.select`, both in combination with arbitary :func:`_sql.text()`
+ :class:`_sql.Column` or similar objects in the columns clause of
+ :func:`_sql.select`, both in combination with arbitrary :func:`_sql.text()`
clauses in the SELECT list, as well as when attempting to retrieve
:meth:`_engine.Result.mappings` for the object, which would lead to an
internal error.
Fixed issue in :ref:`engine_insertmanyvalues` feature where using a primary
key column with an "inline execute" default generator such as an explicit
- :class:`.Sequence` with an explcit schema name, while at the same time
+ :class:`.Sequence` with an explicit schema name, while at the same time
using the
:paramref:`_engine.Connection.execution_options.schema_translate_map`
feature would fail to render the sequence or the parameters properly,
"Can't match sentinel values in result set to parameter sets". Rather than
attempt to further explain and document this implementation detail of the
"insertmanyvalues" feature including a public version of the new
- method, the approach is intead revised to no longer need this extra
+ method, the approach is instead revised to no longer need this extra
conversion step, and the logic that does the comparison now works on the
pre-converted bound parameter value compared to the post-result-processed
value, which should always be of a matching datatype. In the unusual case
Fixed regression from version 2.0.28 caused by the fix for :ticket:`11085`
where the newer method of adjusting post-cache bound parameter values would
- interefere with the implementation for the :func:`_orm.subqueryload` loader
+ interfere with the implementation for the :func:`_orm.subqueryload` loader
option, which has some more legacy patterns in use internally, when
the additional loader criteria feature were used with this loader option.
parameter for new style bulk ORM inserts, allowing ``render_nulls=True`` as
an execution option. This allows for bulk ORM inserts with a mixture of
``None`` values in the parameter dictionaries to use a single batch of rows
- for a given set of dicationary keys, rather than breaking up into batches
+ for a given set of dictionary keys, rather than breaking up into batches
that omit the NULL columns from each INSERT.
.. seealso::
However, mariadb-connector does not support invoking ``cursor.rowcount``
after the cursor itself is closed, raising an error instead. Generic test
support has been added to ensure all backends support the allowing
- :attr:`.Result.rowcount` to succceed (that is, returning an integer
+ :attr:`.Result.rowcount` to succeed (that is, returning an integer
value with -1 for "not available") after the result is closed.
:class:`.Update` and :class:`.Delete` to not interfere with the target
"from" object passed to the statement, such as when passing an ORM-mapped
:class:`_orm.aliased` construct that should be maintained within a phrase
- like "UPDATE FROM". Cases like ORM session synchonize using "SELECT"
+ like "UPDATE FROM". Cases like ORM session synchronize using "SELECT"
statements such as with MySQL/ MariaDB will still have issues with
UPDATE/DELETE of this form so it's best to disable synchonize_session when
using DML statements of this type.
Fixed regression caused by improvements to PostgreSQL URL parsing in
:ticket:`10004` where "host" query string arguments that had colons in
them, to support various third party proxy servers and/or dialects, would
- not parse correctly as these were evaluted as ``host:port`` combinations.
+ not parse correctly as these were evaluated as ``host:port`` combinations.
Parsing has been updated to consider a colon as indicating a ``host:port``
value only if the hostname contains only alphanumeric characters with dots
or dashes only (e.g. no slashes), followed by exactly one colon followed by
Fixed issue where the :paramref:`.ColumnOperators.like.escape` and similar
parameters did not allow an empty string as an argument that would be
passed through as the "escape" character; this is a supported syntax by
- PostgreSQL. Pull requset courtesy Martin Caslavsky.
+ PostgreSQL. Pull request courtesy Martin Caslavsky.
.. change::
:tags: bug, orm
:tickets: 9869
- Improved the argument chacking on the
+ Improved the argument checking on the
:paramref:`_orm.registry.map_imperatively.local_table` parameter of the
:meth:`_orm.registry.map_imperatively` method, ensuring only a
:class:`.Table` or other :class:`.FromClause` is passed, and not an
:paramref:`_orm.Mapper.primary_key` parameter to be specified within
``__mapper_args__`` when using :func:`_orm.mapped_column`. Despite this
usage being directly in the 2.0 documentation, the :class:`_orm.Mapper` was
- not accepting the :func:`_orm.mapped_column` construct in this context. Ths
+ not accepting the :func:`_orm.mapped_column` construct in this context. This
feature was already working for the :paramref:`_orm.Mapper.version_id_col`
and :paramref:`_orm.Mapper.polymorphic_on` parameters.
Improved the typing for :class:`.sessionmaker` and
:class:`.async_sessionmaker`, so that the default type of their return value
will be :class:`.Session` or :class:`.AsyncSession`, without the need to
- type this explicitly. Previously, Mypy would not automaticaly infer these
+ type this explicitly. Previously, Mypy would not automatically infer these
return types from its generic base.
As part of this change, arguments for :class:`.Session`,
:tickets: 8718
Fixed issue in new dataclass mapping feature where a column declared on the
- decalrative base / abstract base / mixin would leak into the constructor
+ declarative base / abstract base / mixin would leak into the constructor
for an inheriting subclass under some circumstances.
.. change::
being mentioned in other parts of the query. If other elements of the
:class:`_sql.Select` also generate FROM clauses, such as the columns clause
or WHERE clause, these will render after the clauses delivered by
- :meth:`_sql.Select.select_from` assuming they were not explictly passed to
+ :meth:`_sql.Select.select_from` assuming they were not explicitly passed to
:meth:`_sql.Select.select_from` also. This improvement is useful in those
cases where a particular database generates a desirable query plan based on
a particular ordering of FROM clauses and allows full control over the
visible in messaging as well as typing, have been changed to more succinct
names which also match the name of their constructing function (with
different casing), in all cases maintaining aliases to the old names for
- the forseeable future:
+ the foreseeable future:
* :class:`_orm.RelationshipProperty` becomes an alias for the primary name
:class:`_orm.Relationship`, which is constructed as always from the
the application is fully running on 2.0**, then migrate directly from
:class:`.AppenderQuery`, which is the collection type used by the "dynamic"
strategy, to :class:`.WriteOnlyCollection`, which is the collection type
-used by hte "write_only" strategy.
+used by the "write_only" strategy.
Some techniques are available to use ``lazy="dynamic"`` under 1.4 in a more
"2.0" style however. There are two ways to achieve 2.0 style querying that's in
type are now deprecated for removal; these two methods along with
:func:`_postgresql.Any` and :func:`_postgresql.All` have been legacy for
some time as they are superseded by the :func:`_sql.any_` and
- :func:`_sql.all_` functions, which feature more intutive use.
+ :func:`_sql.all_` functions, which feature more intuitive use.
interface to correctly raise ``TypeError`` for invalid use of the ``|``,
``&``, ``^``, and ``-`` operators, as well as the in-place mutation
versions of these methods, to match the behavior of standard Python
- ``set()`` as well as SQLAlchemy ORM's "intstrumented" set implementation.
+ ``set()`` as well as SQLAlchemy ORM's "instrumented" set implementation.
(so-called NewSQL) or other novel styles of database that introduce new
clauses to these statements. A new example suite is included which
illustrates the ``QUALIFY`` SQL construct used by several NewSQL databases
- which includes a cachable implementation as well as a test suite.
+ which includes a cacheable implementation as well as a test suite.
.. seealso::
similar statements, via a new statement-only
:meth:`.ExecutableStatement.params` method which works more efficiently and
correctly than the previous implementations available from
- :class:`.ClauseElement`, by assocating the given parameter dictionary with
+ :class:`.ClauseElement`, by associating the given parameter dictionary with
the statement overall rather than cloning the statement and rewriting its
bound parameters. The :meth:`_sql.ClauseElement.params` and
:meth:`_sql.ClauseElement.unique_params` methods, when called on an object
on a common base :class:`.EmulatedDBAPIException`, which is now what's
available from the :attr:`.StatementException.orig` attribute on a
SQLAlchemy :class:`.DBAPIError` object. Within :class:`.EmulatedDBAPIException`
- and the subclasses in its hiearchy, the original driver-level exception is
- also now avaliable via the :attr:`.EmulatedDBAPIException.orig` attribute,
+ and the subclasses in its hierarchy, the original driver-level exception is
+ also now available via the :attr:`.EmulatedDBAPIException.orig` attribute,
and is also available from :class:`.DBAPIError` directly using the
:attr:`.DBAPIError.driver_exception` attribute.
)
extra_data: Mapped[Optional[str]]
- # association between Assocation -> Child
+ # association between Association -> Child
child: Mapped["Child"] = relationship(back_populates="parent_associations")
- # association between Assocation -> Parent
+ # association between Association -> Parent
parent: Mapped["Parent"] = relationship(back_populates="child_associations")
PRIMARY KEY (id)
)
-On MySQL, we get a VARCHAR column with an explcit length (required by
+On MySQL, we get a VARCHAR column with an explicit length (required by
MySQL):
.. sourcecode:: pycon+sql
% size more like a typical published manual.
%\renewcommand{\paperheight}{9in}
%\renewcommand{\paperwidth}{8.5in} % typical squarish manual
-%\renewcommand{\paperwidth}{7in} % O'Reilly ``Programmming Python''
+%\renewcommand{\paperwidth}{7in} % O'Reilly ``Programming Python''
% For graphicx, check if we are compiling under latex or pdflatex.
\ifx\pdftexversion\undefined
self._rows = collections.deque(await_(self._cursor.fetchall()))
def setinputsizes(self, *inputsizes: Any) -> None:
- # NOTE: this is overrridden in aioodbc due to
+ # NOTE: this is overridden in aioodbc due to
# see https://github.com/aio-libs/aioodbc/issues/451
# right now
For example to use an `Easy Connect string
<https://download.oracle.com/ocomdocs/global/Oracle-Net-Easy-Connect-Plus.pdf>`_
with a timeout to prevent connection establishment from hanging if the network
-transport to the database cannot be establishd in 30 seconds, and also setting
+transport to the database cannot be established in 30 seconds, and also setting
a keep-alive time of 60 seconds to stop idle network connections from being
terminated by a firewall::
class _OracleBoolean(sqltypes.Boolean):
def get_dbapi_type(self, dbapi):
- # this can probably be dbapi.BOOLEAN (including for older verisons),
+ # this can probably be dbapi.BOOLEAN (including for older versions),
# however sticking with NUMBER to avoid any surprises with older
# versions or non-bool values
return dbapi.NUMBER
:param distance: Enum value from :class:`.VectorDistanceType`
specifies the metric for calculating distance between VECTORS.
- :param accuracy: interger. Should be in the range 0 to 100
+ :param accuracy: integer. Should be in the range 0 to 100
Specifies the accuracy of the nearest neighbor search during
query execution.
:param parallel: integer. Specifies degree of parallelism.
- :param hnsw_neighbors: interger. Should be in the range 0 to
+ :param hnsw_neighbors: integer. Should be in the range 0 to
2048. Specifies the number of nearest neighbors considered
during the search. The attribute :attr:`.VectorIndexConfig.hnsw_neighbors`
is HNSW index specific.
"""
if dim is not None and not isinstance(dim, int):
- raise TypeError("dim must be an interger")
+ raise TypeError("dim must be an integer")
if storage_format is not None and not isinstance(
storage_format, VectorStorageFormat
):
async def _async_ping(self):
if self._transaction is None and self.isolation_level != "autocommit":
- # create a tranasction explicitly to support pgbouncer
+ # create a transaction explicitly to support pgbouncer
# transaction mode. See #10226
tr = self._connection.transaction()
await tr.start()
* nullable - Indicates if this domain can be ``NULL``.
* default - The default value of the domain or ``None`` if the
domain has no default.
- * constraints - A list of dict wit the constraint defined by this
- domain. Each element constaints two keys: ``name`` of the
+ * constraints - A list of dict with the constraint defined by this
+ domain. Each element contains two keys: ``name`` of the
constraint and ``check`` with the constraint text.
:param schema: schema name. If None, the default schema
# a sequential scan of pg_attribute.
# The condition in the con_sq subquery is not actually needed
# in pg15, but it may be needed in older versions. Keeping it
- # does not seems to have any inpact in any case.
+ # does not seems to have any impact in any case.
con_sq.c.conrelid.in_(bindparam("oids"))
)
.subquery("attr")
default = ReflectionDefaults.unique_constraints
for table_name, cols, con_name, comment, options in result:
# ensure a list is created for each table. leave it empty if
- # the table has no unique cosntraint
+ # the table has no unique constraint
if con_name is None:
uniques[(schema, table_name)] = default()
continue
of the transaction will not rollback elements that were part of a released
savepoint.
-Legacy transaction mode first existed in order to faciliate working around
+Legacy transaction mode first existed in order to facilitate working around
SQLite's file locks. Because SQLite relies upon whole-file locks, it is easy to
get "database is locked" errors, particularly when newer features like "write
ahead logging" are disabled. This is a key reason why ``sqlite3``'s legacy
keymap_by_position = self._keymap_by_result_column_idx
if keymap_by_position is None:
- # first retrival from cache, this map will not be set up yet,
+ # first retrieval from cache, this map will not be set up yet,
# initialize lazily
keymap_by_position = self._keymap_by_result_column_idx = {
metadata_entry[MD_RESULT_MAP_INDEX]: metadata_entry
the proxied value to ``None`` should **create** the source object
if it does not exist, using the creator. Only applies to scalar
attributes. This is mutually exclusive
- vs. the :paramref:`.assocation_proxy.cascade_scalar_deletes`.
+ vs. the :paramref:`.association_proxy.cascade_scalar_deletes`.
.. versionadded:: 2.0.18
except Exception as err:
raise exc.InvalidRequestError(
f"Association proxy received an unexpected error when "
- f"trying to retreive attribute "
+ f"trying to retrieve attribute "
f'"{target_class.__name__}.{parent.value_attr}" from '
f'class "{target_class.__name__}": {err}'
) from err
# (see PEP 479 for sync generators; async generators also
# have this behavior). But do this only if the exception
# wrapped
- # by the RuntimeError is actully Stop(Async)Iteration (see
+ # by the RuntimeError is actually Stop(Async)Iteration (see
# issue29692).
if (
isinstance(value, (StopIteration, StopAsyncIteration))
.. deepalchemy:: The horizontal sharding extension is an advanced feature,
involving a complex statement -> database interaction as well as
use of semi-public APIs for non-trivial cases. Simpler approaches to
- refering to multiple database "shards", most commonly using a distinct
+ referring to multiple database "shards", most commonly using a distinct
:class:`_orm.Session` per "shard", should always be considered first
before using this more complex and less-production-tested system.
list available on ``self``.
.. tip:: The ``User.balance`` getter in the above example accesses the
- ``self.acccounts`` collection, which will normally be loaded via the
+ ``self.accounts`` collection, which will normally be loaded via the
:func:`.selectinload` loader strategy configured on the ``User.balance``
:func:`_orm.relationship`. The default loader strategy when not otherwise
stated on :func:`_orm.relationship` is :func:`.lazyload`, which emits SQL on
# call can_use_returning() before invoking the statement and get
# answer?, why does this go through the whole execute phase using an
# event? Answer: because we are integrating with extensions such
- # as the horizontal sharding extention that "multiplexes" an individual
+ # as the horizontal sharding extension that "multiplexes" an individual
# statement run through multiple engines, and it uses
# do_orm_execute() to do that.
cascading: bool = False,
quiet: bool = False,
):
- # suppport
+ # support
# @declared_attr
# @classmethod
# def foo(cls) -> Mapped[thing]:
:param metadata: optional :class:`_schema.MetaData` collection.
If a :class:`_orm.registry` is constructed automatically, this
:class:`_schema.MetaData` collection will be used to construct it.
- Otherwise, the local :class:`_schema.MetaData` collection will supercede
+ Otherwise, the local :class:`_schema.MetaData` collection will supersede
that used by an existing :class:`_orm.registry` passed using the
:paramref:`_orm.DeclarativeBase.registry` parameter.
:param type_annotation_map: optional type annotation map that will be
if isinstance(attr, attributes.QueryableAttribute):
return attr.comparator
elif isinstance(attr, SQLORMOperations):
- # assocaition proxy comes here
+ # association proxy comes here
return attr
raise sa_exc.InvalidRequestError(
:meth:`_orm.RegistryEvents.after_configured`.`. These events may be
applied to a :class:`_orm.registry` object as shown in the preceding
example, as well as to a declarative base class directly, which will
- automtically locate the registry for the event to be applied::
+ automatically locate the registry for the event to be applied::
from typing import Any
extracted_mapped_annotation: Optional[_AnnotationScanType],
is_dataclass_field: bool,
) -> None:
- """Perform class-specific initializaton at early declarative scanning
+ """Perform class-specific initialization at early declarative scanning
time.
.. versionadded:: 2.0
:func:`.validates` usage where only one validator should emit per
attribute operation.
- .. versionchanged:: 2.0.16 This paramter inadvertently defaulted to
+ .. versionchanged:: 2.0.16 This parameter inadvertently defaulted to
``False`` for releases 2.0.0 through 2.0.15. Its correct default
of ``True`` is restored in 2.0.16.
"""transaction were started by calling :meth:`_orm.Session.begin`"""
BEGIN_NESTED = 2
- """tranaction were started by :meth:`_orm.Session.begin_nested`"""
+ """transaction were started by :meth:`_orm.Session.begin_nested`"""
SUBTRANSACTION = 3
"""transaction is an internal "subtransaction" """
indicate state should not change at the end of the method.
"""
- assert prerequisite_states, "no prequisite states sent"
+ assert prerequisite_states, "no prerequisite states sent"
has_prerequisite_states = (
prerequisite_states is not _StateChangeStates.ANY
)
connection on behalf of a :class:`_pool.Pool` instance.
The :class:`.ConnectionPoolEntry` object represents the long term
- maintainance of a particular connection for a pool, including expiring or
+ maintenance of a particular connection for a pool, including expiring or
invalidating that connection to have it replaced with a new one, which will
continue to be maintained by that same :class:`.ConnectionPoolEntry`
instance. Compared to :class:`.PoolProxiedConnection`, which is the
)
elif (
# general class of expressions that don't have a SQL-column
- # addressible name. includes scalar selects, bind parameters,
+ # addressable name. includes scalar selects, bind parameters,
# SQL functions, others
not isinstance(column, elements.NamedColumn)
# deeper check that indicates there's no natural "name" to
self.implicit_returning or insert_stmt._returning
) and insert_stmt._sort_by_parameter_order:
raise exc.CompileError(
- "RETURNING cannot be determinstically sorted when "
+ "RETURNING cannot be deterministically sorted when "
"using an INSERT which includes multi-row values()."
)
crud_params_single = crud_params_struct.single_params
of the view is based on the columns of the SELECT statement, and the data
present in the view is derived from the rows represented by the
SELECT. A non-materialized view will evaluate the SELECT statement
- dynamicaly as it is queried, whereas a materialized view represents a
+ dynamically as it is queried, whereas a materialized view represents a
snapshot of the SELECT statement at a particular point in time and
typically needs to be refreshed manually using database-specific commands.
The :meth:`.UpdateBase.return_defaults` method is used by the ORM
for its internal work in fetching newly generated primary key
- and server default values, in particular to provide the underyling
+ and server default values, in particular to provide the underlying
implementation of the :paramref:`_orm.Mapper.eager_defaults`
ORM feature as well as to allow RETURNING support with bulk
ORM inserts. Its behavior is fairly idiosyncratic
def all_(self) -> CollectionAggregate[Any]: ...
# numeric overloads. These need more tweaking
- # in particular they all need to have a variant for Optiona[_T]
+ # in particular they all need to have a variant for Optional[_T]
# because Optional only applies to the data side, not the expression
# side
``SERIAL``, MySQL ``AUTO_INCREMENT``, or ``IDENTITY`` on SQL Server
should also be rendered. Not every database backend has an
"implied" default generator available; for example the Oracle Database
- backends alway needs an explicit construct such as
+ backends always needs an explicit construct such as
:class:`.Identity` to be included with a :class:`.Column` in order
for the DDL rendered to include auto-generating constructs to also
be produced in the database.
if "oracle_order" in dialect_kw:
raise exc.ArgumentError(
"Cannot specify both 'order' and 'oracle_order'. "
- "Plese use only 'oracle_order'."
+ "Please use only 'oracle_order'."
)
dialect_kw["oracle_order"] = order
self._validate_dialect_kwargs(dialect_kw)
if "oracle_on_null" in dialect_kw:
raise exc.ArgumentError(
"Cannot specify both 'on_null' and 'oracle_on_null'. "
- "Plese use only 'oracle_on_null'."
+ "Please use only 'oracle_on_null'."
)
dialect_kw["oracle_on_null"] = on_null
def _object_value_for_elem(self, elem: str) -> Union[str, enum.Enum]:
try:
- # Value will not be None beacuse key is not None
+ # Value will not be None because key is not None
return self._object_lookup[elem] # type: ignore[return-value]
except KeyError as err:
raise LookupError(
which defines all kinds of ways of traversing the elements of an object.
Compared to :class:`.Visitable`, which relies upon an external visitor to
- define how the object is travered (i.e. the :class:`.SQLCompiler`), the
+ define how the object is traversed (i.e. the :class:`.SQLCompiler`), the
:class:`.HasTraverseInternals` interface allows classes to define their own
traversal, that is, what attributes are accessed and in what order.
make_option(
"--disable-asyncio",
action="store_true",
- help="disable test / fixtures / provisoning running in asyncio",
+ help="disable test / fixtures / provisioning running in asyncio",
)
make_option(
"--backend-only",
table_key = thread_name
assert table_key in metadata.tables, f"{table_key} does not exist"
with num_threads_engine.connect() as conn:
- # Will raise if it cannot connect so erros will be populated
+ # Will raise if it cannot connect so errors will be populated
conn.execute(sa.select(metadata.tables[table_key]))
_, errors = self.run_threaded(worker)
Column(
"embedding",
# can't specify dementions in the free version of oracle
- # since otherwise it complains that has no spece for the index
+ # since otherwise it complains that has no space for the index
VECTOR(),
# VECTOR(dim=3, storage_format=VectorStorageFormat.FLOAT32),
),
"Can't resolve label reference for.* expression 'not a"
" label' should be explicitly",
):
- self.assert_compile(stmt, "ingored")
+ self.assert_compile(stmt, "ignored")
def test_distinct_on_ext_with_legacy_distinct(self):
with (
eq_(groups, expected)
def test_range_constructor(self):
- """test kwonly argments in the range constructor, as we had
+ """test kwonly arguments in the range constructor, as we had
to do dataclasses backwards compat operations"""
r1 = Range(None, 5)
PostgreSQL dialect right now. MSSQL would also use it for a server
side function that produces monotonic values, but we have no support
for that outside of sequence next right now, where SQL Server doesn't
- support invokving the sequence outside of the VALUES tuples.
+ support invoking the sequence outside of the VALUES tuples.
"""
with expect_raises_message(
exc.InvalidRequestError,
"Association proxy received an unexpected error when trying to "
- 'retreive attribute "B.fails_on_class_access" from '
+ 'retrieve attribute "B.fails_on_class_access" from '
r'class "B": .* no len\(\)',
):
a1.fails_on_class_access
"construct", ["Mapped", "WriteOnlyMapped", "DynamicMapped"]
)
def test_fully_qualified_writeonly_mapped_name(self, decl_base, construct):
- """futher variation in issue #10412"""
+ """further variation in issue #10412"""
class Foo(decl_base):
__tablename__ = "foo"
def test_indirect_name_relationship_arg_override(self, decl_base):
"""test #8759
- in this test we assume a case where the type for the Mapped annnotation
+ in this test we assume a case where the type for the Mapped annotation
a. has to be a different name than the actual class name and
b. cannot be imported outside of TYPE CHECKING. user will then put
the real name inside of relationship(). we have to succeed even though
# tip: whether or not there is "id_2" and "id_3" here,
# or just "id_2", is based on whether or not the two
# queries had polymorphic adaption proceed, so that the
- # two filter criterias are different vs. the same object. see
+ # two filter criteria are different vs. the same object. see
# mapper._should_select_with_poly_adapter added in #8456.
[{"param_1": "a", "id_2": 3, "param_2": "b", "id_3": 3}],
)
o4 = pickle.loads(pk_o3)
# and lastly make sure we still have our data after all that.
- # identical serialzation is great, *if* it's complete :)
+ # identical serialization is great, *if* it's complete :)
self.assert_(o4.user_id == 7)
self.assert_(o4.user_name is None)
self.assert_(o4.email_address is None)
session = fixture_session()
# here, we want the defaultload() to go away on subsequent loads,
- # becuase Parent.extension is propagate_to_loaders=False
+ # because Parent.extension is propagate_to_loaders=False
query = (
select(Parent)
.join(Extension)
session = fixture_session()
# here, we want the defaultload() to go away on subsequent loads,
- # becuase Parent.extension is propagate_to_loaders=False
+ # because Parent.extension is propagate_to_loaders=False
query = select(Parent).options(
(
defaultload(Parent.extension).options(
"""test ultimately from #2316 revised for #8064.
previously column_property() would deannotate the given expression,
- however this interfered with some compilation sceanrios.
+ however this interfered with some compilation scenarios.
"""
def test_synonym_nonexistent_attr(self):
# test [ticket:4767].
- # synonym points to non-existent attrbute that hasn't been mapped yet.
+ # synonym points to non-existent attribute that hasn't been mapped yet.
users = self.tables.users
class User:
)
def test_order_by_labels_enabled(self, operator, expected):
"""test positive cases with order_by_labels enabled. this is
- multipled out to all the ORDER BY modifier operators
+ multiplied out to all the ORDER BY modifier operators
(see #11592)
)
# this tests that _from_objects
- # concantenates OK
+ # concatenates OK
self.assert_compile(
select(column("x") + over(func.foo())),
"SELECT x + foo() OVER () AS anon_1",
)
- # test a reference to a label that in the referecned selectable;
+ # test a reference to a label that in the referenced selectable;
# this resolves
expr = (table1.c.myid + 5).label("sum")
stmt = select(expr).alias()
c2 = c2.union(select(2))
elif clone_type.annotated:
# this does not seem to trigger the issue that was fixed in
- # #12364 howver is still a worthy test
+ # #12364 however is still a worthy test
c2 = c1._annotate({"foo": "bar"})
if not identical:
c2 = c2.union(select(2))
__dialect__ = "default"
- # fixme: consolidate converage from elsewhere here and expand
+ # fixme: consolidate converge from elsewhere here and expand
@classmethod
def setup_test_class(cls):
if sort_by_parameter_order:
with expect_raises_message(
exc.CompileError,
- "RETURNING cannot be determinstically sorted "
+ "RETURNING cannot be deterministically sorted "
"when using an INSERT",
):
stmt.compile()
@testing.requires.provisioned_upsert
def test_upsert_w_returning(self, connection):
- """test cases that will execise SQL similar to that of
+ """test cases that will exercise SQL similar to that of
test/orm/dml/test_bulk_statements.py
"""
(operators.getitem, OperatorClass.INDEXABLE),
)
def test_not_implemented_operators(self, op, operator_class):
- """test operators that are availble but not implemented by default.
+ """test operators that are available but not implemented by default.
this might be semantically different from the operator not being
present in the operator class though the effect is the same (that is,
# cols w/ no name or type, used by declarative
c1: Column[int] = Column(ForeignKey(t3.c.x))
-# more colum args
+# more column args
Column("name", Integer, index=True)
Column(None, name="name")
Column(Integer, name="name", index=True)
sections for nox tests, which include tags that indicate various combinations
of those parameters in such a way that it's somewhat similar to how
we were using the tox project; where individual dash-separated tags could
-be added to add more specificity to the suite configuation, or omitting them
+be added to add more specificity to the suite configuration, or omitting them
would fall back to defaults.