pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases/py-sqlalchemy



Module Name:    pkgsrc
Committed By:   adam
Date:           Wed Sep  2 15:13:36 UTC 2026

Modified Files:
        pkgsrc/databases/py-sqlalchemy: Makefile distinfo

Log Message:
py-sqlalchemy: updated to 2.0.52

2.0.52

[platform] [bug]

Python 3.15 support has been added and tested, including minimal changes for full compatibility.

orm

[orm] [bug]

Fixed a result-column misalignment bug in ORM-enabled UPDATE statements where synchronize_session="fetch" is in use, either explicitly or because the statement uses constructs such as CTEs that 
implicitly select for it. Columns in rows returned by .returning() could be returned under incorrect keys (e.g. row[SomeClass.a] returning the value of a different column), a problem most likely to 
manifest under concurrent workloads. ORM DELETE statements were not affected.

[orm] [bug]

Fixed bug where a failed Session.bulk_insert_mappings(), Session.bulk_update_mappings() or Session.bulk_save_objects() call could leave the Session permanently in a “flushing” state, such as when the 
transaction could not be begun because a previous flush had left it needing a rollback. Unlike Session.flush(), the bulk methods set the internal flushing flag and began the transaction outside of 
the try/finally block that resets it, so that neither Session.rollback() nor Session.close() would clear it, and every subsequent flush would raise InvalidRequestError: Session is already flushing. 
Pull request courtesy Hamody We.

[orm] [bug]

Fixed issue where unpickling an ORM object that were loaded using loader options making use of wildcard tokens, such as load_only() or raiseload() with "*", would fail with KeyError or IndexError if 
the process doing the unpickling had not yet constructed a loader path making use of that same token. This would typically be observed when the object were unpickled in a separate process, such as 
with the spawn or forkserver multiprocessing start methods, the latter of which became the default on POSIX platforms as of Python 3.14. The internal collection of these tokens is now established up 
front, so that it is identical in every process.

[orm] [bug]

Fixed issue where a string ending in "*" passed to a Load strategy method, such as Load(A).joinedload("bs.*"), would bypass the check which rejects string attribute names in loader options, silently 
producing a loader path that matched nothing. Such a string now raises ArgumentError with the same message given for any other string attribute name. The bare wildcard "*", as in 
Load(A).lazyload("*"), continues to be accepted.

[orm] [bug]

Calling aliased() against a select() or union() / CompoundSelect construct, which previously failed with an obscure AttributeError regarding a missing .mapper attribute, now raises when using 
SQLAlchemy 2.1, and emits a deprecation warning under SQLAlchemy 2.0 as it coerces the construct into a subquery instead. This matches the behavior of other similar implicit SELECT-to-FROM coercions. 
Pull request courtesy Rens Groothuijsen.

orm declarative

[bug] [orm declarative]

Fixed issue where using PEP 593 Annotated wrapping a PEP 695 type alias, such as Annotated[SomeTypeAlias, mapped_column()], would crash with AttributeError: __value__. The internal is_pep695() check 
incorrectly identified the Annotated type as a PEP 695 type alias due to a quirk in Annotated.__origin__ returning the first type argument rather than Annotated itself.

sql

[sql] [bug]

Fixed issue where Select.get_final_froms() would emit a deprecation warning when the statement made use of the PostgreSQL-specific expression argument to Select.distinct(); the same spurious warning 
would be emitted when stringifying such a statement without explicitly using a PostgreSQL dialect. The fix ensures that this 1.4-era warning is suppressed under both 2.0 and 2.1.

Note that under SQLAlchemy 2.1, passing an expression to Select.distinct() is deprecated overall, and is replaced by a new PostgreSQL-specific construct.

[sql] [bug]

Fixed an issue in Numeric where the Numeric.decimal_return_scale parameter was ignored when the DBAPI does not support native decimal objects (i.e. dialect.supports_native_decimal is False). In this 
path the result processor was computing the conversion scale from Numeric.scale directly, bypassing Numeric.decimal_return_scale entirely. The behavior now matches Float, which already used the 
correct _effective_decimal_return_scale property. Pull request courtesy Kadir Can Ozden.

[sql] [bug]

Added auditing to the test suite which exercises the literal execute processors across all datatypes and dialects to ensure that string input is either appropriately rejected or correctly escaped. 
Literal execute processors are invoked when the bindparam.literal_execute parameter is used with an explicit bindparam() object, which overrides DBAPI-native bind handling to render the value inline 
with the statement instead. Datatypes that were updated include the originally reported SQL Server Uuid / UNIQUEIDENTIFIER rendering which now escapes properly, the JSONPATH type that’s currently 
PostgreSQL-only, and a full family of numeric types stemming from the Float and Numeric bases which now coerce the value to a number, rejecting non-numeric input. Thanks to Javid Khan for helping to 
identify the issue.

schema

[schema] [bug]

