wxPython 4.0.0a3

Announcing wxPython 4.0.0a3

···

===========================

https://pypi.python.org/pypi/wxPython/4.0.0a3

Changes
-------

Fixed a few cases where the GIL was not acquired before building
tuples of values. The problems associated with this (hangs or crashes)
were sporadic and seemingly random, and did not appear until there was
a background thread that was very busy. Running under a debug build of
Python revealed the problem almost immediately. Yay Python!

Return an integer value from wx.DC.GetHandle instead of a wrapped
voidptr object, similar to how it is done for wx.Window.GetHandle.

Make wx.TreeItemID hashable, with meaningful hash value and equality
operators, so it can be used as a dictionary key in Py3.

Fixed crash in wx.grid.GridTable.GetAttr, and potentially other cases
of classes derived from wx.RefCounter.

Add ShowPage and IsRunning methods to wx.adv.Wizard.

Fixed various GTK specific bugs and other cleanup in wx.lib.agw.aui.

Updated to SIP 4.19.2

Restored builders for Python 3.4 to the buildbot.

Restore the wrappers for GetPaperSize and SetPaperSize to
wx.PrintData.

Fix crashing problem when a wx.TreeItemId was compared with None.

Fix for missing checkbox images in CheckListCtrlMixin on Linux and
OSX.

Fix another crashing problem in propgrid, and a few other propgrid
issues too.

The release version of the documentation can now be found at
https://docs.wxPython.org/ The documentation created during the
snapshot builds is still located at https://wxPython.org/Phoenix/docs/html

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

would not build here. Has anyone been successful at building?

must a great soft to run with Boa Constructor 0.7 !

Checking for '/P/zus/wxPython-4.0.0a3/build/wxbld/wx-config' : yes
'configure' finished successfully (0.856s)

[623/851] cxx: sip/cpp/sip_html2wxWebView.cpp -> build/waf/2.7/sip/cpp/sip_html2wxWebView.cpp.17.o

../../../sip/cpp/sip_html2cmodule.cpp:386:4: error: ‘wxWebView’ in namespace ‘::’ does not name a type
   ::wxWebView* sipVH__html2_21(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, ::wxWindow*parent, ::wxWindowID id,const ::wxString& url,const ::wxPoint& pos,const ::wxSize& size,long style,const ::wxString& name)
     ^~~~~~~~~
../../../sip/cpp/sip_html2cmodule.cpp:396:4: error: ‘wxWebView’ in namespace ‘::’ does not name a type
   ::wxWebView* sipVH__html2_20(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod)
     ^~~~~~~~~

It looks like you were probably missing the webkit development package when wxWidgets was built. Unfortunately, wxPython 4 isn't very configurable when it comes to missing dependencies of wxWidgets. So, for now I think installing the webkit development package on your distribution should resolve the problem. You'll have to rebuild the whole thing again probably.

Scott

···

On Mon, 5 Jun 2017, firefox@firemail.cc wrote:

Checking for '/P/zus/wxPython-4.0.0a3/build/wxbld/wx-config' : yes
'configure' finished successfully (0.856s)

[623/851] cxx: sip/cpp/sip_html2wxWebView.cpp -> build/waf/2.7/sip/cpp/sip_html2wxWebView.cpp.17.o ../../../sip/cpp/sip_html2cmodule.cpp:386:4: error: ‘wxWebView’ in namespace ‘::’ does not name a type
::wxWebView* sipVH__html2_21(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, ::wxWindow*parent, ::wxWindowID id,const ::wxString& url,const ::wxPoint& pos,const ::wxSize& size,long style,const ::wxString& name)
   ^~~~~~~~~
../../../sip/cpp/sip_html2cmodule.cpp:396:4: error: ‘wxWebView’ in namespace ‘::’ does not name a type
::wxWebView* sipVH__html2_20(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod)
   ^~~~~~~~~

firefox@firemail.cc wrote:

would not build here. Has anyone been successful at building?

must a great soft to run with Boa Constructor 0.7 !

Checking for '/P/zus/wxPython-4.0.0a3/build/wxbld/wx-config'
                        : yes
'configure' finished successfully (0.856s)

