[med-svn] [Git][med-team/python-leidenalg][master] 2 commits: syntax-warnings.patch: fix Python SyntaxWarning.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Fri Dec 6 18:50:35 GMT 2024



Étienne Mollier pushed to branch master at Debian Med / python-leidenalg


Commits:
9f0e8159 by Étienne Mollier at 2024-12-06T19:48:56+01:00
syntax-warnings.patch: fix Python SyntaxWarning.

Closes: #1085929

- - - - -
495b3397 by Étienne Mollier at 2024-12-06T19:50:11+01:00
d/changelog: ready for upload to unstable.

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/series
- + debian/patches/syntax-warnings.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+python-leidenalg (0.10.2-3) unstable; urgency=medium
+
+  * syntax-warnings.patch: fix Python SyntaxWarning. (Closes: #1085929)
+
+ -- Étienne Mollier <emollier at debian.org>  Fri, 06 Dec 2024 19:49:52 +0100
+
 python-leidenalg (0.10.2-2) unstable; urgency=medium
 
   * d/control: remove dependency on python3-pkg-resources. (Closes: #1083655)


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+syntax-warnings.patch


=====================================
debian/patches/syntax-warnings.patch
=====================================
@@ -0,0 +1,69 @@
+Description: SyntaxWarnings: Invalid escape sequences.
+ As seen at least with Python 3.13, a number of Python entities
+ descriptions are raising warnings, caught in pytest's summary:
+ .
+         leidenalg/VertexPartition.py:388
+           /build/reproducible-path/python-leidenalg-0.10.2/.pybuild/cpython3_3.13_leidenalg/build/leidenalg/VertexPartition.py:388: SyntaxWarning: invalid escape sequence '\m'
+             """ Implements modularity. This quality function is well-defined only for positive edge weights.
+ .
+         leidenalg/VertexPartition.py:761
+           /build/reproducible-path/python-leidenalg-0.10.2/.pybuild/cpython3_3.13_leidenalg/build/leidenalg/VertexPartition.py:761: SyntaxWarning: invalid escape sequence '\m'
+             """ Implements Reichardt and Bornholdt's Potts model with a configuration null model.
+ .
+         leidenalg/Optimiser.py:7
+           /build/reproducible-path/python-leidenalg-0.10.2/.pybuild/cpython3_3.13_leidenalg/build/leidenalg/Optimiser.py:7: SyntaxWarning: invalid escape sequence '\g'
+             """ Class for doing community detection using the Leiden algorithm.
+ .
+         leidenalg/Optimiser.py:305
+           /build/reproducible-path/python-leidenalg-0.10.2/.pybuild/cpython3_3.13_leidenalg/build/leidenalg/Optimiser.py:305: SyntaxWarning: invalid escape sequence '\s'
+             """ Optimise the given partitions simultaneously.
+ .
+ This change declares the classes and function descriptions as raw
+ strings, to avoid tripping the invalid escape sequence.
+
+Author: Étienne Mollier <emollier at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085929
+Forwarded: https://github.com/vtraag/leidenalg/pull/194
+Last-Update: 2024-12-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- python-leidenalg.orig/src/leidenalg/Optimiser.py
++++ python-leidenalg/src/leidenalg/Optimiser.py
+@@ -4,7 +4,7 @@
+ from math import log, sqrt
+ 
+ class Optimiser(object):
+-  """ Class for doing community detection using the Leiden algorithm.
++  r""" Class for doing community detection using the Leiden algorithm.
+ 
+   The Leiden algorithm [1] derives from the Louvain algorithm [2]. The Louvain
+   algorithm has an elegant formulation. It consists of two phases: (1) move
+@@ -302,7 +302,7 @@
+     return diff
+ 
+   def optimise_partition_multiplex(self, partitions, layer_weights=None, n_iterations=2, is_membership_fixed=None):
+-    """ Optimise the given partitions simultaneously.
++    r""" Optimise the given partitions simultaneously.
+ 
+     Parameters
+     ----------
+--- python-leidenalg.orig/src/leidenalg/VertexPartition.py
++++ python-leidenalg/src/leidenalg/VertexPartition.py
+@@ -385,7 +385,7 @@
+     return _c_leiden._MutableVertexPartition_weight_from_comm(self._partition, v, comm)
+ 
+ class ModularityVertexPartition(MutableVertexPartition):
+-  """ Implements modularity. This quality function is well-defined only for positive edge weights.
++  r""" Implements modularity. This quality function is well-defined only for positive edge weights.
+ 
+   Notes
+   -----
+@@ -758,7 +758,7 @@
+     return new_partition
+ 
+ class RBConfigurationVertexPartition(LinearResolutionParameterVertexPartition):
+-  """ Implements Reichardt and Bornholdt's Potts model with a configuration null model.
++  r""" Implements Reichardt and Bornholdt's Potts model with a configuration null model.
+   This quality function is well-defined only for positive edge weights.
+   This quality function uses a linear resolution parameter.
+ 



View it on GitLab: https://salsa.debian.org/med-team/python-leidenalg/-/compare/67a152e2dbd635e2e18e1bc6e67e77e59c0f5ac8...495b339792e5c6a232863e9f40a82cecad62a8d8

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-leidenalg/-/compare/67a152e2dbd635e2e18e1bc6e67e77e59c0f5ac8...495b339792e5c6a232863e9f40a82cecad62a8d8
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20241206/a9281159/attachment-0001.htm>


More information about the debian-med-commit mailing list