Skip to content

Commit 42194f5

Browse files
tornariaclassabbyamp
authored andcommitted
python3-networkx: update to 3.5.
1 parent e0b28f3 commit 42194f5

2 files changed

Lines changed: 38 additions & 3 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Taken from https://github.com/networkx/networkx/pull/8096
2+
3+
From 05c7b527998dcc9077f704848e48538020e36098 Mon Sep 17 00:00:00 2001
4+
From: Ross Barnowski <rossbar@caltech.edu>
5+
Date: Tue, 3 Jun 2025 13:05:37 -0700
6+
Subject: [PATCH] Fix gh-8091
7+
8+
---
9+
networkx/generators/lattice.py | 8 ++++----
10+
1 file changed, 4 insertions(+), 4 deletions(-)
11+
12+
diff --git a/networkx/generators/lattice.py b/networkx/generators/lattice.py
13+
index 95e520d2ce1..0617cd2bf7a 100644
14+
--- a/networkx/generators/lattice.py
15+
+++ b/networkx/generators/lattice.py
16+
@@ -124,15 +124,15 @@ def grid_graph(dim, periodic=False):
17+
>>> len(G)
18+
6
19+
"""
20+
+ from collections.abc import Iterable
21+
+
22+
from networkx.algorithms.operators.product import cartesian_product
23+
24+
if not dim:
25+
return empty_graph(0)
26+
27+
- try:
28+
- func = (cycle_graph if p else path_graph for p in periodic)
29+
- except TypeError:
30+
- func = repeat(cycle_graph if periodic else path_graph)
31+
+ periodic = repeat(periodic) if not isinstance(periodic, Iterable) else periodic
32+
+ func = (cycle_graph if p else path_graph for p in periodic)
33+
34+
G = next(func)(dim[0])
35+
for current_dim in dim[1:]:

srcpkgs/python3-networkx/template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Template file for 'python3-networkx'
22
pkgname=python3-networkx
3-
version=3.4.2
4-
revision=2
3+
version=3.5
4+
revision=1
55
build_style=python3-pep517
66
hostmakedepends="python3-setuptools python3-wheel"
77
depends="python3"
@@ -13,7 +13,7 @@ license="BSD-3-Clause"
1313
homepage="https://networkx.org"
1414
changelog="https://github.com/networkx/networkx/raw/main/doc/release/release_${version}.rst"
1515
distfiles="${PYPI_SITE}/n/networkx/networkx-${version}.tar.gz"
16-
checksum=307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1
16+
checksum=d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037
1717

1818
post_install() {
1919
vlicense LICENSE.txt

0 commit comments

Comments
 (0)