From ee797a3fc7066417e2a4586417f66fe7424c9918 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 21 Oct 2025 12:44:00 -0400 Subject: [PATCH 1/3] Increase CURRENT DEVELOPMENT ENVIRONMENT to Fedora 42 Signed-off-by: mulhern --- .github/workflows/main.yml | 5 +++-- .github/workflows/push.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14f3e67..a234ccd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,7 @@ jobs: task: make -f Makefile yamllint - dependencies: > bandit + libatomic monkeytype pylint python3-dbus @@ -44,7 +45,7 @@ jobs: - dependencies: python python3-build twine task: make -f Makefile package runs-on: ubuntu-latest - container: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT + container: fedora:42 # CURRENT DEVELOPMENT ENVIRONMENT steps: - uses: actions/checkout@v5 with: @@ -72,7 +73,7 @@ jobs: python3-hypothesis task: PYTHONPATH=./src make -f Makefile test runs-on: ubuntu-latest - container: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT + container: fedora:42 # CURRENT DEVELOPMENT ENVIRONMENT steps: - name: Install python3.12 run: > diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1aa8d90..ee61e4d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -15,7 +15,7 @@ jobs: monkeytype: runs-on: ubuntu-24.04 container: - image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT + image: fedora:42 # CURRENT DEVELOPMENT ENVIRONMENT steps: - name: Install dependencies for Fedora run: > From 38d56ff72cfa7bdbd49ee6a7000b1a83db15e800 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 21 Oct 2025 12:44:46 -0400 Subject: [PATCH 2/3] setup.cfg: Add python_requires >=3.12 Signed-off-by: mulhern --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 9a2d074..ebe7e8e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,6 +22,7 @@ classifiers = Topic :: Software Development :: Libraries :: Python Modules [options] +python_requires = >=3.12 install_requires = dbus-signature-pyparsing dbus-python>=1.2.10 From 015ab6afa1f091993d7258ea1a6c3a3b3c2c479e Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 21 Oct 2025 13:24:43 -0400 Subject: [PATCH 3/3] Add an addition test for empty dictionaries Signed-off-by: mulhern --- tests/test_hypothesis.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/test_hypothesis.py b/tests/test_hypothesis.py index dc812db..6272b80 100644 --- a/tests/test_hypothesis.py +++ b/tests/test_hypothesis.py @@ -155,6 +155,28 @@ class ParseTestCase(unittest.TestCase): Test parsing various signatures. """ + @given( + strategies.tuples( + dbus_signatures( + min_complete_types=1, + max_complete_types=1, + exclude_arrays=True, + exclude_dicts=True, + exclude_structs=True, + blacklist="v", + ), + dbus_signatures(min_complete_types=1, max_complete_types=1), + ) + ) + @settings(max_examples=5) + def test_empty_dict(self, strat): + """ + Test parsing an empty dict with a valid signature. + """ + (key_sig, value_sig) = strat + sig = f"{key_sig}{value_sig}" + self.assertEqual(signature(dbus.Dictionary(signature=sig)), "a{" + sig + "}") + @given( dbus_signatures( min_complete_types=1, max_complete_types=1, blacklist="h"