diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a0b79960..29cdac24 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ Release History =============== +0.6.2 +----- + +* Bugfixes for `protean start` command +* Use `_entity` as the field identifier for Element-level errors + 0.6.1 ----- diff --git a/src/protean/__init__.py b/src/protean/__init__.py index 6b5c4121..6734d5db 100644 --- a/src/protean/__init__.py +++ b/src/protean/__init__.py @@ -1,7 +1,7 @@ __version__ = "0.6.1" -from .utils import get_version from .domain import Domain from .domain.config import Config as Config +from .utils import get_version __all__ = ["get_version", "Domain", "Config"] diff --git a/src/protean/adapters/cache/memory.py b/src/protean/adapters/cache/memory.py index 6050c894..23499faf 100644 --- a/src/protean/adapters/cache/memory.py +++ b/src/protean/adapters/cache/memory.py @@ -4,6 +4,7 @@ from threading import RLock from typing import Optional, Union + from protean.core.view import BaseView try: diff --git a/src/protean/adapters/cache/redis.py b/src/protean/adapters/cache/redis.py index 67069266..1a554a9c 100644 --- a/src/protean/adapters/cache/redis.py +++ b/src/protean/adapters/cache/redis.py @@ -1,4 +1,5 @@ import json + from typing import Optional, Union import redis diff --git a/src/protean/cli.py b/src/protean/cli.py index 5d409435..776a8cd6 100644 --- a/src/protean/cli.py +++ b/src/protean/cli.py @@ -15,12 +15,13 @@ Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration """ import ast -import click import os import re import sys import traceback +import click + class NoDomainException(click.UsageError): """Raised if a domain cannot be found or loaded.""" diff --git a/src/protean/domain/__init__.py b/src/protean/domain/__init__.py index 978e42cd..5e8a2720 100644 --- a/src/protean/domain/__init__.py +++ b/src/protean/domain/__init__.py @@ -12,7 +12,6 @@ from protean.core.command import BaseCommand from protean.core.command_handler import BaseCommandHandler from protean.core.event import BaseEvent -from protean.core.field.basic import Boolean from protean.core.model import BaseModel from protean.domain.registry import _DomainRegistry from protean.exceptions import ( @@ -20,7 +19,7 @@ IncorrectUsageError, NotSupportedError, ) -from protean.infra.eventing import EventLog, EventLogRepository, Message, MessageType +from protean.infra.eventing import EventLog, EventLogRepository, MessageType from protean.infra.job import Job, JobRepository from protean.utils import ( CommandProcessingType, diff --git a/src/protean/globals.py b/src/protean/globals.py index 52176f20..79ed22c7 100644 --- a/src/protean/globals.py +++ b/src/protean/globals.py @@ -32,6 +32,6 @@ def _find_uow(): # context locals _domain_context_stack = LocalStack() _uow_context_stack = LocalStack() -current_domain: "Domain" = LocalProxy(_find_domain) # type: ignore -current_uow: "UnitOfWork" = LocalProxy(_find_uow) # type: ignore +current_domain: "Domain" = LocalProxy(_find_domain) # type: ignore # noqa: F821 +current_uow: "UnitOfWork" = LocalProxy(_find_uow) # type: ignore # noqa: F821 g = LocalProxy(partial(_lookup_domain_object, "g")) # type: ignore diff --git a/tests/entity/test_entity_meta.py b/tests/entity/test_entity_meta.py index 02ef6e9f..44c3ee2c 100644 --- a/tests/entity/test_entity_meta.py +++ b/tests/entity/test_entity_meta.py @@ -10,7 +10,6 @@ DifferentDbPerson, Person, PersonAutoSSN, - PersonExplicitID, Relative, SqlDifferentDbPerson, SqlPerson, diff --git a/tests/event/tests.py b/tests/event/tests.py index b076983b..d47cd74b 100644 --- a/tests/event/tests.py +++ b/tests/event/tests.py @@ -1,4 +1,5 @@ import uuid + import pytest from protean.core.aggregate import BaseAggregate diff --git a/tests/eventing/tests.py b/tests/eventing/tests.py index ed794c0f..08afae1f 100644 --- a/tests/eventing/tests.py +++ b/tests/eventing/tests.py @@ -1,10 +1,11 @@ -import pytest import logging import sys from datetime import datetime from typing import Dict +import pytest + from protean.core.aggregate import BaseAggregate from protean.core.application_service import BaseApplicationService from protean.core.event import BaseEvent diff --git a/tests/test_cli.py b/tests/test_cli.py index 350b4c2e..cd7fb31c 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -4,11 +4,11 @@ from pathlib import Path import pytest + from click.testing import CliRunner from protean import Domain -from protean.cli import find_best_domain, derive_domain -from protean.cli import NoDomainException +from protean.cli import NoDomainException, derive_domain, find_best_domain @pytest.fixture diff --git a/tests/test_config.py b/tests/test_config.py index dc376bd3..2bf7c82d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -6,7 +6,6 @@ import protean - # config keys used for the TestConfig TEST_KEY = "foo" SECRET_KEY = "config"