Control: tags 759077 + patch
Control: severity -1 serious
# Justification: blocks the on-going wxpython3.0 transition
I've rebuilt pyke with the attached patch and tested the "learn_pyke"
example, and it seems to work. And in fact, without creating a wx.App
object, it doesn't seem to work with wxpython 2.8.
I'm happy to NMU this change - just let me know if you'd like me to.
Cheers,
Olly
diff -Nru pyke-1.1.1/debian/changelog pyke-1.1.1/debian/changelog
--- pyke-1.1.1/debian/changelog 2014-09-01 09:12:00.000000000 +1200
+++ pyke-1.1.1/debian/changelog 2014-09-18 22:28:56.000000000 +1200
@@ -1,3 +1,11 @@
+pyke (1.1.1-4.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Update for wxPython 3.0 (Closes: #759077):
+ - New patch: 08_wxpython3.0.patch
+
+ -- Olly Betts <[email protected]> Thu, 18 Sep 2014 10:22:19 +0000
+
pyke (1.1.1-4) unstable; urgency=low
* Team upload.
diff -Nru pyke-1.1.1/debian/control pyke-1.1.1/debian/control
--- pyke-1.1.1/debian/control 2014-09-01 09:00:32.000000000 +1200
+++ pyke-1.1.1/debian/control 2014-09-18 20:54:27.000000000 +1200
@@ -8,7 +8,7 @@
python-nose,
python-ply (>= 3.4),
python-setuptools,
- python-wxgtk2.8,
+ python-wxgtk3.0,
rest2web,
Standards-Version: 3.9.5
X-Python-Version: >= 2.6
@@ -21,7 +21,7 @@
Depends: ${misc:Depends},
${python:Depends},
${python-ply:Depends}
-Suggests: python-wxgtk2.8
+Suggests: python-wxgtk3.0
Description: Prolog-inspired Python logic programming toolkit
Pyke introduces a form of Logic Programming (inspired by Prolog) to Python by
providing a knowledge-based inference engine (or "expert system").
diff -Nru pyke-1.1.1/debian/patches/08_wxpython3.0.patch pyke-1.1.1/debian/patches/08_wxpython3.0.patch
--- pyke-1.1.1/debian/patches/08_wxpython3.0.patch 1970-01-01 12:00:00.000000000 +1200
+++ pyke-1.1.1/debian/patches/08_wxpython3.0.patch 2014-09-18 22:42:04.000000000 +1200
@@ -0,0 +1,60 @@
+Description: Update for wxPython 3.0
+ These changes should remain compatible with wxPython 2.8.
+Author: Olly Betts <[email protected]>
+Bug-Debian: https://bugs.debian.org/759077
+Forwarded: no
+Last-Update: 2014-09-18
+
+Index: pyke-1.1.1/pyke/ask_wx.py
+===================================================================
+--- pyke-1.1.1.orig/pyke/ask_wx.py
++++ pyke-1.1.1/pyke/ask_wx.py
+@@ -67,12 +67,18 @@ def review_ans(dlg, ans, review=None):
+ msg = u'\n\n'.join(review_str for review_test, review_str in review
+ if matches(ans, review_test))
+ if msg:
++ global app
++ if app is None:
++ app = wx.App()
+ dlg2 = wx.MessageDialog(dlg, msg, 'Answer Information',
+ wx.OK | wx.ICON_INFORMATION)
+ dlg2.ShowModal()
+ dlg2.Destroy()
+
+ def get_answer(question, title, conv_fn=None, test=None, review=None):
++ global app
++ if app is None:
++ app = wx.App()
+ dlg = wx.TextEntryDialog(None, question, title, u'',
+ wx.CENTRE | wx.RESIZE_BORDER | wx.OK)
+ while True:
+@@ -98,6 +104,9 @@ def get_answer(question, title, conv_fn=
+ return ans
+
+ def ask_yn(question, review=None):
++ global app
++ if app is None:
++ app = wx.App()
+ dlg = wx.MessageDialog(None, question, 'User Question',
+ wx.YES_NO | wx.ICON_QUESTION)
+
+@@ -141,6 +150,9 @@ def ask_string(question, match=None, rev
+ review=review)
+
+ def ask_select_1(question, alternatives, review=None):
++ global app
++ if app is None:
++ app = wx.App()
+ dlg = wx.SingleChoiceDialog(None, question, u'User Question',
+ [msg for tag, msg in alternatives],
+ wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER |
+@@ -156,6 +168,9 @@ def ask_select_1(question, alternatives,
+ return ans
+
+ def ask_select_n(question, alternatives, review=None):
++ global app
++ if app is None:
++ app = wx.App()
+ #dlg = wx.lib.dialogs.MultiChoiceDialog(None, question, u'User Question',
+ # [msg for tag, msg in alternatives])
+ dlg = wx.MultiChoiceDialog(None, question, u'User Question',
diff -Nru pyke-1.1.1/debian/patches/series pyke-1.1.1/debian/patches/series
--- pyke-1.1.1/debian/patches/series 2014-09-01 08:42:14.000000000 +1200
+++ pyke-1.1.1/debian/patches/series 2014-09-18 22:28:45.000000000 +1200
@@ -5,3 +5,4 @@
05_do-not-use-embedded-ply.patch
06_remove-tracking-javascript-and-remote-images.patch
07_disable_check_tables.patch
+08_wxpython3.0.patch
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team