lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

June 2026

  • 1 participants
  • 870 discussions
[S] Change in osmo-ci[master]: jobs/{master,gerrit}: eim,ipa: wipe-workspace
by osmith 29 Jun '26

29 Jun '26
Attention is currently required from: dexter, fixeria. Hello Jenkins Builder, dexter, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/42899?usp=email to look at the new patch set (#2). Change subject: jobs/{master,gerrit}: eim,ipa: wipe-workspace ...................................................................... jobs/{master,gerrit}: eim,ipa: wipe-workspace Set wipe-workspace for the onomondo-eim and onomondo-ipa jobs to true, so previous failures cannot influence new jenkins job runs. E.g. currently we had gerrit-onomondo-ipa-build failing with: + mkdir build mkdir: cannot create directory 'build': File exists Most existing jobs call scripts/osmo-clean-workspace.sh from osmo-ci.git at the beginning of their jenkins.sh instead of using wipe-workspace. But this doesn't have any advantage here while making jenkins.sh more complex. Let's use the built-in feature from jenkins here. Change-Id: If4ef5ab804b05ad630cfa770741fe6053fdfb637 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/99/42899/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42899?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: If4ef5ab804b05ad630cfa770741fe6053fdfb637 Gerrit-Change-Number: 42899 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ci[master]: jobs/{master,gerrit}: eim,ipa: wipe-workspace
by osmith 29 Jun '26

29 Jun '26
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/42899?usp=email ) Change subject: jobs/{master,gerrit}: eim,ipa: wipe-workspace ...................................................................... jobs/{master,gerrit}: eim,ipa: wipe-workspace Set wipe-workspace for the onomondo-eim and onomondo-ipa jobs to true, so previous failures cannot influence new jenkins job runs. E.g. currently we have gerrit-onomondo-ipa-build failing with: + mkdir build mkdir: cannot create directory 'build': File exists Most existing jobs call scripts/osmo-clean-workspace.sh from osmo-ci.git at the beginning of their jenkins.sh instead of using wipe-workspace. But this doesn't have any advantage here while making jenkins.sh more complex. Let's use the built-in feature from jenkins here. Change-Id: If4ef5ab804b05ad630cfa770741fe6053fdfb637 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/99/42899/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index a75d6be..9d40493 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -44,6 +44,7 @@ a4: !!python/tuple [default] combination_filter: '' sequential: false + wipe: false # most projects use osmo-clean-workspace.sh instead # most common build invocation # SYS_PTRACE is needed for ASAN (https://github.com/google/sanitizers/issues/764) # seccomp profile is needed for io_uring (OS#6405) @@ -196,9 +197,11 @@ - onomondo-eim: cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' pipeline_binpkgs: "" + wipe: true - onomondo-ipa: pipeline_binpkgs: "" + wipe: true - openggsn: a1_name: GTP @@ -863,7 +866,7 @@ refspec: $GERRIT_REFSPEC name: choosing-strategy: gerrit - wipe-workspace: false + wipe-workspace: '{obj:wipe}' skip-tag: true submodule: recursive: true diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 1900ffe..b59a923 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -17,6 +17,7 @@ a4: !!python/tuple [default] combination_filter: '' sequential: false + wipe: false # most projects use osmo-clean-workspace.sh instead # most common build invocation # SYS_PTRACE is needed for ASAN (https://github.com/google/sanitizers/issues/764) # seccomp profile is needed for io_uring (OS#6405) @@ -279,8 +280,11 @@ - onomondo-eim: cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' + wipe: true - - onomondo-ipa + - onomondo-ipa: + wipe: true + - osmo-bsc - osmo-bsc-nat @@ -746,7 +750,7 @@ - '$BRANCH' refspec: name: - wipe-workspace: false + wipe-workspace: '{obj:wipe}' skip-tag: true submodule: recursive: true -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42899?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: If4ef5ab804b05ad630cfa770741fe6053fdfb637 Gerrit-Change-Number: 42899 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[XS] Change in onomondo-eim[master]: esipa_asn1_handler: fix transactionId handling
by laforge 29 Jun '26

29 Jun '26
Attention is currently required from: dexter. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42876?usp=email ) Change subject: esipa_asn1_handler: fix transactionId handling ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42876?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-eim Gerrit-Branch: master Gerrit-Change-Id: I1340e0c7aed091e8e5a5089ebd6e524512408cf7 Gerrit-Change-Number: 42876 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 29 Jun 2026 08:32:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in onomondo-eim[master]: asn1/SGP32Definitions: apply workarounds
by laforge 29 Jun '26

