rel_2_0_0
版本发布时间: 2023-01-27 06:58:12
sqlalchemy/sqlalchemy最新发布版本:rel_2_0_29(2024-03-24 05:53:32)
2.0.0
Released: January 26, 2023
orm
-
[orm] [bug] Improved the notification of warnings that are emitted within the configure mappers or flush process, which are often invoked as part of a different operation, to add additional context to the message that indicates one of these operations as the source of the warning within operations that may not be obviously related.
References: #7305
orm extensions
-
[feature] [orm extensions] Added new option to horizontal sharding API
_horizontal.set_shard_id
which sets the effective shard identifier to query against, for both the primary query as well as for all secondary loaders including relationship eager loaders as well as relationship and column lazy loaders.References: #7226
-
[usecase] [orm extensions] Added new feature to
AutomapBase
for autoload of classes across multiple schemas which may have overlapping names, by providing aAutomapBase.prepare.modulename_for_table
parameter which allows customization of the__module__
attribute of newly generated classes, as well as a new collectionAutomapBase.by_module
, which stores a dot-separated namespace of module names linked to classes based on the__module__
attribute.Additionally, the
AutomapBase.prepare()
method may now be invoked any number of times, with or without reflection enabled; only newly added tables that were not previously mapped will be processed on each call. Previously, theMetaData.reflect()
method would need to be called explicitly each time.References: #5145
sql
-
[sql] [bug] Fixed stringify for a the
CreateSchema
DDL construct, which would fail with anAttributeError
when stringified without a dialect.This change is also backported to: 1.4.47
References: #7664
typing
-
[typing] [bug] Added typing for the built-in generic functions that are available from the :data:
_sql.func
namespace, which accept a particular set of arguments and return a particular type, such as for_sql.count
,_sql.current_timestamp
, etc.Unknown interpreted text role "data".
References: #9129
-
[typing] [bug] Corrected the type passed for "lambda statements" so that a plain lambda is accepted by mypy, pyright, others without any errors about argument types. Additionally implemented typing for more of the public API for lambda statements and ensured
StatementLambdaElement
is part of theExecutable
hierarchy so it's typed as accepted by_engine.Connection.execute()
.References: #9120
-
[typing] [bug] The
_sql.ColumnOperators.in_()
and_sql.ColumnOperators.not_in()
methods are typed to includeIterable[Any]
rather thanSequence[Any]
for more flexibility in argument type.References: #9122
-
[typing] [bug] The
_sql.or_()
and_sql.and_()
from a typing perspective require the first argument to be present, however these functions still accept zero arguments which will emit a deprecation warning at runtime. Typing is also added to support sending the fixed literalFalse
for_sql.or_()
andTrue
for_sql.and_()
as the first argument only, however the documentation now indicates sending the_sql.false()
and_sql.true()
constructs in these cases as a more explicit approach.References: #9123
-
[typing] [bug] Fixed typing issue where iterating over a
_orm.Query
object was not correctly typed.References: #9125
-
[typing] [bug] Fixed typing issue where the object type when using
_engine.Result
as a context manager were not preserved, indicating_engine.Result
in all cases rather than the specific_engine.Result
sub-type. Pull request courtesy Martin Baláž.References: #9136
-
[typing] [bug] Fixed issue where using the
_orm.relationship.remote_side
and similar parameters, passing an annotated declarative object typed as_orm.Mapped
, would not be accepted by the type checker.References: #9150
-
[typing] [bug] Added typing to legacy operators such as
isnot()
,notin_()
, etc. which previously were referencing the newer operators but were not themselves typed.References: #9148
mssql
-
[mssql] [bug] Fixed bug where a schema name given with brackets, but no dots inside the name, for parameters such as
_schema.Table.schema
would not be interpreted within the context of the SQL Server dialect's documented behavior of interpreting explicit brackets as token delimiters, first added in 1.2 for #2626, when referring to the schema name in reflection operations. The original assumption for #2626's behavior was that the special interpretation of brackets was only significant if dots were present, however in practice, the brackets are not included as part of the identifier name for all SQL rendering operations since these are not valid characters within regular or delimited identifiers. Pull request courtesy Shan.This change is also backported to: 1.4.47
References: #9133
-
[mssql] [bug] Fixed bug where a schema name given with brackets, but no dots inside the name, for parameters such as
_schema.Table.schema
would not be interpreted within the context of the SQL Server dialect's documented behavior of interpreting explicit brackets as token delimiters, first added in 1.2 for #2626, when referring to the schema name in reflection operations. The original assumption for #2626's behavior was that the special interpretation of brackets was only significant if dots were present, however in practice, the brackets are not included as part of the identifier name for all SQL rendering operations since these are not valid characters within regular or delimited identifiers. Pull request courtesy Shan.This change is also backported to: 1.4.47
References: #9133
-
[mssql] [bug] [regression] The newly added comment reflection and rendering capability of the MSSQL dialect, added in #7844, will now be disabled by default if it cannot be determined that an unsupported backend such as Azure Synapse may be in use; this backend does not support table and column comments and does not support the SQL Server routines in use to generate them as well as to reflect them. A new parameter
supports_comments
is added to the dialect which defaults toNone
, indicating that comment support should be auto-detected. When set toTrue
orFalse
, the comment support is either enabled or disabled unconditionally.References: #9142
oracle
-
[oracle] [bug] Added
_oracle.ROWID
to reflected types as this type may be used in a "CREATE TABLE" statement.This change is also backported to: 1.4.47
References: #5047
1、 SQLAlchemy-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl 1.86MB
2、 SQLAlchemy-2.0.0-cp310-cp310-macosx_11_0_arm64.whl 1.85MB
3、 SQLAlchemy-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 2.58MB
4、 SQLAlchemy-2.0.0-cp310-cp310-musllinux_1_1_x86_64.whl 2.6MB
5、 SQLAlchemy-2.0.0-cp310-cp310-win32.whl 1.84MB
6、 SQLAlchemy-2.0.0-cp310-cp310-win_amd64.whl 1.85MB
7、 SQLAlchemy-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl 1.86MB
8、 SQLAlchemy-2.0.0-cp311-cp311-macosx_11_0_arm64.whl 1.85MB
9、 SQLAlchemy-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 2.63MB
10、 SQLAlchemy-2.0.0-cp311-cp311-musllinux_1_1_x86_64.whl 2.63MB
11、 SQLAlchemy-2.0.0-cp311-cp311-win32.whl 1.84MB
12、 SQLAlchemy-2.0.0-cp311-cp311-win_amd64.whl 1.85MB
13、 SQLAlchemy-2.0.0-cp37-cp37m-macosx_10_9_x86_64.whl 1.86MB
14、 SQLAlchemy-2.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 2.54MB
15、 SQLAlchemy-2.0.0-cp37-cp37m-musllinux_1_1_x86_64.whl 2.55MB
16、 SQLAlchemy-2.0.0-cp37-cp37m-win32.whl 1.84MB
17、 SQLAlchemy-2.0.0-cp37-cp37m-win_amd64.whl 1.86MB
18、 SQLAlchemy-2.0.0-cp38-cp38-macosx_10_9_x86_64.whl 1.86MB
19、 SQLAlchemy-2.0.0-cp38-cp38-macosx_11_0_arm64.whl 1.85MB
20、 SQLAlchemy-2.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 2.64MB
21、 SQLAlchemy-2.0.0-cp38-cp38-musllinux_1_1_x86_64.whl 2.68MB
22、 SQLAlchemy-2.0.0-cp38-cp38-win32.whl 1.84MB
23、 SQLAlchemy-2.0.0-cp38-cp38-win_amd64.whl 1.86MB
24、 SQLAlchemy-2.0.0-cp39-cp39-macosx_10_9_x86_64.whl 1.86MB
25、 SQLAlchemy-2.0.0-cp39-cp39-macosx_11_0_arm64.whl 1.85MB
26、 SQLAlchemy-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 2.62MB
27、 SQLAlchemy-2.0.0-cp39-cp39-musllinux_1_1_x86_64.whl 2.64MB
28、 SQLAlchemy-2.0.0-cp39-cp39-win32.whl 1.84MB
29、 SQLAlchemy-2.0.0-cp39-cp39-win_amd64.whl 1.86MB
30、 SQLAlchemy-2.0.0-py3-none-any.whl 1.71MB