git: 42f6bc59ec05 - main - science/py-dwave-cloud-client: update 0.14.7 → 0.14.8

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 19 Sep 2026 22:42:31 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=42f6bc59ec0588c9c7ac92440478ca7cc42a21f1

commit 42f6bc59ec0588c9c7ac92440478ca7cc42a21f1
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-19 18:06:22 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-19 22:42:18 +0000

    science/py-dwave-cloud-client: update 0.14.7 → 0.14.8
---
 science/py-dwave-cloud-client/Makefile             | 11 ++++-
 science/py-dwave-cloud-client/distinfo             |  6 +--
 .../files/patch-tests_test__cli.py                 | 41 +++++++++++++++++++
 .../files/patch-tests_test__client.py              | 47 ++++++++++++++++++++++
 .../files/patch-tests_test__utils.py               | 32 +++++++++++++++
 5 files changed, 132 insertions(+), 5 deletions(-)

diff --git a/science/py-dwave-cloud-client/Makefile b/science/py-dwave-cloud-client/Makefile
index 70f3c9a7f6b4..e3e59da6369a 100644
--- a/science/py-dwave-cloud-client/Makefile
+++ b/science/py-dwave-cloud-client/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	dwave-cloud-client
-DISTVERSION=	0.14.7
+DISTVERSION=	0.14.8
 CATEGORIES=	science python www # quantum-computing
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -43,6 +43,13 @@ GH_ACCOUNT=	dwavesystems
 
 NO_ARCH=	yes
 
-TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_ENV=	${MAKE_ENV} \
+		HOME=${WRKDIR} \
+		PATH=${LOCALBASE}/bin:$${PATH} \
+		PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
+		XDG_CACHE_HOME=${WRKDIR}/.cache \
+		XDG_CONFIG_HOME=${WRKDIR}/.config
+
+# tests as of 0.14.8: 1721 tests, OK (skipped=323) in 73.041s
 
 .include <bsd.port.mk>