[623/851] cxx: sip/cpp/sip_html2wxWebView.cpp ->
build/waf/2.7/sip/cpp/sip_html2wxWebView.cpp.17.o
../../../sip/cpp/sip_html2cmodule.cpp:386:4: error: ‘wxWebView’ in
namespace ‘::’ does not name a type
  ::wxWebView* sipVH__html2_21(sip_gilstate_t sipGILState,
sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf,
PyObject *sipMethod, ::wxWindow*parent, ::wxWindowID id,const
::wxString& url,const ::wxPoint& pos,const ::wxSize& size,long
style,const ::wxString& name)
    ^~~~~~~~~
../../../sip/cpp/sip_html2cmodule.cpp:396:4: error: ‘wxWebView’ in
namespace ‘::’ does not name a type
  ::wxWebView* sipVH__html2_20(sip_gilstate_t sipGILState,
sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf,
PyObject *sipMethod)
    ^~~~~~~~~

You probably don't have the lib and development packages for webkitgtk
or webkitgtk3 installed. If those packages are not installed then the
wxWidgets part of the build is disabling the C++ classes for it, but
wxPython currently is not able to deal with missing features. (It's on
the TODO list however, just needs some time to implement a good workaround.)

···

--
Robin Dunn
Software Craftsman

[623/851] cxx: sip/cpp/sip_html2wxWebView.cpp ->
build/waf/2.7/sip/cpp/sip_html2wxWebView.cpp.17.o
../../../sip/cpp/sip_html2cmodule.cpp:386:4:

error: ‘wxWebView’ in namespace ‘::’ does not name a type

You probably don't have the lib and development packages for webkitgtk
or webkitgtk3 installed. If those packages are not installed then the
wxWidgets part of the build is disabling the C++ classes for it, but
wxPython currently is not able to deal with missing features. (It's on
the TODO list however, just needs some time to implement a good workaround.)

Indeed ! Thanks, now it works. Installed wxwidgets from sources + wxpython

Boa Constructor is mostly fine with it !

Installed wxwidgets from sources + wxpython

Boa Constructor is mostly fine with it !

but the "guide" example which is mentioned here: Boa Constructor - wxPyWiki
now breaks. some other example-demos do still work though.
well, well.

Good stuff, this sounds related to a problem I was having and was
basically the only thing that kept me from switching to Phoenix entirely.

It's great to see the Phoenix rising :slight_smile:

Florian.

···

Am 05.06.2017 um 05:17 schrieb Robin Dunn:

Fixed a few cases where the GIL was not acquired before building
tuples of values. The problems associated with this (hangs or crashes)
were sporadic and seemingly random, and did not appear until there was
a background thread that was very busy. Running under a debug build of
Python revealed the problem almost immediately. Yay Python!

Thanks, Robin. This fixed a major one for me, I was seeing that
GetAttr call allocating sometimes 20-30 GB of memory and then seg
faulting. I'd been trying to chase it sporadically for over a year...

···

On Sun, Jun 4, 2017 at 8:17 PM, Robin Dunn <robin@alldunn.com> wrote:

Announcing wxPython 4.0.0a3

Fixed crash in wx.grid.GridTable.GetAttr, and potentially other cases
of classes derived from wx.RefCounter.

I On Sunday, June 4, 2017 at 8:17:09 PM UTC-7, Robin Dunn wrote:

Announcing wxPython 4.0.0a3

===========================

https://pypi.python.org/pypi/wxPython/4.0.0a3

I built the latest sources using python3.4.

When I run python3 and do “import wx”, I get the following error:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib64/python3.4/site-packages/wx/init.py”, line 17, in
from wx.core import *
ImportError: No module named ‘wx.core’

There’s no core.py installed:
$ ls /usr/lib64/python3.4/site-packages/wx/core.py
ls: cannot access /usr/lib64/python3.4/site-packages/wx/core.py: No such file or directory

I don’t find core.py in the build tree. There is wx/core.pyi.

Am I building something incorrectly?

Michael Eager wrote:

I On Sunday, June 4, 2017 at 8:17:09 PM UTC-7, Robin Dunn wrote:

Announcing wxPython 4.0.0a3

===========================

https://pypi.python.org/pypi/wxPython/4.0.0a3

I built the latest sources using python3.4.

When
I run python3 and do “import wx”, I get the following error:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib64/python3.4/site-packages/wx/init.py”, line 17, in
from wx.core import *
ImportError: No module named ‘wx.core’

