From fd9aa847920b9e4dff61ef7a5555c9fa6e362484 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Tue, 7 Mar 2023 00:25:59 +0100 Subject: Fix regression when deserializing python rows into cython Fixed regression involving pickling of Python rows between the cython and pure Python implementations of :class:`.Row`, which occurred as part of refactoring code for version 2.0 with typing. A particular constant were turned into a string based ``Enum`` for the pure Python version of :class:`.Row` whereas the cython version continued to use an integer constant, leading to deserialization failures. Regression occurred in a4bb502cf95ea3523e4d383c4377e50f402d7d52 Fixes: #9423 Change-Id: Icbd85cacb2d589cef7c246de7064249926146f2e --- lib/sqlalchemy/testing/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/testing') diff --git a/lib/sqlalchemy/testing/util.py b/lib/sqlalchemy/testing/util.py index 153ce4d0a..d061f26a2 100644 --- a/lib/sqlalchemy/testing/util.py +++ b/lib/sqlalchemy/testing/util.py @@ -59,7 +59,7 @@ def picklers(): # yes, this thing needs this much testing for pickle_ in picklers: - for protocol in range(-2, pickle.HIGHEST_PROTOCOL): + for protocol in range(-2, pickle.HIGHEST_PROTOCOL + 1): yield pickle_.loads, lambda d: pickle_.dumps(d, protocol) -- cgit v1.2.1