Tue Apr 2 18:11:22 2024 UTC (51d)
py-sqlalchemy: updated to 2.0.29

2.0.29

Released: March 23, 2024
orm

[orm] [usecase]

Added support for the PEP 695 TypeAliasType construct as well as the python 3.12 native type keyword to work with ORM Annotated Declarative form when using these constructs to link to a PEP 593 Annotated container, allowing the resolution of the Annotated to proceed when these constructs are used in a Mapped typing container.

[orm] [bug]

Fixed Declarative issue where typing a relationship using Relationship rather than Mapped would inadvertently pull in the 窶彭ynamic窶� relationship loader strategy for that attribute.

[orm] [bug]

Fixed issue in ORM annotated declarative where using mapped_column() with an mapped_column.index or mapped_column.unique setting of False would be overridden by an incoming Annotated element that featured that parameter set to True, even though the immediate mapped_column() element is more specific and should take precedence. The logic to reconcile the booleans has been enhanced to accommodate a local value of False as still taking precedence over an incoming True value from the annotated element.

[orm] [bug] [regression]

Fixed regression from version 2.0.28 caused by the fix for 11085 where the newer method of adjusting post-cache bound parameter values would interefere with the implementation for the subqueryload() loader option, which has some more legacy patterns in use internally, when the additional loader criteria feature were used with this loader option.

engine

[engine] [bug]

Fixed issue in 窶廬nsert Many Values窶� Behavior for INSERT statements feature where using a primary key column with an 窶彿nline execute窶� default generator such as an explicit Sequence with an explcit schema name, while at the same time using the Connection.execution_options.schema_translate_map feature would fail to render the sequence or the parameters properly, leading to errors.

[engine] [bug]

Made a change to the adjustment made in version 2.0.10 for 9618, which added the behavior of reconciling RETURNING rows from a bulk INSERT to the parameters that were passed to it. This behavior included a comparison of already-DB-converted bound parameter values against returned row values that was not always 窶徭ymmetrical窶� for SQL column types such as UUIDs, depending on specifics of how different DBAPIs receive such values versus how they return them, necessitating the need for additional 窶徭entinel value resolver窶� methods on these column types. Unfortunately this broke third party column types such as UUID/GUID types in libraries like SQLModel which did not implement this special method, raising an error 窶廚an窶冲 match sentinel values in result set to parameter sets窶�. Rather than attempt to further explain and document this implementation detail of the 窶彿nsertmanyvalues窶� feature including a public version of the new method, the approach is intead 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 that a custom SQL column type that also happens to be used in a 窶徭entinel窶� column for bulk INSERT is not receiving and returning the same value type, the 窶廚an窶冲 match窶� error will be raised, however the mitigation is straightforward in that the same Python datatype should be passed as that returned.

sql

[sql] [bug] [regression]

Fixed regression from the 1.4 series where the refactor of the TypeEngine.with_variant() method introduced at 窶忤ith_variant()窶� clones the original TypeEngine rather than changing the type failed to accommodate for the .copy() method, which will lose the variant mappings that are set up. This becomes an issue for the very specific case of a 窶徭chema窶� type, which includes types such as Enum and ARRAY, when they are then used in the context of an ORM Declarative mapping with mixins where copying of types comes into play. The variant mapping is now copied as well.

typing

[typing] [bug]

Fixed typing issue allowing asyncio run_sync() methods to correctly type the parameters according to the callable that was passed, making use of PEP 612 ParamSpec variables. Pull request courtesy Francisco R. Del Roio.

postgresql

[postgresql] [usecase]

The PostgreSQL dialect now returns DOMAIN instances when reflecting a column that has a domain as type. Previously, the domain data type was returned instead. As part of this change, the domain reflection was improved to also return the collation of the text types. Pull request courtesy of Thomas Stephenson.

tests

[tests] [bug]

Backported to SQLAlchemy 2.0 an improvement to the test suite with regards to how asyncio related tests are run, now using the newer Python 3.11 asyncio.Runner or a backported equivalent, rather than relying on the previous implementation based on asyncio.get_running_loop(). This should hopefully prevent issues with large suite runs on CPU loaded hardware where the event loop seems to become corrupted, leading to cascading failures.


(adam)
diff -r1.74 -r1.75 pkgsrc/databases/py-sqlalchemy/Makefile
diff -r1.65 -r1.66 pkgsrc/databases/py-sqlalchemy/distinfo

