diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ce22424f..8a92fb87 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ Release History =============== +0.5.2 (2020-08-06) +------------------ + +* Introduce support for Postgresql Array and JSON columns +* Allow restricting `List` datatype to specific content types + 0.5.1 (2020-07-02) ------------------ diff --git a/src/protean/impl/repository/sqlalchemy_repo.py b/src/protean/impl/repository/sqlalchemy_repo.py index 750fefc5..100ebba5 100644 --- a/src/protean/impl/repository/sqlalchemy_repo.py +++ b/src/protean/impl/repository/sqlalchemy_repo.py @@ -10,6 +10,7 @@ from protean.core.exceptions import ConfigurationError, ObjectNotFoundError from protean.core.field.association import Reference from protean.core.field.basic import ( + JSON, Array, Auto, Boolean, @@ -18,7 +19,6 @@ Dict, Float, Integer, - JSON, List, String, Text, diff --git a/tests/impl/model/dict_model/test_list_datatype.py b/tests/impl/model/dict_model/test_list_datatype.py index 35db6ed6..649b2585 100644 --- a/tests/impl/model/dict_model/test_list_datatype.py +++ b/tests/impl/model/dict_model/test_list_datatype.py @@ -1,11 +1,12 @@ -import pytest - +# Standard Library Imports from datetime import datetime +# Protean +import pytest + from protean.core.aggregate import BaseAggregate from protean.core.exceptions import ValidationError from protean.core.field.basic import ( - List, Auto, Boolean, Date, @@ -13,6 +14,7 @@ Float, Identifier, Integer, + List, String, ) diff --git a/tests/impl/model/sqlalchemy_model/postgresql/test_array_datatype.py b/tests/impl/model/sqlalchemy_model/postgresql/test_array_datatype.py index 4f336a11..43393dd9 100644 --- a/tests/impl/model/sqlalchemy_model/postgresql/test_array_datatype.py +++ b/tests/impl/model/sqlalchemy_model/postgresql/test_array_datatype.py @@ -1,7 +1,9 @@ -import pytest - +# Standard Library Imports from datetime import datetime +# Protean +import pytest + from protean.core.aggregate import BaseAggregate from protean.core.exceptions import ValidationError from protean.core.field.basic import ( diff --git a/tests/impl/model/sqlalchemy_model/postgresql/test_json_datatype.py b/tests/impl/model/sqlalchemy_model/postgresql/test_json_datatype.py index d78309f4..f953d010 100644 --- a/tests/impl/model/sqlalchemy_model/postgresql/test_json_datatype.py +++ b/tests/impl/model/sqlalchemy_model/postgresql/test_json_datatype.py @@ -1,13 +1,11 @@ -import pytest - +# Standard Library Imports from datetime import datetime +# Protean +import pytest + from protean.core.aggregate import BaseAggregate -from protean.core.field.basic import ( - DateTime, - JSON, - String, -) +from protean.core.field.basic import JSON, DateTime, String class Event(BaseAggregate): diff --git a/tests/impl/repository/sqlalchemy_repo/postgresql/test_persistence.py b/tests/impl/repository/sqlalchemy_repo/postgresql/test_persistence.py index 1fb25151..a50aec3a 100644 --- a/tests/impl/repository/sqlalchemy_repo/postgresql/test_persistence.py +++ b/tests/impl/repository/sqlalchemy_repo/postgresql/test_persistence.py @@ -1,13 +1,11 @@ -import pytest - +# Standard Library Imports from datetime import datetime +# Protean +import pytest + from protean.core.aggregate import BaseAggregate -from protean.core.field.basic import ( - DateTime, - JSON, - String, -) +from protean.core.field.basic import JSON, DateTime, String class Event(BaseAggregate):