Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #665 from Clariteia/0.3.2
Browse files Browse the repository at this point in the history
0.3.2
  • Loading branch information
Sergio García Prado authored Nov 30, 2021
2 parents bf939b2 + f6278c6 commit 9119a19
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,8 @@ History

* Fix bug related with `enum.Enum` inherited classes that do not recover the original type after being serialized.
* Fix bug related with`str` values auto-casting to an iterable of characters.

0.3.2 (2021-11-30)
--------------------

* Fix bug related with `EntrypointLauncher`'s dependency injection and unloaded `minos.*` modules.
2 changes: 1 addition & 1 deletion minos/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__author__ = """Clariteia Devs"""
__email__ = "devs@clariteia.com"
__version__ = "0.3.1"
__version__ = "0.3.2"

from .configuration import (
BROKER,
Expand Down
5 changes: 5 additions & 0 deletions minos/common/launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
)

import logging
import pkgutil
import re
import sys
from asyncio import (
Expand Down Expand Up @@ -177,6 +178,10 @@ async def _setup(self) -> None:

@property
def _internal_modules(self) -> list[ModuleType]:
import minos

for loader, module_name, _ in pkgutil.iter_modules(minos.__path__):
loader.find_module(module_name).load_module(module_name)
return [v for k, v in sys.modules.items() if re.fullmatch(r"minos\.\w+", k)]

async def _destroy(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "minos_microservice_common"
version = "0.3.1"
version = "0.3.2"
description = "Python Package with common Classes and Utilities used in Minos Microservices."
readme = "README.md"
repository = "https://github.com/clariteia/minos_microservice_common"
Expand Down
1 change: 1 addition & 0 deletions tests/test_common/test_launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async def test_setup(self):
)

self.assertEqual(call(modules=[tests, common]), mock.call_args)
await self.launcher.destroy()

async def test_destroy(self):
self.launcher.injector.wire = AsyncMock()
Expand Down

0 comments on commit 9119a19

Please sign in to comment.