python3-networkx: update to 3.6.

This commit is contained in:
Andrew J. Hesford
2025-12-06 10:53:05 -05:00
parent 2007cc974c
commit b0a7b70477
2 changed files with 3 additions and 38 deletions
@@ -1,35 +0,0 @@
Taken from https://github.com/networkx/networkx/pull/8096
From 05c7b527998dcc9077f704848e48538020e36098 Mon Sep 17 00:00:00 2001
From: Ross Barnowski <rossbar@caltech.edu>
Date: Tue, 3 Jun 2025 13:05:37 -0700
Subject: [PATCH] Fix gh-8091
---
networkx/generators/lattice.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/networkx/generators/lattice.py b/networkx/generators/lattice.py
index 95e520d2ce1..0617cd2bf7a 100644
--- a/networkx/generators/lattice.py
+++ b/networkx/generators/lattice.py
@@ -124,15 +124,15 @@ def grid_graph(dim, periodic=False):
>>> len(G)
6
"""
+ from collections.abc import Iterable
+
from networkx.algorithms.operators.product import cartesian_product
if not dim:
return empty_graph(0)
- try:
- func = (cycle_graph if p else path_graph for p in periodic)
- except TypeError:
- func = repeat(cycle_graph if periodic else path_graph)
+ periodic = repeat(periodic) if not isinstance(periodic, Iterable) else periodic
+ func = (cycle_graph if p else path_graph for p in periodic)
G = next(func)(dim[0])
for current_dim in dim[1:]:
+3 -3
View File
@@ -1,7 +1,7 @@
# Template file for 'python3-networkx'
pkgname=python3-networkx
version=3.5
revision=2
version=3.6
revision=1
build_style=python3-pep517
hostmakedepends="python3-setuptools python3-wheel"
depends="python3"
@@ -13,7 +13,7 @@ license="BSD-3-Clause"
homepage="https://networkx.org"
changelog="https://github.com/networkx/networkx/raw/main/doc/release/release_${version}.rst"
distfiles="${PYPI_SITE}/n/networkx/networkx-${version}.tar.gz"
checksum=d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037
checksum=285276002ad1f7f7da0f7b42f004bcba70d381e936559166363707fdad3d72ad
post_install() {
vlicense LICENSE.txt