wxPython 4.0.0b2 release

194 views
Skip to first unread message

Robin Dunn

unread,
Sep 19, 2017, 3:54:19 PM9/19/17
to wxpytho...@googlegroups.com, wxpyth...@googlegroups.com, wx-u...@googlegroups.com, wx-an...@googlegroups.com, Python-Ann...@python.org
Announcing wxPython 4.0.0b2
===========================

PyPI:   https://pypi.python.org/pypi/wxPython/4.0.0b2
Extras: https://extras.wxPython.org/wxPython4/extras/
Pip:    ``pip install wxPython==4.0.0b2``

Changes in this release include the following:

* Added a deprecated compatibility helper for wx.CustomDataFormat.

* Transfer ownership of the wx.EvtHandler object when pushing/popping
  them, and also for Set/RemoveEventHandler. (#443)

* Add missing wx.VScrolledWindow methods listed in the docs as
  deprecated but still present. (#441)

* Fixed copy/paste error in wx.BusyInfo.__exit__ (#449)

* Added new tool wxget, (a minimal wx implementation of wget)

* Added new tools wxdocs and wxdemos to launch the respective items,
  fetching and unpacking as required. (#437)

* Fixes to ensure that the locale message catalogs are included in the
  release files. (#464)

* Fix wx.ListCtrl.SetItemData to check that the data value is not out
  of the range of a C long. (#467)

* Changed the default port on *nix builds to be GTK3. The new
  ``--gtk2`` flag for build.py can be used to force a build for GTK2
  instead, and the ``--gtk3`` flag still exists, but defaults to True
  unless ``--gtk2`` is specified. Please note that there is currently
  no auto-detection of whether GTK3 is available or not, so if you
  know you need to build for GTK2 then you need to use the build flag,
  and there is currently no way to specify that flag for builds
  performed by pip. (#431)

* Fix parameter names in Toolbar.AddTool methods to be
  consistent. (#475)

* Remove inconsistent GetVirtualSize method in ScrolledWindow and let
  it be inherited from wx.Window instead. (#474)

* Fix crashing bug caused by importing a module that reinitializes the
  wxModule system after having imported wxpyTag. (#468)

* Fix missing methods in various DataObject classes. (They were
  actually accidentally marked "private" when they should have been
  public.) (#480)

* Add missing ListCtrl.DeleteAllColumns. (#486)

* Various fixes in the demo.

* Fixed improper initial scale factor in wx.lib.agw.speedmeter

* Fix for calls to wx.Notebook.HitTest calling the wrong instance
  (base class version) of the method. (#499)

* Add wx.Simplebook class.

* Fix exception in wx.lib.agw.customtreectrl when calling
  SortChildren. (#463, #500)

* Fix missing imports needed for drawing the legend in
  wx.lib.plot. (#503)

* Fix other instances of list.sort using old cmp-style ordering
  functions.  (#508)

* Update SizedControls to do a sanity check on the parent's sizer, as
  GetSizer can return None for SizedParent under certain
  circumstances, such as when AUI reparents the control during pane
  movement. (#523, #537)

* Added Vagrant configs for Fedora 23 and Fedora 26, and dropped
  Fedora 24.  Wheels built on F23 can also be used on F24 and F25, and
  F26 adds Python 3.6 support.

* Fix bitwise OR bug in wx.lib.agw.aui.framemanager. (#493)

* Fix bugs in wx.lib.plot when saving file. (#526)

* Fix integer division bug in ultimatelistctrl. (#528)

* Fix bug in wx.SearchCtrl.SetCancelBitmap (#532)

* Fixed property grid SetPropertyValue method to not truncate floating
  point values to integers, and a couple other possible incorrect
  conversions.  (#536)




What is wxPython?
-----------------

wxPython is a cross-platform GUI toolkit for the Python programming
language.  It allows Python programmers to create programs with a
robust, highly functional graphical user interface, simply and
easily. It is implemented as a set of Python extension modules that
wrap the GUI components of the popular wxWidgets cross platform
library, which is written in C++. Supported platforms are Microsoft
Windows, Mac OS X and macOS, and Linux or other unix-like systems with
GTK2 or GTK3 libraries. In most cases the native widgets are used on
each platform to provide a 100% native look and feel for the
application.


What is wxPython Phoenix?
-------------------------

wxPython's Project Phoenix is a new from-the-ground-up implementation
of wxPython, created with the intent of making wxPython “better,
stronger, faster than he was before.” In other words, this new
implementation is focused on improving speed, maintainability and
extensibility of wxPython, as well as removing most of the cruft that
had accumulated over the long life of Classic wxPython.

The project has been in development off and on, mostly behind the
scenes, for many years. For the past few years automated snapshot
builds have been available for those adventurous enough to try it, and
many people eventually started using the snapshots in their projects,
even for production releases.  While there are still some things on
the periphery that need to be completed, the core of the new wxPython
extension modules which wrap the wxWidgets code has been stable for a
long time now.

Due to some things being cleaned up, reorganized, simplified and
dehackified wxPython Phoenix is not completely backwards compatible
with wxPython Classic.  This is intended. In general, however, the API
differences tend to be minor and some applications can use Phoenix
with slight, or even no modifications.  In some other cases the
correct way to do things was also available in Classic and it's only
the wrong way that has been removed from Phoenix.  For more
information there is a Migration Guide document available at:
https://docs.wxpython.org/MigrationGuide.html

The new wxPython API reference documentation, including all
Python-specific additions and customizations, and docs for the wx.lib
package, is located at: https://docs.wxpython.org/


--
Robin Dunn
Software Craftsman
http://wxPython.org

Matt Newville

unread,
Sep 19, 2017, 8:28:36 PM9/19/17
to wxpytho...@googlegroups.com, wxpyth...@googlegroups.com, wx-u...@googlegroups.com, wx-an...@googlegroups.com, Python-Ann...@python.org
Hi Robin,

Thanks so much!  This is working well for me with Anaconda Python 3.6 and 2.7 on OSX (the only system I've tested so far), except that the new wxdocs and wxdemo (which look very, very handy) don't work for me.  First, I got

    ~>~/anaconda3/bin/pythonw ~/anaconda3/bin/wxdemo
    Traceback (most recent call last):
      File "/Users/Newville/anaconda3/bin/wxdemo", line 7, in <module>
        from wx.tools.wxget_docs_demo import demo_main
      File "/Users/Newville/anaconda3/lib/python3.6/site-packages/wx/tools/wxget_docs_demo.py", line 47, in <module>
        import wxget
    ModuleNotFoundError: No module named 'wxget'

I think that was probably meant to be `from . import wxget`.   Making that change I then get

    ~>~/anaconda3/bin/pythonw ~/anaconda3/bin/wxdemo
    sys.version_info(major=3, minor=6, micro=2, releaselevel='final', serial=0) 3.6.2 |Anaconda custom (x86_64)| (default, Jul 20 2017, 13:14:59)
    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] ['/Users/Newville/anaconda3/bin/wxdemo']
    Launch Demo for wxPython V4.0.0b2
    Looking for wxPython-demo-4.0.0b2 at /Users/Newville/Library/Application Support/wxPython
    Looking for cached /Users/Newville/Library/Application Support/wxPython/wxDocsDemoCache/4.0.0b2/wxPython-demo-4.0.0b2.tar.gz

and the Dialog with "Download Prompt" pops up asking if I want to download the demo tarball.  Hitting 'Yes' results in the traceback below, ending with

      File "/Users/Newville/anaconda3/lib/python3.6/ssl.py", line 688, in do_handshake
        match_hostname(self.getpeercert(), self.server_hostname)
      File "/Users/Newville/anaconda3/lib/python3.6/ssl.py", line 321, in match_hostname
        % (hostname, ', '.join(map(repr, dnsnames))))
    ssl.CertificateError: hostname 'extras.wxpython.org' doesn't match either of 'alldunn.com', 'www.alldunn.com'

When I go to that site in a regular browser I see "connection not secure" messages, as if https is not certified.  If I accept the risk and proceed anyway, it doesn't seem like the place I was looking for...

Hope that helps, and thanks very much!

--Matt
Full traceback:

Traceback (most recent call last):
  File "/Users/Newville/anaconda3/bin/wxdemo", line 11, in <module>
    sys.exit(demo_main())
  File "/Users/Newville/anaconda3/lib/python3.6/site-packages/wx/tools/wxget_docs_demo.py", line 159, in demo_main
    pd['Demo_Name'], pd['Ext'])
  File "/Users/Newville/anaconda3/lib/python3.6/site-packages/wx/tools/wxget_docs_demo.py", line 107, in get_item
    cached = wxget.download_file(url, cache, True)
  File "/Users/Newville/anaconda3/lib/python3.6/site-packages/wx/tools/wxget.py", line 101, in download_file
    url_res = urllib2.urlopen(url)
  File "/Users/Newville/anaconda3/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/Users/Newville/anaconda3/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/Users/Newville/anaconda3/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/Users/Newville/anaconda3/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/Users/Newville/anaconda3/lib/python3.6/urllib/request.py", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Users/Newville/anaconda3/lib/python3.6/urllib/request.py", line 1318, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/Users/Newville/anaconda3/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Users/Newville/anaconda3/lib/python3.6/http/client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Users/Newville/anaconda3/lib/python3.6/http/client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Users/Newville/anaconda3/lib/python3.6/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/Users/Newville/anaconda3/lib/python3.6/http/client.py", line 964, in send
    self.connect()
  File "/Users/Newville/anaconda3/lib/python3.6/http/client.py", line 1400, in connect
    server_hostname=server_hostname)
  File "/Users/Newville/anaconda3/lib/python3.6/ssl.py", line 401, in wrap_socket
    _context=self, _session=session)
  File "/Users/Newville/anaconda3/lib/python3.6/ssl.py", line 808, in __init__
    self.do_handshake()
  File "/Users/Newville/anaconda3/lib/python3.6/ssl.py", line 1061, in do_handshake
    self._sslobj.do_handshake()
  File "/Users/Newville/anaconda3/lib/python3.6/ssl.py", line 688, in do_handshake
    match_hostname(self.getpeercert(), self.server_hostname)
  File "/Users/Newville/anaconda3/lib/python3.6/ssl.py", line 321, in match_hostname
    % (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname 'extras.wxpython.org' doesn't match either of 'alldunn.com', 'www.alldunn.com'
 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
--Matt Newville <newville at cars.uchicago.edu> 630-252-0431

Robin Dunn

unread,
Sep 20, 2017, 12:49:18 PM9/20/17
to wxPyth...@googlegroups.com, wxpytho...@googlegroups.com

New issue filed at https://github.com/wxWidgets/Phoenix/issues/545


Matt Newville wrote:

Florian Höch

unread,
Nov 4, 2017, 9:02:29 AM11/4/17
to wxpytho...@googlegroups.com
Working great for me on macOS High Sierra, but under my old and trusty
OS X 10.6.8 install I get errors when trying to load bitmaps from PNG
files (I also had to install the 'xz' package using Homebrew to fix a
missing liblzma.5.dylib dependency).

Note I'm using wxPython 4.0.0rc1 below, but beta2 failed in the same way
previously.

Example (I'm using a PNG image out of address book app in this example
because that should be on any 10.6 system, but any other PNG image also
fails in the same way on my system):

import wx
app = wx.App(0)
f = wx.Frame(None)
b = wx.Bitmap('/Applications/Address
Book.app/Contents/Resources/AB16.png', wx.BITMAP_TYPE_PNG)
f.Show()
app.MainLoop()

Prints the following warnings:
Debug: Failed to load embedded PNG image for "wxART_ERROR"
Debug: Failed to load embedded PNG image for "wxART_ERROR"

And shows a dialog with following contents:
bad parameters to zlib
Couldn't load a PNG image - file is corrupted or not enough memory.
Failed to load image from file "/Applications/Address
Book.app/Contents/Resources/AB16.png".
no bitmap handler for type 15 defined.

When the frame is closed, I get a traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx/core.py",
line 2088, in MainLoop
rv = wx.PyApp.MainLoop(self)
wx._core.wxAssertionError: C++ assertion "icon.IsOk()" failed at
/Users/robind/projects/buildbots/macosx-vm6/dist-osx-py27/Phoenix/ext/wxWidgets/src/common/dcgraph.cpp(317)
in DoDrawIcon(): wxGCDC(cg)::DoDrawIcon - invalid icon


Above example works fine in wxPython 3.0.2 classic (cocoa) on the same
10.6 system.

--
Florian Höch

Matt Newville

unread,
Nov 4, 2017, 9:27:40 AM11/4/17
to wxpytho...@googlegroups.com
Hi Florian,

Mac OS 10.6 was released in 2009.  OSX 10.7 was released in 2011.  Supporting and developing wxPython seems to be enough of a burden on the tiny group of overworked developers.  Please do not expect anyone to waste their volunteer time supporting modern versions of wxPython on OS versions well past their end of life.  

If you have a system that you cannot upgrade past an 8-year-old OS, why isn't wxPython 3.0.2 good enough?



--
Florian Höch

Florian Höch

unread,
Nov 4, 2017, 11:07:27 AM11/4/17
to wxpytho...@googlegroups.com
Am 04.11.2017 um 14:27 schrieb Matt Newville:
> Mac OS 10.6 was released in 2009.  OSX 10.7 was released in 2011. 
> Supporting and developing wxPython seems to be enough of a burden on the
> tiny group of overworked developers.

I'm a developer myself, so I'm keenly aware of the issues trying to
support outdated platforms.

> Please do not expect anyone to
> waste their volunteer time supporting modern versions of wxPython on OS
> versions well past their end of life. 

I do not have any such expectations though. If OS X 10.6 is no longer
supported, that is completely fine by me.
>
> If you have a system that you cannot upgrade past an 8-year-old OS, why
> isn't wxPython 3.0.2 good enough?

It is, as far as I'm concerned.

Cheers,

Florian.
Reply all
Reply to author
Forward
0 new messages