Skip to content

Commit

Permalink
Release 3.0 with experimental features
Browse files Browse the repository at this point in the history
  • Loading branch information
shiroyuki committed Jan 30, 2020
1 parent b0e26fd commit 8d53063
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions imagination/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ def contain(self, entity_id : str):

return entity_id in self.__controller_map

def get(self, entity_id, previously_activated : list = None, id_naming_strategy : Optional[Callable] = None):
def get(self, entity_id, previously_activated : list = None, id_naming_strategy : Optional[Callable] = None,
lock_down_enabled: bool = True):
""" Retrieve an entity by ID
:param entity_id: the identifier of the entity or a class of the service.
:param list previously_activated: the list of identifiers of previously activated entities (for internal use only)
:param Callable id_naming_strategy: an optional callable object for ID naming strategy
:param bool lock_down_enabled: the flag to enable the core lockdown
When :param:`entity_id` is a class of the service, it would use the default ID naming strategy to refer to the service of the same class.
Expand All @@ -136,7 +138,8 @@ def get(self, entity_id, previously_activated : list = None, id_naming_strategy
# with exclusive_lock(self.__internal_lock):
# On the first request, the core will be on lockdown.
if not self.is_on_lockdown():
self.lock_down()
if lock_down_enabled:
self.lock_down()
self._declare_initial_method_calls()
self._generate_interception_graph()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name = 'imagination',
version = '3.0.0a4',
version = '3.0.0',
description = 'Reusable Component Framework',
author = 'Juti Noppornpitak',
author_email = 'juti_n@yahoo.co.jp',
Expand Down

0 comments on commit 8d53063

Please sign in to comment.