There’s no core.py installed:
$ ls /usr/lib64/python3.4/site-packages/wx/core.py
ls: cannot access /usr/lib64/python3.4/site-packages/wx/core.py: No such file or directory

I
don’t find core.py in the build tree. There is wx/core.pyi.

Am
I building something incorrectly?

Possibly. What commands are you using to do the build and install?

Somebody has mentioned in the past that there could be some confusion on
some distros about /usr/lib vs. /usr/lib64 so you may want to check in /usr/lib/python3.4 and see if some of the files got put there by mistake.

Another option would be to keep the system python clean (install only packages from the system repositories there) and build your wxPython as a
wheel and install that wheel either in a virtual environment or in a non-system build of Python.

···


Robin Dunn

Software Craftsman

http://wxPython.org

Michael Eager wrote:

I On Sunday, June 4, 2017 at 8:17:09 PM UTC-7, Robin Dunn wrote:

Announcing wxPython 4.0.0a3

===========================

https://pypi.python.org/pypi/wxPython/4.0.0a3

I built the latest sources using python3.4.

When
I run python3 and do “import wx”, I get the following error:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib64/python3.4/site-packages/wx/init.py”, line 17, in
from wx.core import *
ImportError: No module named ‘wx.core’

There’s no core.py installed:
$ ls /usr/lib64/python3.4/site-packages/wx/core.py
ls: cannot access /usr/lib64/python3.4/site-packages/wx/core.py: No such file or directory

I
don’t find core.py in the build tree. There is wx/core.pyi.

Am
I building something incorrectly?

Possibly. What commands are you using to do the build and install?

I followed the github instructions:

$ python3 build.py 3.4 clean
$ python3 build.py 3.4 dox
$ python3 build.py 3.4 etg
$ python3 build.py 3.4 sip
$ python3 build.py 3.4 build
$ sudo python3 build.py 3.4 install

(I also tried these combined.)

Somebody has mentioned in the past that there could be some confusion on
some distros about /usr/lib vs. /usr/lib64 so you may want to check in /usr/lib/python3.4 and see if some of the files got put there by mistake.

I checked /usr/lib/python3.4/site-packages. There are packages there, but not wx.

There is a /usr/lib64/python3.4/site-packages/wx/core.pyi. I don’t know what the pyi extension means. It looks like a regular .py file.

Another option would be to keep the system python clean (install only packages from the system repositories there) and build your wxPython as a
wheel and install that wheel either in a virtual environment or in a non-system build of Python.

What do you mean “build as a wheel”?

···

On Tuesday, June 27, 2017 at 3:03:32 PM UTC-7, Robin Dunn wrote:

Hello,

I've built wxpython-phoenix for ubuntu 14.04 (3.4) and 16.04 (3.5).
Try this link

https://sourceforge.net/projects/pcpu/files/Python%203.5%20xenial%20amd64/
https://sourceforge.net/projects/pcpu/files/Python%203.4%20trusty%20amd64/

Philippe

···

Le Tue, 27 Jun 2017 17:50:59 -0700 (PDT), Michael Eager <eager.mike@gmail.com> a écrit :

On Tuesday, June 27, 2017 at 3:03:32 PM UTC-7, Robin Dunn wrote:
>
> Michael Eager wrote:
>
> I On Sunday, June 4, 2017 at 8:17:09 PM UTC-7, Robin Dunn wrote:
>>
>> Announcing wxPython 4.0.0a3
>> ===========================
>>
>> wxPython · PyPI
>>
>> I built the latest sources using python3.4.
>
> When I run python3 and do "import wx", I get the following error:
> >>> import wx
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib64/python3.4/site-packages/wx/__init__.py", line
> 17, in <module>
> from wx.core import *
> ImportError: No module named 'wx.core'
>
> There's no core.py installed:
> $ ls /usr/lib64/python3.4/site-packages/wx/core.py
> ls: cannot access /usr/lib64/python3.4/site-packages/wx/core.py: No
> such file or directory
>
> I don't find core.py in the build tree. There is wx/core.pyi.
>
> Am I building something incorrectly?
>
>
> Possibly. What commands are you using to do the build and install?
>

I followed the github instructions:

$ python3 build.py 3.4 clean
$ python3 build.py 3.4 dox
$ python3 build.py 3.4 etg
$ python3 build.py 3.4 sip
$ python3 build.py 3.4 build
$ sudo python3 build.py 3.4 install

