From 104e6907284e602a8485f32fc67fd6af0c00e4d0 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 8 Aug 2019 23:34:20 -0400 Subject: Correct name for json_serializer / json_deserializer, document and test The dialects that support json are supposed to take arguments ``json_serializer`` and ``json_deserializer`` at the create_engine() level, however the SQLite dialect calls them ``_json_serilizer`` and ``_json_deserilalizer``. The names have been corrected, the old names are accepted with a change warning, and these parameters are now documented as :paramref:`.create_engine.json_serializer` and :paramref:`.create_engine.json_deserializer`. Fixes: #4798 Change-Id: I1dbfe439b421fe9bb7ff3594ef455af8156f8851 --- lib/sqlalchemy/engine/create.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/sqlalchemy/engine/create.py') diff --git a/lib/sqlalchemy/engine/create.py b/lib/sqlalchemy/engine/create.py index 035953e99..cc8304131 100644 --- a/lib/sqlalchemy/engine/create.py +++ b/lib/sqlalchemy/engine/create.py @@ -234,6 +234,22 @@ def create_engine(url, **kwargs): :ref:`session_transaction_isolation` - for the ORM + :param json_deserializer: for dialects that support the :class:`.JSON` + datatype, this is a Python callable that will convert a JSON string + to a Python object. By default, the Python ``json.loads`` function is + used. + + .. versionchanged:: 1.3.7 The SQLite dialect renamed this from + ``_json_deserializer``. + + :param json_serializer: for dialects that support the :class:`.JSON` + datatype, this is a Python callable that will render a given object + as JSON. By default, the Python ``json.dumps`` function is used. + + .. versionchanged:: 1.3.7 The SQLite dialect renamed this from + ``_json_serializer``. + + :param label_length=None: optional integer value which limits the size of dynamically generated column labels to that many characters. If less than 6, labels are generated as -- cgit v1.2.1