29 Jun '26
Attention is currently required from: dexter, jolly. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42870?usp=email ) Change subject: asn1/SGP32Definitions: apply workarounds ...................................................................... Patch Set 2: (1 comment) Patchset: PS1: > Unfortunately the linter complains about trailing whitespaces, however we have to make an exception […] well, then include that checkpatch exception in the (previous) patch 😊 -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42870?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-eim Gerrit-Branch: master Gerrit-Change-Id: Id90b005fc3c8c8f737b0c740d4c067f90842a1fe Gerrit-Change-Number: 42870 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 29 Jun 2026 08:32:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[XL] Change in onomondo-eim[master]: asn1/SGP32Definitions: upgrade ASN.1 spec to V.1.2
by laforge 29 Jun '26

29 Jun '26
Attention is currently required from: dexter, jolly. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42869?usp=email ) Change subject: asn1/SGP32Definitions: upgrade ASN.1 spec to V.1.2 ...................................................................... Patch Set 2: (1 comment) Patchset: PS1: > Feel free to create `.checkpatch.conf` with `--exclude ^asn1/.*\.asn1$`. @pmaier@sysmocom.de: ping? -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42869?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-eim Gerrit-Branch: master Gerrit-Change-Id: Id4d217296f43846aa39f5dc7076465e2dab72a7c Gerrit-Change-Number: 42869 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 29 Jun 2026 08:31:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: saip/personalization: add MncLen configurable parameter
by laforge 29 Jun '26

29 Jun '26
Attention is currently required from: fixeria, neels. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42672?usp=email ) Change subject: saip/personalization: add MncLen configurable parameter ...................................................................... Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/42672?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6c600faeab00ffb072acbe94c9a8b2d1397c07d3 Gerrit-Change-Number: 42672 Gerrit-PatchSet: 9 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 29 Jun 2026 08:30:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in pysim[master]: setup.py: Align cmd2 minimum version with requirements.txt
by laforge 29 Jun '26

29 Jun '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41642?usp=email ) Change subject: setup.py: Align cmd2 minimum version with requirements.txt ...................................................................... setup.py: Align cmd2 minimum version with requirements.txt As pointed out in the commit-log of Change-Id I5186f242dbc1b770e3ab8cdca7f27d2a1029fff6 we had different minimum versions for cmd2 in requirements.txt vs setup.py. Let's align that. Change-Id: I71cee0ec3ed2abec68ec567beaab13c868721dad --- M setup.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/setup.py b/setup.py index 614d80b..d640596 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ "pyscard", "pyserial", "pytlv", - "cmd2 >= 1.5.0, < 3.0", + "cmd2 >= 2.6.2, < 3.0", "jsonpath-ng", "construct >= 2.10.70", "bidict", -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41642?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I71cee0ec3ed2abec68ec567beaab13c868721dad Gerrit-Change-Number: 41642 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: pySim-shell: drop backwards compat quirks for cmd2 < 2.6.2
by laforge 29 Jun '26

