aboutsummaryrefslogtreecommitdiff
path: root/devel/py-memory-graph/files
diff options
context:
space:
mode:
Diffstat (limited to 'devel/py-memory-graph/files')
-rw-r--r--devel/py-memory-graph/files/patch-memory__graph____init__.py23
-rw-r--r--devel/py-memory-graph/files/patch-memory__graph__test__sequence.py40
-rw-r--r--devel/py-memory-graph/files/patch-pyproject.toml24
3 files changed, 87 insertions, 0 deletions
diff --git a/devel/py-memory-graph/files/patch-memory__graph____init__.py b/devel/py-memory-graph/files/patch-memory__graph____init__.py
new file mode 100644
index 000000000000..0f263030a9db
--- /dev/null
+++ b/devel/py-memory-graph/files/patch-memory__graph____init__.py
@@ -0,0 +1,23 @@
+# Fix graphviz Python library API compatibility
+#
+# The memory-graph library uses outdated graphviz API from older versions.
+# FreeBSD ports install py-graphviz 0.10.1 which changed the render() method:
+#
+# Old API (< 0.8): graph.render(outfile=..., quiet=..., quiet_view=...)
+# New API (>= 0.8): graph.render(filename=...)
+#
+# The 'quiet' and 'quiet_view' parameters were deprecated and removed.
+# This patch updates the API call to work with modern py-graphviz versions
+# while maintaining all core functionality.
+#
+--- memory_graph/__init__.py.orig 2025-10-04 12:21:39.453707000 -0700
++++ memory_graph/__init__.py 2025-10-04 12:21:44.778850000 -0700
+@@ -86,7 +86,7 @@
+ if outfile.endswith('.gv') or outfile.endswith('.dot'):
+ graph.save(filename=outfile)
+ else:
+- graph.render(outfile=outfile, view=view, cleanup=False, quiet=False, quiet_view=False)
++ graph.render(filename=outfile, view=view, cleanup=False)
+
+
+ def show(data, outfile=None, view=False, numbered = False):
diff --git a/devel/py-memory-graph/files/patch-memory__graph__test__sequence.py b/devel/py-memory-graph/files/patch-memory__graph__test__sequence.py
new file mode 100644
index 000000000000..5f044f19144d
--- /dev/null
+++ b/devel/py-memory-graph/files/patch-memory__graph__test__sequence.py
@@ -0,0 +1,40 @@
+# Fix pytest test collection conflict with helper function
+#
+# The function 'test_slicing(sequence, slicer)' starts with 'test_' so pytest
+# automatically collects it as a test function. However, it's actually a helper
+# function that takes parameters, which pytest interprets as fixtures.
+# Since these fixtures don't exist, pytest fails with "fixture not found".
+#
+# This helper function is meant to be called from test_sequence() with specific
+# arguments, not discovered and run independently by pytest.
+#
+# Solution: Rename to '_test_slicing()' (underscore prefix) so pytest ignores it
+# during auto-discovery, then update all calls to use the new name.
+#
+--- memory_graph/test_sequence.py.orig 2025-10-04 13:43:50.616552000 -0700
++++ memory_graph/test_sequence.py 2025-10-04 13:44:02.505010000 -0700
+@@ -10,7 +10,7 @@
+ return index[0]
+ return index
+
+-def test_slicing(sequence, slicer):
++def _test_slicing(sequence, slicer):
+ print(sequence)
+ print(slicer)
+ for i in sequence.indices_all():
+@@ -25,13 +25,13 @@
+ def test_sequence():
+ sequence = Sequence1D([i for i in range(8)])
+ slicer = Slicer(2,3)
+- test_slicing(sequence, slicer)
++ _test_slicing(sequence, slicer)
+
+ width = 5
+ height = 6
+ sequence = Sequence2D([[x+y*width for x in range(width)] for y in range(height)])
+ slicer = (Slicer(1,2), Slicer(2,1))
+- test_slicing(sequence, slicer)
++ _test_slicing(sequence, slicer)
+
+ if __name__ == '__main__':
+ test_sequence()
diff --git a/devel/py-memory-graph/files/patch-pyproject.toml b/devel/py-memory-graph/files/patch-pyproject.toml
new file mode 100644
index 000000000000..4cfcc6656821
--- /dev/null
+++ b/devel/py-memory-graph/files/patch-pyproject.toml
@@ -0,0 +1,24 @@
+# Fix pyproject.toml license field format for PEP 621 compliance
+#
+# The original pyproject.toml uses deprecated license field format:
+# license = "BSD-2-Clause"
+# license-files = ["LICENSE.txt"]
+#
+# Modern setuptools (used in pep517 builds) requires PEP 621 compliant format:
+# license = {text = "BSD-2-Clause"}
+#
+# This change enables successful pep517 builds by using the standard license
+# object format and removing the conflicting license-files field.
+#
+--- pyproject.toml.orig 2025-10-04 11:48:10.241408000 -0700
++++ pyproject.toml 2025-10-04 11:48:10.243444000 -0700
+@@ -9,8 +9,7 @@
+ authors = [
+ {name = "Bas Terwijn", email = "bterwijn@gmail.com"}
+ ]
+-license = "BSD-2-Clause"
+-license-files = ["LICENSE.txt"]
++license = {text = "BSD-2-Clause"}
+ readme = "README.md"
+ requires-python = ">=3.7"
+ classifiers = [