osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/41385?usp=email )
Change subject: Fix lint errors: avoid equality comparisons to `False`
......................................................................
Fix lint errors: avoid equality comparisons to `False`
src/osmocom/utils.py:150:8: E712 Avoid equality comparisons to `False`; use `if not signed:` for false checks
|
148 | """
149 |
150 | if signed == False and number < 0:
| ^^^^^^^^^^^^^^^ E712
151 | raise ValueError("expecting a positive number")
|
= help: Replace with `not signed`
Change-Id: I2ebb33c498b4a7e6229980462aa51b579fa4f782
---
M src/osmocom/utils.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom refs/changes/85/41385/1
diff --git a/src/osmocom/utils.py b/src/osmocom/utils.py
index 3991da2..7963c05 100644
--- a/src/osmocom/utils.py
+++ b/src/osmocom/utils.py
@@ -147,7 +147,7 @@
Integer 'nbytes', which is the number of bytes required to encode 'number'
"""
- if signed == False and number < 0:
+ if not signed and number < 0:
raise ValueError("expecting a positive number")
# Compute how many bytes we need for the absolute (positive) value of the given number
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/41385?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I2ebb33c498b4a7e6229980462aa51b579fa4f782
Gerrit-Change-Number: 41385
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/41380?usp=email )
Change subject: README: mention the pypi package
......................................................................
README: mention the pypi package
Make it easy for users to verify that the pyosmocom project from pypi
comes from the maintainers of this repository by clicking the URL and
finding the "pip install pyosmocom" line in the README.
Change-Id: Iac6fcbc1b5f0caa4cf63de5b8effe46d731080bc
---
M README.md
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom refs/changes/80/41380/1
diff --git a/README.md b/README.md
index 1d98601..c97a8ac 100644
--- a/README.md
+++ b/README.md
@@ -10,3 +10,9 @@
* utilities for common problems found in mobile communications
* TLV parsers/encoders
* helpers for 'construct' based encoders/decoders
+
+Releases get published to [pypi](https://pypi.org/project/pyosmocom/) and can
+be installed with:
+```
+$ pip install pyosmocom
+```
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/41380?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: Iac6fcbc1b5f0caa4cf63de5b8effe46d731080bc
Gerrit-Change-Number: 41380
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/41386?usp=email )
Change subject: Fix lint errors: test for membership should be `not in`
......................................................................
Fix lint errors: test for membership should be `not in`
src/osmocom/tlv.py:477:16: E713 [*] Test for membership should be `not in`
|
475 | key-value pair, where the key is the snake-reformatted type name of 'self'"""
476 | expected_key_name = camel_to_snake(type(self).__name__)
477 | if not expected_key_name in decoded:
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E713
478 | raise ValueError("Dict %s doesn't contain expected key %s" % (decoded, expected_key_name))
479 | self.from_val_dict(decoded[expected_key_name])
|
= help: Convert to `not in`
Change-Id: I2ca3135f1ce38dcc06dc95c38f4b6258a60121cd
---
M src/osmocom/tlv.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom refs/changes/86/41386/1
diff --git a/src/osmocom/tlv.py b/src/osmocom/tlv.py
index 93e4e87..14c22f0 100644
--- a/src/osmocom/tlv.py
+++ b/src/osmocom/tlv.py
@@ -474,7 +474,7 @@
This method is symmetrical to to_dict() above, i.e. the outer dict must contain just a single
key-value pair, where the key is the snake-reformatted type name of 'self'"""
expected_key_name = camel_to_snake(type(self).__name__)
- if not expected_key_name in decoded:
+ if expected_key_name not in decoded:
raise ValueError("Dict %s doesn't contain expected key %s" % (decoded, expected_key_name))
self.from_val_dict(decoded[expected_key_name])
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/41386?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I2ca3135f1ce38dcc06dc95c38f4b6258a60121cd
Gerrit-Change-Number: 41386
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/41379?usp=email )
Change subject: OBS: fix building pyosmocom for debian 12
......................................................................
OBS: fix building pyosmocom for debian 12
Related: pyosmocom I8416234ea02f337fabd075cc345af964c1b71adf
Related: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#licen…
Change-Id: Ia8ef3a0301aeaad4691c197ed780e86b497def4a
---
M scripts/obs/lib/srcpkg.py
1 file changed, 12 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index 1b31f84..b3e0422 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -147,6 +147,18 @@
lib.run_cmd(["sh", "-e", script], cwd=repo_path)
+def prepare_project_pyosmocom():
+ """The format of the license field in pyproject.toml was changed from a
+ "table" to a a string with an SPDX license expression. The sources have
+ been adjusted to use the new format to appease a warning ("By 2026-Feb-18,
+ you need to update your project and remove deprecated calls or your builds
+ will no longer be supported."). However now the build fails with setuptools
+ from Debian 12. Remove the license line from pyproject.toml, the debian
+ packaging has its own license information in debian/copyright."""
+ repo_path = lib.git.get_repo_path("pyosmocom")
+ lib.run_cmd(["sed", "-i", "/^license = /d", "pyproject.toml"], cwd=repo_path)
+
+
def run_generate_build_dep(project):
"""Run contrib/generate_build_dep.sh if it exists in the given project, to
to download sources for dependencies (see e.g. osmo_dia2gsup.git)."""
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/41379?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ia8ef3a0301aeaad4691c197ed780e86b497def4a
Gerrit-Change-Number: 41379
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, pespin.
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ci/+/41379?usp=email )
Change subject: OBS: fix building pyosmocom for debian 12
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
Pau reviewed it and acked it in chat. Merging now, as without this we will have broken nightly pyosmocom debian 12 packages.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/41379?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ia8ef3a0301aeaad4691c197ed780e86b497def4a
Gerrit-Change-Number: 41379
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 07 Nov 2025 14:15:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria, pespin.
Hello Jenkins Builder, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ci/+/41379?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: OBS: fix building pyosmocom for debian 12
......................................................................
OBS: fix building pyosmocom for debian 12
Related: pyosmocom I8416234ea02f337fabd075cc345af964c1b71adf
Related: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#licen…
Change-Id: Ia8ef3a0301aeaad4691c197ed780e86b497def4a
---
M scripts/obs/lib/srcpkg.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/79/41379/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/41379?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: Ia8ef3a0301aeaad4691c197ed780e86b497def4a
Gerrit-Change-Number: 41379
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/41379?usp=email )
Change subject: OBS: fix building pyosmocom for debian 12
......................................................................
OBS: fix building pyosmocom for debian 12
Related: pyosmocom I8416234ea02f337fabd075cc345af964c1b71adf
Related: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#licen…
Change-Id: Ia8ef3a0301aeaad4691c197ed780e86b497def4a
---
M scripts/obs/lib/srcpkg.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/79/41379/1
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index 1b31f84..6f15764 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -147,6 +147,18 @@
lib.run_cmd(["sh", "-e", script], cwd=repo_path)
+def prepare_project_pyosmocom():
+ """The format of the license field in pyproject.toml was changed from a
+ "table" to a a string with an SPDX license expression. The sources have
+ been adjusted to use the new format to appease a warning ("By 2026-Feb-18,
+ you need to update your project and remove deprecated calls or your builds
+ will no longer be supported."). However now the build fails with setuptools
+ from Debian 12. Remove the license line from pyproject.tml, the debian
+ packaging has its own license information in debian/copyright."""
+ repo_path = lib.git.get_repo_path("pyosmocom")
+ lib.run_cmd(["sed", "-i", "/^license = /d", "pyproject.toml"], cwd=repo_path)
+
+
def run_generate_build_dep(project):
"""Run contrib/generate_build_dep.sh if it exists in the given project, to
to download sources for dependencies (see e.g. osmo_dia2gsup.git)."""
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/41379?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: Ia8ef3a0301aeaad4691c197ed780e86b497def4a
Gerrit-Change-Number: 41379
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41365?usp=email )
Change subject: io_uring: Avoid extra reads if iofd becomes unregistered by user
......................................................................
io_uring: Avoid extra reads if iofd becomes unregistered by user
The user callback (read_cb, segmentation_cb, etc.) may decide to
unregister the iofd instead of closing it. In this scenario, we should
avoid calling the callback further until the iofd is registered again.
This is a backport of master branch commit
32efc324ce0b30280effef4860bb15588ecb1010.
Change-Id: I514412ecfbb82d32cb3d9c2272795ebac42f55e9
---
M src/core/osmo_io_uring.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index b8b240f..cfd72fd 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -189,10 +189,10 @@
if (rc > 0)
msgb_put(msg, rc);
- if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED))
iofd_handle_recv(iofd, msg, rc, msghdr);
- if (iofd->u.uring.read_enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED) && iofd->u.uring.read_enabled)
iofd_uring_submit_recv(iofd, msghdr->action);
else
iofd->u.uring.read_msghdr = NULL;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41365?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: osmith/1.11.3
Gerrit-Change-Id: I514412ecfbb82d32cb3d9c2272795ebac42f55e9
Gerrit-Change-Number: 41365
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>