29 Jun '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/42891?usp=email ) Change subject: pySim-shell: drop backwards compat quirks for cmd2 < 2.6.2 ...................................................................... pySim-shell: drop backwards compat quirks for cmd2 < 2.6.2 Remove version guards for cmd2 < 2.0.0 and < 2.3.0, the Cmd2Compat and Settable2Compat wrapper classes, and the old fg/bg color API - none of these are needed since both requirements.txt and setup.py already mandate cmd2 >= 2.6.2. Change-Id: Ifd1c484ab66d74323d10e946347daa637cf6f5d8 --- M pySim-shell.py 1 file changed, 25 insertions(+), 52 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/pySim-shell.py b/pySim-shell.py index 66f39fc..2639009 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -24,25 +24,16 @@ import re import cmd2 from packaging import version -from cmd2 import style +from cmd2 import style, Fg, Bg import logging from pySim.log import PySimLogger from osmocom.utils import auto_uint8 -# cmd2 >= 2.3.0 has deprecated the bg/fg in favor of Bg/Fg :( -if version.parse(cmd2.__version__) < version.parse("2.3.0"): - from cmd2 import fg, bg # pylint: disable=no-name-in-module - RED = fg.red - YELLOW = fg.yellow - LIGHT_RED = fg.bright_red - LIGHT_GREEN = fg.bright_green -else: - from cmd2 import Fg, Bg # pylint: disable=no-name-in-module - RED = Fg.RED - YELLOW = Fg.YELLOW - LIGHT_RED = Fg.LIGHT_RED - LIGHT_GREEN = Fg.LIGHT_GREEN +RED = Fg.RED +YELLOW = Fg.YELLOW +LIGHT_RED = Fg.LIGHT_RED +LIGHT_GREEN = Fg.LIGHT_GREEN from cmd2 import CommandSet, with_default_category, with_argparser import argparse @@ -76,43 +67,19 @@ log = PySimLogger.get(Path(__file__).stem) -class Cmd2Compat(cmd2.Cmd): - """Backwards-compatibility wrapper around cmd2.Cmd to support older and newer - releases. See https://github.com/python-cmd2/cmd2/blob/master/CHANGELOG.md""" - def run_editor(self, file_path: Optional[str] = None) -> None: - if version.parse(cmd2.__version__) < version.parse("2.0.0"): - return self._run_editor(file_path) # pylint: disable=no-member - else: - return super().run_editor(file_path) # pylint: disable=no-member - -class Settable2Compat(cmd2.Settable): - """Backwards-compatibility wrapper around cmd2.Settable to support older and newer - releases. See https://github.com/python-cmd2/cmd2/blob/master/CHANGELOG.md""" - def __init__(self, name, val_type, description, settable_object, **kwargs): - if version.parse(cmd2.__version__) < version.parse("2.0.0"): - super().__init__(name, val_type, description, **kwargs) # pylint: disable=no-value-for-parameter - else: - super().__init__(name, val_type, description, settable_object, **kwargs) # pylint: disable=too-many-function-args - -class PysimApp(Cmd2Compat): +class PysimApp(cmd2.Cmd): CUSTOM_CATEGORY = 'pySim Commands' BANNER = """Welcome to pySim-shell! (C) 2021-2023 by Harald Welte, sysmocom - s.f.m.c. GmbH and contributors Online manual available at https://downloads.osmocom.org/docs/pysim/master/html/shell.html """ def __init__(self, verbose, card, rs, sl, ch, script=None): - if version.parse(cmd2.__version__) < version.parse("2.0.0"): - kwargs = {'use_ipython': True} - else: - kwargs = {'include_ipy': True} - self.verbose = verbose PySimLogger.setup(self.poutput, {logging.WARN: YELLOW}) self._onchange_verbose('verbose', False, self.verbose) - # pylint: disable=unexpected-keyword-arg super().__init__(persistent_history_file='~/.pysim_shell_history', allow_cli_args=False, - auto_load_commands=False, startup_script=script, **kwargs) + auto_load_commands=False, startup_script=script, include_ipy=True) self.intro = style(self.BANNER, fg=RED) self.default_category = 'pySim-shell built-in commands' self.card = None @@ -128,18 +95,24 @@ self.apdu_trace = False self.apdu_strict = False - self.add_settable(Settable2Compat('numeric_path', bool, 'Print File IDs instead of names', self, - onchange_cb=self._onchange_numeric_path)) - self.add_settable(Settable2Compat('conserve_write', bool, 'Read and compare before write', self, - onchange_cb=self._onchange_conserve_write)) - self.add_settable(Settable2Compat('json_pretty_print', bool, 'Pretty-Print JSON output', self)) - self.add_settable(Settable2Compat('apdu_trace', bool, 'Trace and display APDUs exchanged with card', self, - onchange_cb=self._onchange_apdu_trace)) - self.add_settable(Settable2Compat('apdu_strict', bool, - 'Strictly apply APDU format according to ISO/IEC 7816-3, table 12', self)) - self.add_settable(Settable2Compat('verbose', bool, - 'Enable/disable verbose logging', self, - onchange_cb=self._onchange_verbose)) + self.add_settable(cmd2.Settable('numeric_path', bool, + 'Print File IDs instead of names', + self, onchange_cb=self._onchange_numeric_path)) + self.add_settable(cmd2.Settable('conserve_write', bool, + 'Read and compare before write', + self, onchange_cb=self._onchange_conserve_write)) + self.add_settable(cmd2.Settable('json_pretty_print', bool, + 'Pretty-Print JSON output', + self)) + self.add_settable(cmd2.Settable('apdu_trace', bool, + 'Trace and display APDUs exchanged with card', + self, onchange_cb=self._onchange_apdu_trace)) + self.add_settable(cmd2.Settable('apdu_strict', bool, + 'Strictly apply APDU format according to ISO/IEC 7816-3, table 12', + self)) + self.add_settable(cmd2.Settable('verbose', bool, + 'Enable/disable verbose logging', + self, onchange_cb=self._onchange_verbose)) self.equip(card, rs) def equip(self, card, rs): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/42891?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ifd1c484ab66d74323d10e946347daa637cf6f5d8 Gerrit-Change-Number: 42891 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: pySim.log, pySim-shell: fix compatibility with cmd2 >= 3.0.0
by laforge 29 Jun '26

