]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
The parameter `as_uuid` of `UUID` now defaults to `True`.
authorFederico Caselli <cfederico87@gmail.com>
Wed, 19 Jan 2022 21:29:03 +0000 (22:29 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 19 Jan 2022 21:29:20 +0000 (22:29 +0100)
Fixes: #7225
Change-Id: Iddb78bf47ac733300bd12db50e16199cc22e9476

doc/build/changelog/unreleased_20/7225.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/engine/interfaces.py

diff --git a/doc/build/changelog/unreleased_20/7225.rst b/doc/build/changelog/unreleased_20/7225.rst
new file mode 100644 (file)
index 0000000..c77a0c2
--- /dev/null
@@ -0,0 +1,6 @@
+.. change::
+    :tags: postgresql, change
+    :tickets: 7225
+
+    The parameter :paramref:`_postgresql.UUID.as_uuid` of
+    :class:`_postgresql.UUID` now defaults to ``True``.
index 4f3e297ef557d47431b3fe274c6370b26ba08ecd..e4ebbcb8070a21ead77d24dcc4f4fe07ce31260d 100644 (file)
@@ -1707,14 +1707,16 @@ class UUID(sqltypes.TypeEngine):
 
     __visit_name__ = "UUID"
 
-    def __init__(self, as_uuid=False):
+    def __init__(self, as_uuid=True):
         """Construct a UUID type.
 
 
-        :param as_uuid=False: if True, values will be interpreted
+        :param as_uuid=True: if True, values will be interpreted
          as Python uuid objects, converting to/from string via the
          DBAPI.
 
+         .. versionchanged: 2 ``as_uuid`` now defaults to ``True``.
+
         """
         self.as_uuid = as_uuid
 
index 80c848379cf23a999ed77c58d268e1e37c1549e1..9b6bca5114d42a91d706145a4a866231e74db561 100644 (file)
@@ -650,7 +650,7 @@ class Dialect:
 
     See :class:`.BindTyping` for values.
 
-    ..versionadded:: 2.0
+    .. versionadded:: 2.0
 
     """