(I also tried these combined.)

>
> Somebody has mentioned in the past that there could be some
> confusion on some distros about /usr/lib vs. /usr/lib64 so you may
> want to check in /usr/lib/python3.4 and see if some of the files
> got put there by mistake.

I checked /usr/lib/python3.4/site-packages. There are packages
there, but not wx.

There is a /usr/lib64/python3.4/site-packages/wx/core.pyi. I don't
know what the pyi extension means. It looks like a regular .py
file.

>
> Another option would be to keep the system python clean (install
> only packages from the system repositories there) and build your
> wxPython as a wheel and install that wheel either in a virtual
> environment or in a non-system build of Python.
>

What do you mean "build as a wheel"?

Hello,

For Robin

I have a problem with the Imagebutton (wxpython 4.0.0a3)

I've tested on
ubuntu 14.04 and 16.04 64 bits
windows seven and ten.
python3.4 3.5 3.6

click on this link
https://www.dropbox.com/s/qxavwtfc9dh4iw1/error.png?dl=0

error: argument 3 has unexpected type 'Bitmap'

object wx._core.Bitmap passed
sip const ::wxBitmap& needed

Thanks a lot

Philippe

Hello,

I’ve built wxpython-phoenix for ubuntu 14.04 (3.4) and 16.04 (3.5).

Try this link

https://sourceforge.net/projects/pcpu/files/Python%203.5%20xenial%20amd64/

https://sourceforge.net/projects/pcpu/files/Python%203.4%20trusty%20amd64/

Philippe

Thanks. I’m running CentOS, not Ubuntu.

philippe dalet wrote:


Hello,
For Robin
I have a problem with the Imagebutton (wxpython 4.0.0a3)
I've tested on
ubuntu 14.04 and 16.04 64 bits
windows seven and ten.
python3.4 3.5 3.6
click on this link
error: argument 3 has unexpected type 'Bitmap'
object wx._core.Bitmap passed
sip const ::wxBitmap& needed

Please
make a runnable, small as possible, sample application that demonstrates the problem.

Also, this would be a different problem, but it looks like you’ve forgotten about the validator arg between the style and name args.

···

https://www.dropbox.com/s/qxavwtfc9dh4iw1/error.png?dl=0http://wiki.wxpython.org/MakingSampleApps

Robin Dunn

Software Craftsman

http://wxPython.org

Michael Eager wrote:

Possibly. What commands are you using to do the build and install?

I
followed the github instructions:

$ python3 build.py 3.4 clean
$ python3 build.py 3.4 dox
$ python3 build.py 3.4 etg
$ python3 build.py 3.4 sip
$ python3 build.py 3.4
build
$ sudo python3 build.py 3.4 install

(I also tried these
combined.)

Somebody has mentioned in the past that there could be some confusion on
some distros about /usr/lib vs. /usr/lib64 so you may want to check in /usr/lib/python3.4 and see if some of the files got put there by mistake.

I checked /usr/lib/python3.4/site-packages. There are packages there, but not wx.

There
is a /usr/lib64/python3.4/site-packages/wx/core.pyi. I don’t know what
the pyi extension means. It looks like a regular .py file.

.pyi files are a newish Python standard, they are meant for providing extra information about a module’s contents that may not be able to gleaned from the actual code itself, (such as type hints, expanded docstrings, etc.) and is especially useful for providing info about the contents of extension modules since they can’t be introspected nearly as
much as pure Python code. They will be used by tools such as IDEs or code analysis tools.

Another option would be to keep the system python clean (install only packages from the system repositories there) and build your wxPython as a
wheel and install that wheel either in a virtual environment or in a non-system build of Python.

What do you mean “build as a wheel”?

A Python wheel is the next generation of packaging and distribution format for Python packages, and it’s installable by pip. You can create one for wxPython with the bdist_wheel build.py command instead of the install command. The result will be put in the dist subfolder.
There are wheels of the recent wxPython 4 releases for CentOS 7 and a few other linuxes here: .

···

https://wheel.readthedocs.io/en/latest/

Thanks. I’m running CentOS, not Ubuntu.

https://wxpython.org/Phoenix/release-extras/linux


Robin Dunn

Software Craftsman

http://wxPython.org