diff options
author | Federico Caselli <cfederico87@gmail.com> | 2022-01-19 22:29:03 +0100 |
---|---|---|
committer | Federico Caselli <cfederico87@gmail.com> | 2022-01-19 22:29:20 +0100 |
commit | becab8588cb7895839ba25299ad0d2d67a7b695f (patch) | |
tree | 1bf591d87ee0411946b195f36dda787b8e633b0e /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | b235a8cb1042cb7706dddc0f783cabb81e141055 (diff) | |
download | sqlalchemy-becab8588cb7895839ba25299ad0d2d67a7b695f.tar.gz |
The parameter `as_uuid` of `UUID` now defaults to `True`.
Fixes: #7225
Change-Id: Iddb78bf47ac733300bd12db50e16199cc22e9476
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 4f3e297ef..e4ebbcb80 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -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 |