Skip to content

Commit f27f4c3

Browse files
[MERGE] Release Candidate v2.0.3-rc-3 Staging.
3 parents 9ceacca + 0e446d7 + c6aa52b commit f27f4c3

File tree

7 files changed

+94
-65
lines changed

7 files changed

+94
-65
lines changed

Logo.svg

Lines changed: 64 additions & 52 deletions
Loading

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
# The short X.Y version.
117117
version = "v2.0"
118118
# The full version, including alpha/beta/rc tags.
119-
release = "v2.0.3-rc-1"
119+
release = "v2.0.3-rc-3"
120120

121121
# The language for content autogenerated by Sphinx. Refer to documentation
122122
# for a list of supported languages.

multicast/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
global __version__ # skipcq: PYL-W0604
9595

96-
__version__ = """2.0.3-rc-1"""
96+
__version__ = """2.0.3-rc-3"""
9797
"""The version of this program.
9898
9999
Minimal Acceptance Testing:

multicast/env.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

4-
# Python Multicast Repo
4+
# Multicast Python Module
55
# ..................................
66
# Copyright (c) 2017-2025, Mr. Walls
77
# ..................................
@@ -710,8 +710,8 @@ def load_config() -> dict:
710710
group = load_group()
711711
ttl = load_TTL()
712712
groups_str = os.getenv("MULTICAST_GROUPS", "")
713-
bind_addr = os.getenv("MULTICAST_BIND_ADDR", group)
714-
buffer_size = int(os.getenv("MULTICAST_BUFFER_SIZE", 1316))
713+
bind_addr = os.getenv("MULTICAST_BIND_ADDR", group) # skipcq: PYL-W1508
714+
buffer_size = int(os.getenv("MULTICAST_BUFFER_SIZE", 1316)) # skipcq: PYL-W1508
715715
# Process and validate groups
716716
groups = set()
717717
if groups_str:

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = multicast
3-
version = 2.0.3-rc-1
3+
version = 2.0.3-rc-3
44
author = Mr. Walls
55
author_email = [email protected]
66
description = Multicast Python Module for Send/Recv Stubs.

tests/MulticastUDPClient.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ class MCastClient(object): # skipcq: PYL-R0205
232232
_source_port = None
233233
"""The source port for the client."""
234234

235+
# skipcq: TCV-002
235236
def __init__(self, *args, **kwargs):
236237
"""
237238
Initialize a MCastClient object with optional group address and source port.
@@ -292,6 +293,7 @@ def __init__(self, *args, **kwargs):
292293
293294
294295
"""
296+
# skipcq: TCV-002
295297
if str("""grp_addr""") in kwargs:
296298
self._group_addr = kwargs.get("""grp_addr""", None) # skipcq: PTC-W0039 - ensure None
297299
if str("""src_port""") in kwargs:
@@ -308,6 +310,7 @@ def __init__(self, *args, **kwargs):
308310
)
309311
)
310312

313+
# skipcq: TCV-002
311314
@staticmethod
312315
def say(address, port, sock, msg):
313316
"""
@@ -361,6 +364,7 @@ def say(address, port, sock, msg):
361364
for multicast communication.
362365
363366
"""
367+
# skipcq: TCV-002
364368
sock.sendto(bytes(msg + "\n", "utf-8"), (address, port))
365369
received = str(sock.recv(1024), "utf-8")
366370
sp = " " * 4
@@ -394,6 +398,7 @@ class MyUDPHandler(socketserver.BaseRequestHandler):
394398

395399
__module__ = """tests.MulticastUDPClient.MyUDPHandler"""
396400

401+
# skipcq: TCV-002
397402
def handle(self):
398403
"""
399404
Handle incoming UDP requests.
@@ -442,13 +447,15 @@ def handle(self):
442447
as per `socketserver.BaseRequestHandler` for datagram services.
443448
444449
"""
450+
# skipcq: TCV-002
445451
data = self.request[0].strip()
446452
sock = self.request[1]
447453
print(f"{self.client_address[0]} wrote: ")
448454
print(data)
449455
sock.sendto(data.upper(), self.client_address)
450456

451457

458+
# skipcq: TCV-002
452459
def main():
453460
"""
454461
The main test operations.
@@ -474,6 +481,7 @@ def main():
474481
475482
476483
"""
484+
# skipcq: TCV-002
477485
HOST, PORT = "224.0.0.1", 59991
478486
data = "TEST This is a test"
479487
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
@@ -484,5 +492,6 @@ def main():
484492

485493

486494
if __name__ == "__main__":
487-
main()
488-
exit(0) # skipcq: PYL-R1722 - intentionally allow overwriteing exit for testing
495+
main() # skipcq: TCV-002
496+
# skipcq: PYL-R1722
497+
exit(0) # skipcq: PYL-R1722 -- intentionally allow overwriteing exit for testing.

tests/context.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ def getCoverageCommand():
242242
try:
243243
thecov = checkPythonCommand(["command", "-v", "coverage"])
244244
if (str("/coverage") in str(thecov)):
245-
thecov = str("coverage")
245+
thecov = str("coverage") # skipcq: TCV-002
246246
elif str("/coverage3") in str(checkPythonCommand(["command", "-v", "coverage3"])):
247-
thecov = str("coverage3")
247+
thecov = str("coverage3") # skipcq: TCV-002
248248
else: # pragma: no branch
249249
thecov = "exit 1 ; #"
250250
except Exception: # pragma: no branch
@@ -285,7 +285,7 @@ def __check_cov_before_py():
285285
thepython = str(sys.executable)
286286
thecov = getCoverageCommand()
287287
if (str("coverage") in str(thecov)) and (sys.version_info >= (3, 7)):
288-
thepython = str("{} run -p").format(str(thecov))
288+
thepython = str("{} run -p").format(str(thecov)) # skipcq: TCV-002
289289
else: # pragma: no branch
290290
try:
291291
import coverage as coverage
@@ -384,6 +384,7 @@ def checkCovCommand(*args): # skipcq: PYL-W0102 - [] != [None]
384384
if sys.__name__ is None: # pragma: no branch
385385
raise ImportError("[CWE-758] Failed to import system.") from None
386386
if not args or args[0] is None:
387+
# skipcq: TCV-002
387388
raise ValueError("[CWE-1286] args must be an array of positional arguments") from None
388389
else:
389390
args = [*args] # convert to an array
@@ -930,6 +931,13 @@ class BasicUsageTestSuite(unittest.TestCase):
930931

931932
__name__ = """tests.context.BasicUsageTestSuite"""
932933

934+
NO_PYTHON_ERROR = """No python cmd to test with!""" # skipcq: TCV-002
935+
"""Error message used when Python command is not available for testing.
936+
937+
This constant is used across multiple test methods to maintain consistency
938+
in error reporting when Python command execution is not possible.
939+
"""
940+
933941
@classmethod
934942
def setUpClass(cls):
935943
"""Overrides unittest.TestCase.setUpClass(cls) to set up thepython test fixture."""
@@ -954,7 +962,7 @@ def setUp(self):
954962
Defaults is to skip test if class is missing thepython test fixture.
955963
"""
956964
if not self._thepython:
957-
self.skipTest(str("""No python cmd to test with!"""))
965+
self.skipTest(self.NO_PYTHON_ERROR) # skipcq: TCV-002
958966
self._the_test_port = self._always_generate_random_port_WHEN_called()
959967

960968
def _should_get_package_version_WHEN_valid(self):
@@ -998,7 +1006,7 @@ def test_absolute_truth_and_meaning(self):
9981006
def test_finds_python_WHEN_testing(self):
9991007
"""Test case 1: Class Test-Fixture Meta Test."""
10001008
if (self._thepython is not None) and (len(self._thepython) <= 0):
1001-
self.fail(str("""No python cmd to test with!"""))
1009+
self.fail(self.NO_PYTHON_ERROR) # skipcq: TCV-002
10021010
self.test_absolute_truth_and_meaning()
10031011

10041012
def tearDown(self):

0 commit comments

Comments
 (0)