pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases/py-sqlalchemy py-sqlalchemy: updated to 1.3.16
details: https://anonhg.NetBSD.org/pkgsrc/rev/edb12ed1a386
branches: trunk
changeset: 427004:edb12ed1a386
user: adam <adam%pkgsrc.org@localhost>
date: Fri Apr 10 07:58:16 2020 +0000
description:
py-sqlalchemy: updated to 1.3.16
1.3.16
orm
[orm] [bug]
Fixed bug in orm.selectinload() loading option where two or more loaders that represent different relationships with the same string key name as referenced from a single orm.with_polymorphic()
construct with multiple subclass mappers would fail to invoke each subqueryload separately, instead making use of a single string-based slot that would prevent the other loaders from being invoked.
[orm] [bug]
Fixed issue where a lazyload that uses session-local ?get? against a target many-to-one relationship where an object with the correct primary key is present, however it?s an instance of a sibling
class, does not correctly return None as is the case when the lazy loader actually emits a load for that row.
[orm] [performance]
Modified the queries used by subqueryload and selectinload to no longer ORDER BY the primary key of the parent entity; this ordering was there to allow the rows as they come in to be copied into
lists directly with a minimal level of Python-side collation. However, these ORDER BY clauses can negatively impact the performance of the query as in many scenarios these columns are derived from a
subquery or are otherwise not actual primary key columns such that SQL planners cannot make use of indexes. The Python-side collation uses the native itertools.group_by() to collate the incoming
rows, and has been modified to allow multiple row-groups-per-parent to be assembled together using list.extend(), which should still allow for relatively fast Python-side performance. There will
still be an ORDER BY present for a relationship that includes an explicit order_by parameter, however this is the only ORDER BY that will be added to the query for both kinds of loading.
orm declarative
[bug] [declarative] [orm]
The string argument accepted as the first positional argument by the relationship() function when using the Declarative API is no longer interpreted using the Python eval() function; instead, the
name is dot separated and the names are looked up directly in the name resolution dictionary without treating the value as a Python expression. However, passing a string argument to the other
relationship() parameters that necessarily must accept Python expressions will still use eval(); the documentation has been clarified to ensure that there is no ambiguity that this is in use.
See also
Evaluation of relationship arguments - details on string evaluation
sql
[sql] [types]
Add ability to literal compile a DateTime, Date or :class:?Time? when using the string dialect for debugging purposes. This change does not impact real dialect implementation that retain their
current behavior.
schema
[schema] [reflection]
Added support for reflection of ?computed? columns, which are now returned as part of the structure returned by Inspector.get_columns(). When reflecting full Table objects, computed columns will be
represented using the Computed construct.
postgresql
[postgresql] [bug]
Fixed issue where a ?covering? index, e.g. those which have an INCLUDE clause, would be reflected including all the columns in INCLUDE clause as regular columns. A warning is now emitted if these
additional columns are detected indicating that they are currently ignored. Note that full support for ?covering? indexes is part of 4458. Pull request courtesy Marat Sharafutdinov.
mysql
[mysql] [bug]
Fixed issue in MySQL dialect when connecting to a psuedo-MySQL database such as that provided by ProxySQL, the up front check for isolation level when it returns no row will not prevent the dialect
from continuing to connect. A warning is emitted that the isolation level could not be detected.
sqlite
[sqlite] [usecase]
Implemented AUTOCOMMIT isolation level for SQLite when using pysqlite.
mssql
[mssql] [usecase] [mysql] [oracle]
Added support for ColumnOperators.is_distinct_from() and ColumnOperators.isnot_distinct_from() to SQL Server, MySQL, and Oracle.
oracle
[oracle] [usecase]
Implemented AUTOCOMMIT isolation level for Oracle when using cx_Oracle. Also added a fixed default isolation level of READ COMMITTED for Oracle.
[oracle] [bug] [reflection]
Fixed regression / incorrect fix caused by fix for 5146 where the Oracle dialect reads from the ?all_tab_comments? view to get table comments but fails to accommodate for the current owner of the
table being requested, causing it to read the wrong comment if multiple tables of the same name exist in multiple schemas.
misc
[bug] [tests]
Fixed an issue that prevented the test suite from running with the recently released py.test 5.4.0.
[enum] [types]
The Enum type now supports the parameter Enum.length to specify the length of the VARCHAR column to create when using non native enums by setting Enum.native_enum to False
[installer]
Ensured that the ?pyproject.toml? file is not included in builds, as the presence of this file indicates to pip that a pep-517 installation process should be used. As this mode of operation appears
to be not well supported by current tools / distros, these problems are avoided within the scope of SQLAlchemy installation by omitting the file.
1.3.15
orm
[orm] [bug]
Adjusted the error message emitted by Query.join() when a left hand side can?t be located that the Query.select_from() method is the best way to resolve the issue. Also, within the 1.3 series, used a
deterministic ordering when determining the FROM clause from a given column entity passed to Query so that the same expression is determined each time.
[orm] [bug]
Fixed regression in 1.3.14 due to 4849 where a sys.exc_info() call failed to be invoked correctly when a flush error would occur. Test coverage has been added for this exception case.
1.3.14
general
[general] [bug] [py3k]
Applied an explicit ?cause? to most if not all internally raised exceptions that are raised from within an internal exception catch, to avoid misleading stacktraces that suggest an error within the
handling of an exception. While it would be preferable to suppress the internally caught exception in the way that the __suppress_context__ attribute would, there does not as yet seem to be a way to
do this without suppressing an enclosing user constructed context, so for now it exposes the internally caught exception as the cause so that full information about the context of the error is
maintained.
orm
[orm] [usecase]
Added a new flag InstanceEvents.restore_load_context and SessionEvents.restore_load_context which apply to the InstanceEvents.load(), InstanceEvents.refresh(), and
SessionEvents.loaded_as_persistent() events, which when set will restore the ?load context? of the object after the event hook has been called. This ensures that the object remains within the ?loader
context? of the load operation that is already ongoing, rather than the object being transferred to a new load context due to refresh operations which may have occurred in the event. A warning is now
emitted when this condition occurs, which recommends use of the flag to resolve this case. The flag is ?opt-in? so that there is no risk introduced to existing applications.
The change additionally adds support for the raw=True flag to session lifecycle events.
[orm] [bug]
Fixed regression caused in 1.3.13 by 5056 where a refactor of the ORM path registry system made it such that a path could no longer be compared to an empty tuple, which can occur in a particular kind
of joined eager loading path. The ?empty tuple? use case has been resolved so that the path registry is compared to a path registry in all cases; the PathRegistry object itself now implements
__eq__() and __ne__() methods which will take place for all equality comparisons and continue to succeed in the not anticipated case that a non- PathRegistry object is compared, while emitting a
warning that this object should not be the subject of the comparison.
[orm] [bug]
Setting a relationship to viewonly=True which is also the target of a back_populates or backref configuration will now emit a warning and eventually be disallowed. back_populates refers specifically
to mutation of an attribute or collection, which is disallowed when the attribute is subject to viewonly=True. The viewonly attribute is not subject to persistence behaviors which means it will not
reflect correct results when it is locally mutated.
[orm] [bug]
Fixed an additional regression in the same area as that of 5080 introduced in 1.3.0b3 via 4468 where the ability to create a joined option across a with_polymorphic() into a relationship against the
base class of that with_polymorphic, and then further into regular mapped relationships would fail as the base class component would not add itself to the load path in a way that could be located by
the loader strategy. The changes applied in 5080 have been further refined to also accommodate this scenario.
engine
[engine] [bug]
Expanded the scope of cursor/connection cleanup when a statement is executed to include when the result object fails to be constructed, or an after_cursor_execute() event raises an error, or
autocommit / autoclose fails. This allows the DBAPI cursor to be cleaned up on failure and for connectionless execution allows the connection to be closed out and returned to the connection pool,
where previously it waiting until garbage collection would trigger a pool return.
sql
[sql] [bug] [postgresql]
Fixed bug where a CTE of an INSERT/UPDATE/DELETE that also uses RETURNING could then not be SELECTed from directly, as the internal state of the compiler would try to treat the outer SELECT as a
DELETE statement itself and access nonexistent state.
postgresql
[postgresql] [bug]
Fixed issue where the ?schema_translate_map? feature would not work with a PostgreSQL native enumeration type (i.e. Enum, postgresql.ENUM) in that while the ?CREATE TYPE? statement would be emitted
with the correct schema, the schema would not be rendered in the CREATE TABLE statement at the point at which the enumeration was referenced.
[postgresql] [bug] [reflection]
Fixed bug where PostgreSQL reflection of CHECK constraints would fail to parse the constraint if the SQL text contained newline characters. The regular expression has been adjusted to accommodate for
this case. Pull request courtesy Eric Borczuk.
mysql
[mysql] [bug]
Fixed issue in MySQL mysql.Insert.on_duplicate_key_update() construct where using a SQL function or other composed expression for a column argument would not properly render the VALUES keyword
surrounding the column itself.
mssql
[mssql] [bug]
Fixed issue where the mssql.DATETIMEOFFSET type would not accommodate for the None value, introduced as part of the series of fixes for this type first introduced in 4983, 5045. Additionally, added
support for passing a backend-specific date formatted string through this type, as is typically allowed for date/time types on most other DBAPIs.
oracle
[oracle] [bug]
Fixed a reflection bug where table comments could only be retrieved for tables actually owned by the user but not for tables visible to the user but owned by someone else. Pull request courtesy Dave
Hirschfeld.
misc
[usecase] [ext]
Added keyword arguments to the MutableList.sort() function so that a key function as well as the ?reverse? keyword argument can be provided.
[bug] [performance]
Revised an internal change to the test system added as a result of 5085 where a testing-related module per dialect would be loaded unconditionally upon making use of that dialect, pulling in
SQLAlchemy?s testing framework as well as the ORM into the module import space. This would only impact initial startup time and memory to a modest extent, however it?s best that these additional
modules aren?t reverse-dependent on straight Core usage.
[bug] [installation]
Vendored the inspect.formatannotation function inside of sqlalchemy.util.compat, which is needed for the vendored version of inspect.formatargspec. The function is not documented in cPython and is
not guaranteed to be available in future Python versions.
diffstat:
databases/py-sqlalchemy/Makefile | 4 ++--
databases/py-sqlalchemy/PLIST | 17 ++++++++++++++++-
databases/py-sqlalchemy/distinfo | 10 +++++-----
3 files changed, 23 insertions(+), 8 deletions(-)
diffs (86 lines):
diff -r 1d8776b8ff46 -r edb12ed1a386 databases/py-sqlalchemy/Makefile
--- a/databases/py-sqlalchemy/Makefile Fri Apr 10 07:30:21 2020 +0000
+++ b/databases/py-sqlalchemy/Makefile Fri Apr 10 07:58:16 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.60 2020/03/22 22:45:24 rillig Exp $
+# $NetBSD: Makefile,v 1.61 2020/04/10 07:58:16 adam Exp $
-DISTNAME= SQLAlchemy-1.3.13
+DISTNAME= SQLAlchemy-1.3.16
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl}
CATEGORIES= databases python
MASTER_SITES= ${MASTER_SITE_PYPI:=S/SQLAlchemy/}
diff -r 1d8776b8ff46 -r edb12ed1a386 databases/py-sqlalchemy/PLIST
--- a/databases/py-sqlalchemy/PLIST Fri Apr 10 07:30:21 2020 +0000
+++ b/databases/py-sqlalchemy/PLIST Fri Apr 10 07:58:16 2020 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.18 2019/04/02 08:59:13 adam Exp $
+@comment $NetBSD: PLIST,v 1.19 2020/04/10 07:58:16 adam Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -55,6 +55,9 @@
${PYSITELIB}/sqlalchemy/dialects/mssql/mxodbc.py
${PYSITELIB}/sqlalchemy/dialects/mssql/mxodbc.pyc
${PYSITELIB}/sqlalchemy/dialects/mssql/mxodbc.pyo
+${PYSITELIB}/sqlalchemy/dialects/mssql/provision.py
+${PYSITELIB}/sqlalchemy/dialects/mssql/provision.pyc
+${PYSITELIB}/sqlalchemy/dialects/mssql/provision.pyo
${PYSITELIB}/sqlalchemy/dialects/mssql/pymssql.py
${PYSITELIB}/sqlalchemy/dialects/mssql/pymssql.pyc
${PYSITELIB}/sqlalchemy/dialects/mssql/pymssql.pyo
@@ -94,6 +97,9 @@
${PYSITELIB}/sqlalchemy/dialects/mysql/oursql.py
${PYSITELIB}/sqlalchemy/dialects/mysql/oursql.pyc
${PYSITELIB}/sqlalchemy/dialects/mysql/oursql.pyo
+${PYSITELIB}/sqlalchemy/dialects/mysql/provision.py
+${PYSITELIB}/sqlalchemy/dialects/mysql/provision.pyc
+${PYSITELIB}/sqlalchemy/dialects/mysql/provision.pyo
${PYSITELIB}/sqlalchemy/dialects/mysql/pymysql.py
${PYSITELIB}/sqlalchemy/dialects/mysql/pymysql.pyc
${PYSITELIB}/sqlalchemy/dialects/mysql/pymysql.pyo
@@ -118,6 +124,9 @@
${PYSITELIB}/sqlalchemy/dialects/oracle/cx_oracle.py
${PYSITELIB}/sqlalchemy/dialects/oracle/cx_oracle.pyc
${PYSITELIB}/sqlalchemy/dialects/oracle/cx_oracle.pyo
+${PYSITELIB}/sqlalchemy/dialects/oracle/provision.py
+${PYSITELIB}/sqlalchemy/dialects/oracle/provision.pyc
+${PYSITELIB}/sqlalchemy/dialects/oracle/provision.pyo
${PYSITELIB}/sqlalchemy/dialects/oracle/zxjdbc.py
${PYSITELIB}/sqlalchemy/dialects/oracle/zxjdbc.pyc
${PYSITELIB}/sqlalchemy/dialects/oracle/zxjdbc.pyo
@@ -145,6 +154,9 @@
${PYSITELIB}/sqlalchemy/dialects/postgresql/pg8000.py
${PYSITELIB}/sqlalchemy/dialects/postgresql/pg8000.pyc
${PYSITELIB}/sqlalchemy/dialects/postgresql/pg8000.pyo
+${PYSITELIB}/sqlalchemy/dialects/postgresql/provision.py
+${PYSITELIB}/sqlalchemy/dialects/postgresql/provision.pyc
+${PYSITELIB}/sqlalchemy/dialects/postgresql/provision.pyo
${PYSITELIB}/sqlalchemy/dialects/postgresql/psycopg2.py
${PYSITELIB}/sqlalchemy/dialects/postgresql/psycopg2.pyc
${PYSITELIB}/sqlalchemy/dialects/postgresql/psycopg2.pyo
@@ -172,6 +184,9 @@
${PYSITELIB}/sqlalchemy/dialects/sqlite/json.py
${PYSITELIB}/sqlalchemy/dialects/sqlite/json.pyc
${PYSITELIB}/sqlalchemy/dialects/sqlite/json.pyo
+${PYSITELIB}/sqlalchemy/dialects/sqlite/provision.py
+${PYSITELIB}/sqlalchemy/dialects/sqlite/provision.pyc
+${PYSITELIB}/sqlalchemy/dialects/sqlite/provision.pyo
${PYSITELIB}/sqlalchemy/dialects/sqlite/pysqlcipher.py
${PYSITELIB}/sqlalchemy/dialects/sqlite/pysqlcipher.pyc
${PYSITELIB}/sqlalchemy/dialects/sqlite/pysqlcipher.pyo
diff -r 1d8776b8ff46 -r edb12ed1a386 databases/py-sqlalchemy/distinfo
--- a/databases/py-sqlalchemy/distinfo Fri Apr 10 07:30:21 2020 +0000
+++ b/databases/py-sqlalchemy/distinfo Fri Apr 10 07:58:16 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.54 2020/02/04 16:57:20 adam Exp $
+$NetBSD: distinfo,v 1.55 2020/04/10 07:58:16 adam Exp $
-SHA1 (SQLAlchemy-1.3.13.tar.gz) = 320ef8780bc92443bcf5dedf7609174865bbe66d
-RMD160 (SQLAlchemy-1.3.13.tar.gz) = 7fbe8fc6213598cf67372f2ce7c578ca81247a04
-SHA512 (SQLAlchemy-1.3.13.tar.gz) = 43ed4fe3505dab775996dc4b01ea729069dee3969f72188f130a942212252d97acb721e51e1a974a2756fdd62b8bf2c626a33f6913d585f669154212da3b783a
-Size (SQLAlchemy-1.3.13.tar.gz) = 6040899 bytes
+SHA1 (SQLAlchemy-1.3.16.tar.gz) = 2a886143146748467dc72748b59ee42471333a6e
+RMD160 (SQLAlchemy-1.3.16.tar.gz) = d3eacea42bfcc89a2d758b9c6ffe6b7691760584
+SHA512 (SQLAlchemy-1.3.16.tar.gz) = 8eae306fc21f22da7411badd678f31129ecac18f9a4d8526101ecd0fa8c77e30a4b7a8e4361fff3fc08b031d90cd82343321c1ea9175ad187fe28a25ad9ea6d8
+Size (SQLAlchemy-1.3.16.tar.gz) = 6085722 bytes
Home |
Main Index |
Thread Index |
Old Index