Pyfa
Pyfa copied to clipboard
wxPython upgrade to 4.1.0
wxpython 4.1.0 has been released just yesterday and I am creating this issue to track any issues related to it. I am still through the process of fixing various bugs which can be fixed on our side, but some issues cannot be solved:
- crashes when loading some images (e.g. in wx built-in images which are used in character editor) on some Windows' "format" settings: https://github.com/wxWidgets/Phoenix/issues/1515
- given the impact, should hold off the upgrade until it is fixed
- ~vertical rulers in most of pyfa views: https://github.com/wxWidgets/Phoenix/issues/1609~
- progress dialogs are broken: https://github.com/wxWidgets/Phoenix/issues/1610
- can use GenericProgressDialog, if it takes too much time to fix it
- panels cannot change size after wx's panel init: https://github.com/wxWidgets/Phoenix/issues/1615
- StaticText returns the same size regardless of font size (fucks up our stats panels since smaller size font is used, and they become too wide): https://github.com/wxWidgets/Phoenix/issues/1617
I believe I have checked all the functionality to cope with stricter assertions of wxpython 4.1.0. Once listed bugs are ironed, we can switch to the new release, and work on hidpi support (tickets like #1225).
Don't mean to be rude - but why was this release with some nasty bugs?
If you are talking about wxpython
- could be just 1st release after series of major changes in both underlying wxwidgets
kit and wxpython
wrapper. The 1st issue in the list (with crash) is not new, however, it is present in 4.0.7post2 as well.
I am not expecting all of them to be fixed, but ways to work around them would be nice to have.
Another wxPython 4.1.0 problem is that
bmp.SetSize((bmp.GetWidth() // scale, bmp.GetHeight() // scale))
fails with:
pyfa v2.24.1
EVE Data Version: 1777281 (2020-07-28 11:14:33)
OS version: Darwin-19.5.0-x86_64-i386-64bit
Python version: 3.7.7 (default, Mar 10 2020, 15:43:33)
[Clang 11.0.0 (clang-1100.0.33.17)]
wxPython version: 4.1.0 (wxWidgets 3.1.4)
SQLAlchemy version: 1.3.18
Logbook version: 1.5.3
Requests version: 2.24.0
Dateutil version: 2.8.1
####################
Traceback (most recent call last):
File "pyfa.py", line 143, in <module>
mf = MainFrame(options.title)
File "/Users/sasha/Development/Projects/PyfaAT/gui/mainFrame.py", line 172, in __init__
self.additionsPane = AdditionsPane(self.fitting_additions_split, self)
File "/Users/sasha/Development/Projects/PyfaAT/gui/additionsPane.py", line 64, in __init__
self.drone = DroneView(self.notebook)
File "/Users/sasha/Development/Projects/PyfaAT/gui/builtinAdditionPanes/droneView.py", line 73, in __init__
Display.__init__(self, parent, style=wx.BORDER_NONE)
File "/Users/sasha/Development/Projects/PyfaAT/gui/display.py", line 44, in __init__
self.insertColumnBySpec(i, colName)
File "/Users/sasha/Development/Projects/PyfaAT/gui/display.py", line 123, in insertColumnBySpec
col = ViewColumn.getColumn(colSpec)(self, None)
File "/Users/sasha/Development/Projects/PyfaAT/gui/builtinViewColumns/maxRange.py", line 45, in __init__
self.imageId = fittingView.imageList.GetImageIndex(iconFile, "icons")
File "/Users/sasha/Development/Projects/PyfaAT/gui/cachingImageList.py", line 34, in GetImageIndex
bitmap = BitmapLoader.getBitmap(*loaderArgs)
File "/Users/sasha/Development/Projects/PyfaAT/gui/bitmap_loader.py", line 74, in getBitmap
bmp = cls.loadBitmap(name, location)
File "/Users/sasha/Development/Projects/PyfaAT/gui/bitmap_loader.py", line 108, in loadBitmap
bmp.SetSize((bmp.GetWidth() // scale, bmp.GetHeight() // scale))
wx._core.wxAssertionError: C++ assertion "GetHeight() == h" failed at /Users/robind/projects/bb2/dist-osx-py37/build/ext/wxWidgets/src/osx/core/bitmap.cpp(1380) in SetHeight(): Changing the bitmap height is not supported
wxpython 4.0 version 4.10 still not upstreamed on Debian or Ubuntu 23 sept 2020. It is marked that version 4.10 is available. I've got a sneaky feeling it will be done sometime after october as there probably still somethings to be ironed out.
@m-sasha : Bitmap.SetSize is not there to scale. Use Image.Scale. Changing bitmap sizes is gone, as it never made real sense (SetSize was an alias for SetWidth+SetHeight, but these did never touch the image data.)
https://docs.wxwidgets.org/3.1/classwx_bitmap.html#a0091921ee85f7444e846e6183ec64909
"This function is deprecated since version 3.1.2, dimensions and depth can only be set at construction time."
~~I would suggest to close this ticket. There's no point in having "meta tickets". Some of the tickets are no bugs anyway.~~ Sorry, thought this ticket is on wxPython.
Is there any blocking point for you?
Is there any blocking point for you?
Not yet. The only blocking point for me is my time. I began re-evaluating dependency upgrade, but got caught up in a hurricane of irl events, so will get back to it as soon as i have more spare time.
We finally did it: https://github.com/pyfa-org/Pyfa/releases/tag/v2.57.0dev1