Skip to content

Commit 58cbe15

Browse files
author
Sergio García Prado
committed
ISSUE #?
* Remove `minos.networks.Builder`.
1 parent 6dc0e18 commit 58cbe15

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

packages/core/minos-microservice-networks/minos/networks/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@
140140
SystemService,
141141
)
142142
from .utils import (
143-
Builder,
144143
consume_queue,
145144
get_host_ip,
146145
get_host_name,

packages/core/minos-microservice-networks/minos/networks/utils.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44

55
import re
66
import socket
7-
import warnings
87
from asyncio import (
98
QueueEmpty,
109
)
1110

12-
from minos.common import Builder as CommonBuilder
13-
1411

1512
def get_host_ip() -> str:
1613
"""Get the host ip.
@@ -54,11 +51,3 @@ async def consume_queue(queue, max_count: int) -> None:
5451
queue.get_nowait()
5552
except QueueEmpty:
5653
break
57-
58-
59-
class Builder(CommonBuilder):
60-
"""Builder class."""
61-
62-
def __init__(self, *args, **kwargs):
63-
warnings.warn(f"{Builder!r} has been deprecated. Use {CommonBuilder} instead.", DeprecationWarning)
64-
super().__init__(*args, **kwargs)

packages/core/minos-microservice-networks/tests/test_networks/test_utils.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import unittest
2-
import warnings
32
from asyncio import (
43
Queue,
54
)
65

7-
from minos.common import Builder as CommonBuilder
86
from minos.networks import (
9-
Builder,
107
consume_queue,
118
)
129

@@ -32,16 +29,5 @@ async def test_consume_queue_full(self):
3229
self.assertTrue(queue.empty())
3330

3431

35-
class TestBuilder(unittest.TestCase):
36-
def test_is_subclass(self):
37-
self.assertTrue(issubclass(Builder, CommonBuilder))
38-
39-
def test_warnings(self):
40-
with warnings.catch_warnings():
41-
warnings.simplefilter("ignore", DeprecationWarning)
42-
builder = Builder()
43-
self.assertIsInstance(builder, CommonBuilder)
44-
45-
4632
if __name__ == "__main__":
4733
unittest.main()

0 commit comments

Comments
 (0)