From: Mike Bayer Date: Mon, 7 Dec 2020 18:40:48 +0000 (-0500) Subject: fix non-ascii quotes in sqlite on update feature X-Git-Tag: rel_1_4_0b2~117^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44811216adae0596d75a5c9402ed0e3923eaf676;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fix non-ascii quotes in sqlite on update feature Fixed a SQLite source file that had non-ascii characters inside of its docstring without a source encoding, introduced within the "INSERT..ON CONFLICT" feature, which would cause failures under Python 2. Change-Id: Ie789d2ce554d24643a453b60bb11da9b69106c19 --- diff --git a/doc/build/changelog/unreleased_14/source_enc.rst b/doc/build/changelog/unreleased_14/source_enc.rst new file mode 100644 index 0000000000..85ed8d4151 --- /dev/null +++ b/doc/build/changelog/unreleased_14/source_enc.rst @@ -0,0 +1,6 @@ +.. change:: + :tags: bug, general + + Fixed a SQLite source file that had non-ascii characters inside of its + docstring without a source encoding, introduced within the "INSERT..ON + CONFLICT" feature, which would cause failures under Python 2. diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index 7c1bbb18ef..c56c1f0203 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -419,8 +419,8 @@ From version 3.24.0 onwards, SQLite supports "upserts" (update or insert) of rows into a table via the ``ON CONFLICT`` clause of the ``INSERT`` statement. A candidate row will only be inserted if that row does not violate any unique or primary key constraints. In the case of a unique constraint violation, a -secondary action can occur which can be either “DO UPDATE”, indicating that -the data in the target row should be updated, or “DO NOTHING”, which indicates +secondary action can occur which can be either "DO UPDATE", indicating that +the data in the target row should be updated, or "DO NOTHING", which indicates to silently skip this row. Conflicts are determined using columns that are part of existing unique @@ -469,7 +469,7 @@ and :meth:`_sqlite.Insert.on_conflict_do_nothing`: Specifying the Target ^^^^^^^^^^^^^^^^^^^^^ -Both methods supply the “target” of the conflict using column inference: +Both methods supply the "target" of the conflict using column inference: * The :paramref:`_sqlite.Insert.on_conflict_do_update.index_elements` argument specifies a sequence containing string column names, :class:`_schema.Column`