cvs diff -r1.74 -r1.75 pkgsrc/databases/py-sqlalchemy/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/py-sqlalchemy/Makefile 2024/03/31 19:19:12 1.74
+++ pkgsrc/databases/py-sqlalchemy/Makefile 2024/04/02 18:11:22 1.75
@@ -1,26 +1,26 @@ @@ -1,26 +1,26 @@
1# $NetBSD: Makefile,v 1.74 2024/03/31 19:19:12 adam Exp $ 1# $NetBSD: Makefile,v 1.75 2024/04/02 18:11:22 adam Exp $
2 2
3DISTNAME= SQLAlchemy-2.0.28 3DISTNAME= SQLAlchemy-2.0.29
4PKGREVISION= 1 
5PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl}
6CATEGORIES= databases python 5CATEGORIES= databases python
7MASTER_SITES= ${MASTER_SITE_PYPI:=S/SQLAlchemy/} 6MASTER_SITES= ${MASTER_SITE_PYPI:=S/SQLAlchemy/}
8 7
9MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.sqlalchemy.org/ 9HOMEPAGE= https://www.sqlalchemy.org/
11COMMENT= Python SQL toolkit and Object Relational Mapper 10COMMENT= Python SQL toolkit and Object Relational Mapper
12LICENSE= mit 11LICENSE= mit
13 12
14TOOL_DEPENDS+= ${PYPKGPREFIX}-cython>=0.29.24:../../devel/py-cython 13TOOL_DEPENDS+= ${PYPKGPREFIX}-cython>=0.29.24:../../devel/py-cython
15TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=47:../../devel/py-setuptools 14TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=47:../../devel/py-setuptools
16TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel>=0:../../devel/py-wheel 15TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel>=0:../../devel/py-wheel
17DEPENDS+= ${PYPKGPREFIX}-greenlet>=0.4.18:../../devel/py-greenlet 16DEPENDS+= ${PYPKGPREFIX}-greenlet>=0.4.18:../../devel/py-greenlet
18DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.6.0:../../devel/py-typing-extensions 17DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.6.0:../../devel/py-typing-extensions
 18TEST_DEPENDS+= ${PYPKGPREFIX}-test-xdist>=0:../../devel/py-test-xdist
19 19
20PYTHON_VERSIONS_INCOMPATIBLE= 27 20PYTHON_VERSIONS_INCOMPATIBLE= 27
21 21
22# test status as of 2.0.28 22# test status as of 2.0.28
23# 2 failed, 20790 passed, 10754 skipped, 107 errors 23# 2 failed, 20790 passed, 10754 skipped, 107 errors
24 24
25.include "../../lang/python/wheel.mk" 25.include "../../lang/python/wheel.mk"
26.include "../../mk/bsd.pkg.mk" 26.include "../../mk/bsd.pkg.mk"

cvs diff -r1.65 -r1.66 pkgsrc/databases/py-sqlalchemy/distinfo (expand / switch to unified diff)

--- pkgsrc/databases/py-sqlalchemy/distinfo 2024/03/06 21:40:57 1.65
+++ pkgsrc/databases/py-sqlalchemy/distinfo 2024/04/02 18:11:22 1.66
@@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
1$NetBSD: distinfo,v 1.65 2024/03/06 21:40:57 wiz Exp $ 1$NetBSD: distinfo,v 1.66 2024/04/02 18:11:22 adam Exp $
2 2
3BLAKE2s (SQLAlchemy-2.0.28.tar.gz) = a9b6a96e80ad4c1ebd19ad2164169fb5ac0ef2acc06295cfe31ee186fe8b846d 3BLAKE2s (SQLAlchemy-2.0.29.tar.gz) = caeb9d7edc75ae1d90449fa9401e28931d9a319ee658bfda7ec3bc7b135443c7
4SHA512 (SQLAlchemy-2.0.28.tar.gz) = 83745aaf2d0b469dbbb28960eef4a1e23fb8fe8a2f4b8cb055cc06c5bd4ccb2f365a2b55c7ca76be2d809d4127e16ace06f4e50f59f63d946e3225375499f4f0 4SHA512 (SQLAlchemy-2.0.29.tar.gz) = d1143c65fb26335d652083b9a90afaecf78ed312cea5c26f989380204e909c341c1bc3bb1e07274353e1c409d21737fad4d7391f186b2d2373814582d3baaf78
5Size (SQLAlchemy-2.0.28.tar.gz) = 9531010 bytes 5Size (SQLAlchemy-2.0.29.tar.gz) = 9543967 bytes