Vlastimil Brom wrote:
Hi,
seeing this topic and some others regarding Phoenix, I'd like to ask,
what the appropriate process of handling phoenix bugs should look
like.
There is a Phoenix component at trac.wxwidgets.org that can be assigned to tickets. I'm a little behind on my wx mail lists though so following up with a mail to wxPython-dev after making a ticket would be a good idea.
In my case, there are rather random findings, as I am occasionally
trying to port some of my scripts to python 3(.3), which involves
experiments with the phoenix snapshot builds.
Lately, I noticed an obvious, easily fixable incompatibility with
python 3 in ListCtrl (unicode instead of the str builtin)
--- C:\Python33\Lib\site-packages\wx\core.py
+++ C:\Python33\Lib\site-packages\wx\core.py - UPDATED
@@ -2383 +2383 @@
- self.InsertItem(pos, unicode(entry[0]))
+ self.InsertItem(pos, str(entry[0]))
@@ -2385 +2385 @@
- self.SetItem(pos, i, unicode(entry[i]))
+ self.SetItem(pos, i, str(entry[i]))
The above fixes this problem apparently,
Almost. It still has to work in 2.7 where unicode() is different than str(). I've fixed it by using wx.lib.six.text_type instead.
but as this is a generated
file,the change should be made somewhere else,
Yep, it's in Phoenix/etg/listctrl.py
which is probably
beyond my skills, competence...
It should take just a basic understanding of the Phoenix process to see what is going on. In this case the Append method is a pure python function that is grafted on to the ListCtrl class, so the whole function body is there in the etg file:
c.addPyMethod('Append', '(self, entry)',
doc='''\
Append an item to the list control. The `entry` parameter should be a
sequence with an item for each column''',
body="""\
if len(entry):
from wx.lib.six import text_type
pos = self.GetItemCount()
self.InsertItem(pos, text_type(entry[0]))
for i in range(1, len(entry)):
self.SetItem(pos, i, text_type(entry[i]))
return pos
""")
Should these findings be reported to the wx tracker
like I did in this case:
wxTrac has been migrated to GitHub Issues - wxWidgets
or is there some other workflow preferred?
That is fine, but like I mentioned a followup message to wxPython-dev would be good so I know that it is there. Discussions that are perhaps not ready for a patch or bug report should happen on wxPython-dev also.
Is there some documentation available on which parts of the
wxPython-phoenix build are considered ready for testing and using (and
for which it makes sense to report bugs), or can it be inferred in
some way? Or are only the ported files included in the snapshot and
the others are currently missing?
(I noticed e.g. PyShell& co, which are likely not ported to python 3 yet)
If something is coming from an extension module then if it's there then you can assume (98%) that it's ready for use. For Python modules in the wx.lib or wx.py packages we have a simple system to mark which ones have received attention and how far along they are. The files will just have some tags added to the header to indicate what stage they are in. See ProjectPhoenix/LibraryMigration - wxPyWiki. Anybody who would like to help out with migrating the library or wx.py packages is very welcome.
···
--
Robin Dunn
Software Craftsman