From 7af34ed93cd25b83fa522067a5ab4c91d723968c Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Tue, 3 Jul 2018 08:13:53 -0700 Subject: [PATCH] graph-tool: use upstream Python 3.7 fix Closes #29705. Signed-off-by: ilovezfs --- Formula/graph-tool.rb | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/Formula/graph-tool.rb b/Formula/graph-tool.rb index 17fa0adae1..e5585332f7 100644 --- a/Formula/graph-tool.rb +++ b/Formula/graph-tool.rb @@ -28,8 +28,12 @@ class GraphTool < Formula depends_on "python" depends_on "scipy" - # Python 3.7 compat - patch :DATA + # Remove for > 2.27 + # Upstream commit from 3 Jul 2018 "Fix incompatibility with Python 3.7" + patch do + url "https://git.skewed.de/count0/graph-tool/commit/0407f41a.patch" + sha256 "6ff5d8729bc2dcad9fafe9f2417a60c10ad09d91ea76a3a48031c9171c57ba44" + end resource "Cycler" do url "https://files.pythonhosted.org/packages/c2/4b/137dea450d6e1e3d474e1d873cd1d4f7d3beed7e0dc973b06e8e10d32488/cycler-0.10.0.tar.gz" @@ -102,27 +106,3 @@ class GraphTool < Formula system "python3", "test.py" end end - -__END__ -diff --git a/src/graph_tool/draw/gtk_draw.py b/src/graph_tool/draw/gtk_draw.py -index 9f60075..c65bc32 100644 ---- a/src/graph_tool/draw/gtk_draw.py -+++ b/src/graph_tool/draw/gtk_draw.py -@@ -1182,7 +1182,7 @@ _window_list = [] - - def interactive_window(g, pos=None, vprops=None, eprops=None, vorder=None, - eorder=None, nodesfirst=False, geometry=(500, 400), -- update_layout=True, async=False, no_main=False, **kwargs): -+ update_layout=True, async_=False, no_main=False, **kwargs): - r""" - Display an interactive GTK+ window containing the given graph. - -@@ -1244,7 +1244,7 @@ def interactive_window(g, pos=None, vprops=None, eprops=None, vorder=None, - win.show_all() - _window_list.append(win) - if not no_main: -- if async: -+ if async_: - # just a placeholder for a proper main loop integration with gtk3 when - # ipython implements it - import IPython.lib.inputhook