In Python 3.10, a change[1] was implemented where extension functions
that take integer arguments will no longer silently accept non-integer
arguments (e.g., floats) that can only be converted to integers with a
loss of precision. This PR fixes most of these issues in the pure-Python
classes and demos by explicitly converting the parameters to int before
passing them to wxWidgets. There is loss of precision, but this was
happening before (automatically) anyway as most wxWidgets DeviceContext
functions operate using integers.
Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
too small on GTK3.
This is an example of the relevant exception:
Traceback (most recent call last):
File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
r.width = w
TypeError: 'float' object cannot be interpreted as an integer
Fixes#2038.
[1] https://bugs.python.org/issue37999
Like a ToggleButton, but with an associated "menu", a Window or Sizer which is shown/hidden when button is toggled. Includes methods for setting active and inactive fore/background colours.
* Tweak six a little, adding its license text since we'll only be distributing the module, fix the name of the dummy moves module, and add a PY33 constant since the change in memoryview affects our code.
* Update all modules already using the old wx2to3
* Tweak lots of unit tests and other modules to work with Python 3.3 (still a few more that will need some work.)
* Try to deal with memoryview changes in Py3.3, without much luck...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
- Do not generate module-level inheritance diagrams anymore;
- Correct a few ReST typos in `newevent.py`, `expando.py` and `buttons`;
- Include a toctree ReST reference to `classic_vs_phoenix.txt` in the `MigrationGuide.txt` document, to stop Sphinx complaining about it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
- Phoenix-port of `wx.lib.buttons.py`, with unittest and documentation updated to Phoenix standards;
- Phoenix-port of part of the AGW library, including `AdvancedSplash`, `BalloonTip`, `ButtonPanel`, `CubeColourDialog`, `CustomTreeCtrl`, `FloatSpin`, `FoldPanelBar`, `FourWaySplitter`, `GenericMessageDialog`, `HyperLinkCtrl` and `HyperTreeList`. Unittests and documentation updated to Phoenix standards;
- Added the `wx2to3.py` module to `wx.lib`, to facilitate the port to Python 3 (AGW depends on it).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775