Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-param for openSUSE:Factory 
checked in at 2026-08-11 17:15:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-param (Old)
 and      /work/SRC/openSUSE:Factory/.python-param.new.17972 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-param"

Tue Aug 11 17:15:32 2026 rev:39 rq:1370598 version:2.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-param/python-param.changes        
2026-06-28 21:07:59.617024818 +0200
+++ /work/SRC/openSUSE:Factory/.python-param.new.17972/python-param.changes     
2026-08-11 17:16:31.904510398 +0200
@@ -1,0 +2,6 @@
+Tue Aug 11 05:09:31 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch no-more-commonprefix.patch:
+  * Replace os.path.commonprefix usage with os.path.commonpath.
+
+-------------------------------------------------------------------

New:
----
  no-more-commonprefix.patch

----------(New B)----------
  New:
- Add patch no-more-commonprefix.patch:
  * Replace os.path.commonprefix usage with os.path.commonpath.
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-param.spec ++++++
--- /var/tmp/diff_new_pack.eg27VP/_old  2026-08-11 17:16:34.116604137 +0200
+++ /var/tmp/diff_new_pack.eg27VP/_new  2026-08-11 17:16:34.128604646 +0200
@@ -27,6 +27,8 @@
 Source100:      python-param-rpmlintrc
 # PATCH-FIX-OPENSUSE Ignore FutureWarning from pandas itself
 Patch0:         ignore-pandas-assignment-futurewarning.patch
+# PATCH-FIX-UPSTREAM gh#holoviz/param#1165
+Patch1:         no-more-commonprefix.patch
 BuildRequires:  %{python_module base >= 3.8}
 BuildRequires:  %{python_module hatch_vcs}
 BuildRequires:  %{python_module hatchling}
@@ -36,7 +38,6 @@
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest-asyncio}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Recommends:     python-jsonschema

++++++ no-more-commonprefix.patch ++++++
>From e124cb97a0f94977103247b619e4e22fcc83f0ea Mon Sep 17 00:00:00 2001
From: Steve Kowalik <[email protected]>
Date: Tue, 11 Aug 2026 15:03:16 +1000
Subject: [PATCH] Switch to os.path.commonpath

os.path.commonprefix has been deprecated for a few Python releases, and
finally removed as of Python 3.15. os.path.commonpath is the
replacement, switch to using it, and write a test to make certain there
was no behavior changes.
---
 param/_utils.py     |  6 +++---
 param/parameters.py |  2 +-
 tests/testutils.py  | 15 +++++++++++++++
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/param/_utils.py b/param/_utils.py
index ff4dade77..4ff58f652 100644
--- a/param/_utils.py
+++ b/param/_utils.py
@@ -544,10 +544,10 @@ def _abbreviate_paths(pathspec,named_paths):
     Given a dict of (pathname,path) pairs, removes any prefix shared by all 
pathnames.
     Helps keep menu items short yet unambiguous.
     """
-    from os.path import commonprefix, dirname, sep
+    from os.path import commonpath, dirname, sep
 
-    prefix = commonprefix([dirname(name)+sep for name in 
named_paths.keys()]+[pathspec])
-    return OrderedDict([(name[len(prefix):],path) for name,path in 
named_paths.items()])
+    prefix = commonpath([dirname(name)+sep for name in 
named_paths.keys()]+[pathspec])
+    return OrderedDict([(name[len(prefix)+1:],path) for name,path in 
named_paths.items()])
 
 
 def _to_datetime(x):
diff --git a/param/parameters.py b/param/parameters.py
index 504cab358..a7a3fcfdd 100644
--- a/param/parameters.py
+++ b/param/parameters.py
@@ -2846,7 +2846,7 @@ def update(self, path: str | PathLike[str] = t.cast("str 
| PathLike[str]", Undef
         self.default = self.objects[0] if self.objects else None
 
     def get_range(self) -> dict[str, str | PathLike]:
-        return _abbreviate_paths(self.path,super().get_range())
+        return _abbreviate_paths(self.path, super().get_range())
 
 
 class ListSelector(Selector):
diff --git a/tests/testutils.py b/tests/testutils.py
index 8012e8691..75014640a 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -1,8 +1,10 @@
 import datetime as dt
 import os
 
+from collections import OrderedDict
 from collections.abc import Iterable
 from functools import partial
+from tempfile import TemporaryDirectory
 
 import param
 import pytest
@@ -11,6 +13,7 @@
 from param.parameterized import bothmethod, Parameterized, ParameterizedABC
 from param._utils import (
     # ParamWarning,
+    _abbreviate_paths,
     _is_abstract,
     _is_mutable_container,
     concrete_descendents,
@@ -547,6 +550,18 @@ def test_concrete_descendents():
     }
 
 
+def test_abbreviate_paths():
+    ranges = OrderedDict()
+    expected = OrderedDict()
+    with TemporaryDirectory() as tempdir:
+        path = f"{tempdir}/*"
+        for filename in ("a.txt", "f.txt"):
+            fullpath = f"{tempdir}/{filename}"
+            ranges[fullpath] = fullpath
+            expected[filename] = fullpath
+    assert _abbreviate_paths(path, ranges) == expected
+
+
 # def test_concrete_descendents_same_name_warns():
 #     class X: pass
 #     class Y(X): pass

Reply via email to