Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pymol for openSUSE:Factory 
checked in at 2026-03-23 17:14:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pymol (Old)
 and      /work/SRC/openSUSE:Factory/.python-pymol.new.8177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pymol"

Mon Mar 23 17:14:00 2026 rev:18 rq:1341929 version:3.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pymol/python-pymol.changes        
2025-06-10 09:09:45.178515903 +0200
+++ /work/SRC/openSUSE:Factory/.python-pymol.new.8177/python-pymol.changes      
2026-03-23 17:15:32.195085423 +0100
@@ -1,0 +2,7 @@
+Mon Mar 23 04:08:26 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch support-new-biopython.patch:
+  * Avoid two biopython errors.
+- Run the testsuite for all versions of Python, not just the last one.
+
+-------------------------------------------------------------------

New:
----
  support-new-biopython.patch

----------(New B)----------
  New:
- Add patch support-new-biopython.patch:
  * Avoid two biopython errors.
----------(New E)----------

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

Other differences:
------------------
++++++ python-pymol.spec ++++++
--- /var/tmp/diff_new_pack.jaMKXh/_old  2026-03-23 17:15:34.847195723 +0100
+++ /var/tmp/diff_new_pack.jaMKXh/_new  2026-03-23 17:15:34.867196555 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pymol
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -28,10 +28,11 @@
 Release:        0
 Summary:        A Molecular Viewer
 License:        Python-2.0
-Group:          Productivity/Scientific/Chemistry
 URL:            https://pymol.org/
 Source0:        
https://github.com/schrodinger/pymol-open-source/archive/v%{version}/pymol-open-source-%{version}.tar.gz
 Patch0:         
https://github.com/schrodinger/pymol-open-source/pull/404.patch#/reproducible.patch
+# PATCH-FIX-UPSTREAM gh#schrodinger/pymol-open-source#458
+Patch1:         support-new-biopython.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module numpy-devel}
 BuildRequires:  %{python_module pip}
@@ -44,11 +45,11 @@
 %else
 BuildRequires:  gcc-c++
 %endif
+BuildRequires:  Mesa-libGL-devel
 BuildRequires:  glew-devel
 BuildRequires:  glm-devel
 BuildRequires:  libpng-devel
 BuildRequires:  libxml2-devel
-BuildRequires:  Mesa-libGL-devel
 BuildRequires:  mmtf-cpp-devel
 BuildRequires:  msgpack-cxx-devel
 BuildRequires:  netcdf-devel
@@ -62,8 +63,8 @@
 Provides:       pymol = %{version}
 %if %{with test}
 BuildRequires:  %{python_module Pillow}
-BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module PyQt6}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  Catch2-2-devel
 ## tests need recent biopython not available in Leap
 %if 0%{?sle_version} >= 150500 && 0%{?is_opensuse}
@@ -116,7 +117,7 @@
 ## succeeds when run separately, but fails when run after ..../api/viewing.py
 rm testing/tests/api/test_editing.py
 ## pymol -ckqy testing/testing.py --run all
-PYTHONPATH=%{buildroot}%{python_sitearch} python%{python_bin_suffix} -m pymol 
-ckqy testing/testing.py --offline --run all
+%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m pymol 
-ckqy testing/testing.py --offline --run all
 %endif
 
 %post

++++++ support-new-biopython.patch ++++++
>From 575ca59625944287c80675464d10cec343fc8a45 Mon Sep 17 00:00:00 2001
From: Thomas Holder <[email protected]>
Date: Sat, 31 May 2025 19:46:52 +0200
Subject: [PATCH] Eliminate two Biopython deprecation warnings

- Bio.pairwise2 has been deprecated
  -> Use Bio.Align.PairwiseAligner instead
- SeqRecord constructor: Using a string as the sequence is deprecated
  -> Convert to Seq

The changes are based on
https://github.com/speleo3/pymol-psico/blob/ae2b92c262bc/psico/seqalign.py
---
 modules/pymol/seqalign.py | 39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/modules/pymol/seqalign.py b/modules/pymol/seqalign.py
index d938a3978..45e4928a8 100644
--- a/modules/pymol/seqalign.py
+++ b/modules/pymol/seqalign.py
@@ -11,6 +11,25 @@
 
 from pymol import cmd, CmdException
 
+import functools
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+    import Bio.Align
+
+
[email protected]
+def _get_aligner_BLOSUM62() -> "Bio.Align.PairwiseAligner":
+    from Bio.Align import PairwiseAligner, substitution_matrices
+    blosum62 = substitution_matrices.load("BLOSUM62")
+    missing_codes = ''.join(set('JUO-.?').difference(blosum62.alphabet))
+    blosum62 = blosum62.select(blosum62.alphabet + missing_codes)
+    aligner = PairwiseAligner(internal_open_gap_score=-10,
+                              extend_gap_score=-.5,
+                              substitution_matrix=blosum62)
+    assert aligner.mode == "global"
+    return aligner
+
 
 def needle_alignment(s1, s2):
     '''
@@ -19,26 +38,16 @@ def needle_alignment(s1, s2):
     Does a Needleman-Wunsch Alignment of sequence s1 and s2 and
     returns a Bio.Align.MultipleSeqAlignment object.
     '''
-    from Bio import pairwise2
     from Bio.Align import MultipleSeqAlignment
     from Bio.SeqRecord import SeqRecord
-    try:
-        from Bio.Align import substitution_matrices
-    except ImportError:
-        from Bio.SubsMat.MatrixInfo import blosum62
-    else:
-        blosum62 = substitution_matrices.load("BLOSUM62")
-
-    def match_callback(c1, c2):
-        return blosum62.get((c1, c2), 1 if c1 == c2 else -4)
+    from Bio.Seq import Seq
 
-    alns = pairwise2.align.globalcs(s1, s2,
-            match_callback, -10., -.5,
-            one_alignment_only=True)
+    aligner = _get_aligner_BLOSUM62()
+    alns = aligner.align(s1, s2)
 
     a = MultipleSeqAlignment([])
-    s1 = SeqRecord(alns[0][0], id="s1")
-    s2 = SeqRecord(alns[0][1], id="s2")
+    s1 = SeqRecord(Seq(alns[0][0]), id="s1")
+    s2 = SeqRecord(Seq(alns[0][1]), id="s2")
     a.extend([s1, s2])
     return a
 

Reply via email to