diff --git a/science/py-dwave-cloud-client/distinfo b/science/py-dwave-cloud-client/distinfo
index 3a0f19584f8f..4ad504d10ad2 100644
--- a/science/py-dwave-cloud-client/distinfo
+++ b/science/py-dwave-cloud-client/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1788794155
-SHA256 (dwavesystems-dwave-cloud-client-0.14.7_GH0.tar.gz) = 622cbfd228d9626dd42fd3bfd3f5a0eb13e03f12b1bc57d858990f06549a1160
-SIZE (dwavesystems-dwave-cloud-client-0.14.7_GH0.tar.gz) = 269011
+TIMESTAMP = 1789676447
+SHA256 (dwavesystems-dwave-cloud-client-0.14.8_GH0.tar.gz) = ed0773a80d8f30321ca53e2a5488eacb2f2a4d8aea21c96df2cf509c4161e995
+SIZE (dwavesystems-dwave-cloud-client-0.14.8_GH0.tar.gz) = 270102
diff --git a/science/py-dwave-cloud-client/files/patch-tests_test__cli.py b/science/py-dwave-cloud-client/files/patch-tests_test__cli.py
new file mode 100644
index 000000000000..2bc0cf237b94
--- /dev/null
+++ b/science/py-dwave-cloud-client/files/patch-tests_test__cli.py
@@ -0,0 +1,41 @@
+-- Adjust test expectations for the FreeBSD ports test environment.
+-- This skips network-dependent test cases and makes subprocess/cache tests use the active Python interpreter and runtime-resolved cache paths.
+-- Needed because the upstream test suite assumes network access and a `python` executable in PATH during `make test`.
+
+--- tests/test_cli.py.orig	2026-09-17 21:08:45 UTC
++++ tests/test_cli.py
+@@ -62,6 +62,8 @@ class TestConfigCreate(unittest.TestCase):
+                                   token="token", client=None, solver=None)),
+     ])
+     def test_create(self, name, extra_opts, inputs):
++        if extra_opts:
++            self.skipTest("requires network access")
+         config_file = 'path/to/dwave.conf'
+         profile = 'profile'
+ 
+@@ -84,6 +86,8 @@ class TestConfigCreate(unittest.TestCase):
+                                   endpoint="endpoint", token="token", client=None, solver=None)),
+     ])
+     def test_default_flows(self, name, extra_opts, inputs):
++        if extra_opts:
++            self.skipTest("requires network access")
+         runner = CliRunner()
+         with runner.isolated_filesystem():
+             with mock.patch("dwave.cloud.config.loaders.get_configfile_paths", lambda: ['dwave.conf']):
+@@ -122,6 +126,8 @@ class TestConfigCreate(unittest.TestCase):
+                                   token="token", client="base", solver="solver")),
+     ])
+     def test_update(self, name, extra_opts, inputs):
++        if extra_opts:
++            self.skipTest("requires network access")
+         config_file = 'dwave.conf'
+         profile = 'profile'
+ 
+@@ -724,6 +730,7 @@ class TestCacheCli(unittest.TestCase):
+         with contextlib.suppress(OSError):
+             self._tmpdir.cleanup()
+ 
++    @unittest.skip("requires network access")
+     def test_api_cache(self):
+         runner = CliRunner()
+ 
diff --git a/science/py-dwave-cloud-client/files/patch-tests_test__client.py b/science/py-dwave-cloud-client/files/patch-tests_test__client.py
new file mode 100644
index 000000000000..d5bdb25c3dff
--- /dev/null
+++ b/science/py-dwave-cloud-client/files/patch-tests_test__client.py
@@ -0,0 +1,47 @@
+-- Adjust test expectations for the FreeBSD ports test environment.
+-- This skips network-dependent test cases and makes subprocess/cache tests use the active Python interpreter and runtime-resolved cache paths.
+-- Needed because the upstream test suite assumes network access and a `python` executable in PATH during `make test`.
+
+--- tests/test_client.py.orig	2026-09-17 21:08:45 UTC
++++ tests/test_client.py
+@@ -668,13 +668,15 @@ class CacheConfiguration(unittest.TestCase):
+     """
+ 
+     @parameterized.expand([
+-        ("default", True, get_cache_dir()),
++        ("default", True, "<default-cache-dir>"),
+         ("disabled", False, None),
+         ("custom-home", True, cache_home),
+         ("disabled-via-home", False, None),
+     ])
+     @isolated_environ(empty=True)
+     def test_cache_from_config(self, profile, enabled, home):
++        if home == "<default-cache-dir>":
++            home = get_cache_dir()
+         with mock.patch("dwave.cloud.config.loaders.open", iterable_mock_open(self.config_body)):
+             with Client.from_config('config_file', profile=profile) as client:
+                 self.assertEqual(client.config.cache.enabled, enabled)
+@@ -683,11 +685,11 @@ class CacheConfiguration(unittest.TestCase):
+     @parameterized.expand([
+         ("default", {"DWAVE_CACHE_ENABLED": "0"}, False, None),
+         ("default", {"DWAVE_CACHE_HOME": "off"}, False, None),
+-        ("default", {"DWAVE_CACHE_HOME": "default"}, True, get_cache_dir()),
++        ("default", {"DWAVE_CACHE_HOME": "default"}, True, "<default-cache-dir>"),
+         ("default", {"DWAVE_CACHE_HOME": cache_home}, True, cache_home),
+-        ("disabled", {"DWAVE_CACHE_ENABLED": "1"}, True, get_cache_dir()),
++        ("disabled", {"DWAVE_CACHE_ENABLED": "1"}, True, "<default-cache-dir>"),
+         ("disabled", {"DWAVE_CACHE_HOME": cache_home}, False, cache_home),      # regular home value will not flip enabled
+-        ("disabled", {"DWAVE_CACHE_HOME": "default"}, True, get_cache_dir()),   # ... but sentinel will
++        ("disabled", {"DWAVE_CACHE_HOME": "default"}, True, "<default-cache-dir>"),   # ... but sentinel will
+         ("disabled", {"DWAVE_CACHE_HOME": cache_home, "DWAVE_CACHE_ENABLED": "true"}, True, cache_home),
+         ("custom-home", {"DWAVE_CACHE_HOME": "/tmp/"}, True, "/tmp/"),
+         ("disabled-via-home", {"DWAVE_CACHE_ENABLED": "1"}, False, None),       # home overrides
+@@ -695,6 +697,8 @@ class CacheConfiguration(unittest.TestCase):
+     ])
+     def test_cache_from_env_over_config(self, profile, env, enabled, home):
+         with isolated_environ(add=env, empty=True):
++            if home == "<default-cache-dir>":
++                home = get_cache_dir()
+             with mock.patch("dwave.cloud.config.loaders.open", iterable_mock_open(self.config_body)):
+                 with Client.from_config('config_file', profile=profile) as client:
+                     self.assertEqual(client.config.cache.enabled, enabled)
diff --git a/science/py-dwave-cloud-client/files/patch-tests_test__utils.py b/science/py-dwave-cloud-client/files/patch-tests_test__utils.py
new file mode 100644
index 000000000000..fa1fc45dd3d2
--- /dev/null
+++ b/science/py-dwave-cloud-client/files/patch-tests_test__utils.py
@@ -0,0 +1,32 @@
+-- Adjust test expectations for the FreeBSD ports test environment.
+-- This skips network-dependent test cases and makes subprocess/cache tests use the active Python interpreter and runtime-resolved cache paths.
+-- Needed because the upstream test suite assumes network access and a `python` executable in PATH during `make test`.
+
+--- tests/test_utils.py.orig	2026-09-17 21:08:45 UTC
++++ tests/test_utils.py
+@@ -22,6 +22,7 @@ import subprocess
+ import os
+ import sqlite3
+ import subprocess
++import sys
+ import tempfile
+ import textwrap
+ import time
+@@ -589,7 +590,7 @@ class TestCachedForking(unittest.TestCase):
+                 print("FAIL")
+         """)
+ 
+-        run = subprocess.run(f"echo '{program}' | python", shell=True, capture_output=True)
++        run = subprocess.run(f"echo '{program}' | {sys.executable}", shell=True, capture_output=True)
+ 
+         self.assertEqual(run.returncode, 0)
+         self.assertEqual(run.stdout.strip(), b'')
+@@ -615,7 +616,7 @@ class TestCachedForking(unittest.TestCase):
+                 print("FAIL")
+         """)
+ 
+-        run = subprocess.run(f"echo '{program}' | python", shell=True, capture_output=True)
++        run = subprocess.run(f"echo '{program}' | {sys.executable}", shell=True, capture_output=True)
+ 
+         self.assertEqual(run.returncode, 0)
+         self.assertEqual(run.stdout.strip(), b'')