29 Jun '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/42892?usp=email ) Change subject: pySim.log, pySim-shell: fix compatibility with cmd2 >= 3.0.0 ...................................................................... pySim.log, pySim-shell: fix compatibility with cmd2 >= 3.0.0 Some Linux distributions (e.g. Arch Linux) already ship cmd2 3.x.x, which removed the style()/Fg/Bg API in favor of stylize()/Color. Add a version guard to select the right API at runtime. Adjust the upper bound cap in requirements.txt and setup.py. Change-Id: Ibf2ac7847933296fb06665c87f53ed6e1f315d27 --- M pySim-shell.py M pySim/log.py M requirements.txt M setup.py 4 files changed, 27 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/pySim-shell.py b/pySim-shell.py index 2639009..d31cf6a 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -24,16 +24,25 @@ import re import cmd2 from packaging import version -from cmd2 import style, Fg, Bg - import logging from pySim.log import PySimLogger from osmocom.utils import auto_uint8 -RED = Fg.RED -YELLOW = Fg.YELLOW -LIGHT_RED = Fg.LIGHT_RED -LIGHT_GREEN = Fg.LIGHT_GREEN +# cmd2 >= 3.0 replaced Fg + style() with Color + stylize() +if version.parse(cmd2.__version__) >= version.parse("3.0.0"): + from cmd2 import Color, stylize # pylint: disable=no-name-in-module + RED = Color.RED + YELLOW = Color.YELLOW + LIGHT_RED = Color.BRIGHT_RED + LIGHT_GREEN = Color.BRIGHT_GREEN + def style(text, fg=None, bg=None, bold=False): # pylint: disable=function-redefined + return stylize(text, fg) if fg else text +else: + from cmd2 import style, Fg # pylint: disable=no-name-in-module + RED = Fg.RED + YELLOW = Fg.YELLOW + LIGHT_RED = Fg.LIGHT_RED + LIGHT_GREEN = Fg.LIGHT_GREEN from cmd2 import CommandSet, with_default_category, with_argparser import argparse diff --git a/pySim/log.py b/pySim/log.py index 345cf78..1204c4f 100644 --- a/pySim/log.py +++ b/pySim/log.py @@ -24,7 +24,15 @@ # import logging -from cmd2 import style +import cmd2 +from packaging import version + +if version.parse(cmd2.__version__) >= version.parse("3.0.0"): + from cmd2 import stylize as _stylize # pylint: disable=no-name-in-module + def _style(text, fg=None): # pylint: disable=function-redefined + return _stylize(text, fg) if fg else text +else: # cmd2>=2.6.2 + from cmd2 import style as _style # type: ignore[no-redef] class _PySimLogHandler(logging.Handler): def __init__(self, log_callback): @@ -121,7 +129,7 @@ if isinstance(color, str): PySimLogger.print_callback(color + formatted_message + "\033[0m") else: - PySimLogger.print_callback(style(formatted_message, fg = color)) + PySimLogger.print_callback(_style(formatted_message, fg = color)) else: PySimLogger.print_callback(formatted_message) diff --git a/requirements.txt b/requirements.txt index 9088f16..aafccc2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pyscard pyserial pytlv -cmd2>=2.6.2,<3.0 +cmd2>=2.6.2,<4.0 jsonpath-ng construct>=2.10.70 bidict diff --git a/setup.py b/setup.py index d640596..ff093fb 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ "pyscard", "pyserial", "pytlv", - "cmd2 >= 2.6.2, < 3.0", + "cmd2 >= 2.6.2, < 4.0", "jsonpath-ng", "construct >= 2.10.70", "bidict", -- To view, visit https://gerrit.osmocom.org/c/pysim/+/42892?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibf2ac7847933296fb06665c87f53ed6e1f315d27 Gerrit-Change-Number: 42892 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: pySim.log, pySim-shell: fix compatibility with cmd2 >= 3.0.0
by laforge 29 Jun '26

29 Jun '26
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42892?usp=email ) Change subject: pySim.log, pySim-shell: fix compatibility with cmd2 >= 3.0.0 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/42892?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibf2ac7847933296fb06665c87f53ed6e1f315d27 Gerrit-Change-Number: 42892 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 29 Jun 2026 08:27:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • ...
  • 87
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.