Fixed an issue where Table.to_metadata() reused column default and on-update objects, causing the defaults on the original columns to refer to the copied columns. Default generators, including 
sequences, and server-side defaults are now copied and remain associated with their respective columns and metadata collections. Applications that inspected these objects will now see distinct 
defaults on the copied table instead of the objects owned by the original table. Pull request courtesy Goutam Adwant.

postgresql

[postgresql] [bug] [reflection]

Fixed reflection of PostgreSQL CHECK constraints where an expression made up of multiple parenthesized sub-expressions, such as (x IS NULL OR y IS NULL) AND (x IS NULL OR y IS NULL), would have its 
leading and trailing parentheses incorrectly stripped, producing an unbalanced and syntactically invalid reflected expression. Pull request courtesy Shaurya Singh.

[postgresql] [bug]

Fixed bug in the PostgreSQL dialect where a single quote in a sequence, table, or schema name, such as one supplied via a schema_translate_map or an explicit Sequence, could result in a malformed 
nextval() statement. The quote is now properly escaped. Pull request courtesy dxbjavid.

sqlite

[sqlite] [bug]

Reworked the regular expression that detects inline UNIQUE column constraints during SQLite CREATE TABLE reflection so that the whitespace separating a column’s type from a following clause is 
matched unambiguously. The previous pattern had three overlapping quantifiers that could each consume a space character, so a column definition carrying a long run of whitespace in the stored schema 
made Inspector.get_unique_constraints() spend cubic time backtracking before returning. Fix courtesy of Javid Khan.

mssql

[mssql] [bug]

Tightened the construction of the ODBC connection string in the pyodbc connector (as well as the mssql-python connector in 2.1) so that the driver name, the names of pass-through connection 
parameters, and values containing } are brace-quoted. Previously a } in the driver name or in a pass-through value, or a ; in the name of a pass-through parameter, could close the surrounding token 
early and allow the remainder of the string to be interpreted as additional connection attributes. Pull request courtesy dxbjavid.

tests

[tests] [bug]

Fixed class-scoped pytest fixtures that were defined as instance methods using self, which is deprecated as of pytest 9.1 and will be removed in pytest 10. Fixtures are now decorated with a 
compatibility @classmethod decorator and use cls as the first parameter.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 pkgsrc/databases/py-sqlalchemy/Makefile
cvs rdiff -u -r1.87 -r1.88 pkgsrc/databases/py-sqlalchemy/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/py-sqlalchemy/Makefile
diff -u pkgsrc/databases/py-sqlalchemy/Makefile:1.101 pkgsrc/databases/py-sqlalchemy/Makefile:1.102
--- pkgsrc/databases/py-sqlalchemy/Makefile:1.101       Mon Jun 29 05:25:20 2026
+++ pkgsrc/databases/py-sqlalchemy/Makefile     Wed Sep  2 15:13:36 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.101 2026/06/29 05:25:20 adam Exp $
+# $NetBSD: Makefile,v 1.102 2026/09/02 15:13:36 adam Exp $
 
-DISTNAME=      sqlalchemy-2.0.51
+DISTNAME=      sqlalchemy-2.0.52
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    databases python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=S/SQLAlchemy/}

Index: pkgsrc/databases/py-sqlalchemy/distinfo
diff -u pkgsrc/databases/py-sqlalchemy/distinfo:1.87 pkgsrc/databases/py-sqlalchemy/distinfo:1.88
--- pkgsrc/databases/py-sqlalchemy/distinfo:1.87        Mon Jun 29 05:25:20 2026
+++ pkgsrc/databases/py-sqlalchemy/distinfo     Wed Sep  2 15:13:36 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.87 2026/06/29 05:25:20 adam Exp $
+$NetBSD: distinfo,v 1.88 2026/09/02 15:13:36 adam Exp $
 
-BLAKE2s (sqlalchemy-2.0.51.tar.gz) = 45df53bab9389e22e6b73d007e4bbe413fbf52a1ca76211809955c84e5a709c7
-SHA512 (sqlalchemy-2.0.51.tar.gz) = af3965c5c43921b8e4330348b7d1a46357fa5d6a9a0acde66b4c3e65aedbd27afabc257cde113d38f3be3f3a91d524230fb17efc5515b826442d4fb4d6b7bc1d
-Size (sqlalchemy-2.0.51.tar.gz) = 9912201 bytes
+BLAKE2s (sqlalchemy-2.0.52.tar.gz) = 8bd6447af1b3c65b2824130674ea87dbe7ec2fa087fe7da56c972f17fa413754
+SHA512 (sqlalchemy-2.0.52.tar.gz) = 9341389b75b684b37f2f1bba8fde882c95c77a68e5ff15b8ab16b163db9c31088a884352999b750fbabadbd723cff093e971035159e77562d5cd843305258fdd
+Size (sqlalchemy-2.0.52.tar.gz) = 9945637 bytes



Home | Main Index | Thread Index | Old Index