From 36c20968135aa37a1a198074a2095eb5fd10bc18 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 19 Nov 2020 12:25:48 -0800 Subject: [PATCH 1/7] Set (hopeful) release date --- CHANGES.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5ddddaf4..c062f611 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,13 +8,13 @@ wxPython Changelog ================== -4.1.1 ------ -* (unreleased) +4.1.1 "An attitude of gratitude" +-------------------------------- +* 21-Nov-2020 -PyPI: https://pypi.python.org/pypi/wxPython/4.1.0 +PyPI: https://pypi.python.org/pypi/wxPython/4.1.1 Extras: https://extras.wxPython.org/wxPython4/extras/ -Pip: ``pip install wxPython==4.1.0`` +Pip: ``pip install wxPython==4.1.1`` New and improved in this release: @@ -81,8 +81,8 @@ New and improved in this release: * Added the missing context manager methods for wx.LogNull. (#1842) -* Refactored ScrolledThumbnail out of agw.ThumbnailCtrl so as to be usable - outside of ThumbnailCtrl. +* Refactored ScrolledThumbnail out of agw.ThumbnailCtrl so as to be usable + outside of ThumbnailCtrl. From 9076f1ddd00decbe923793b665e6ad4ab1342a86 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 20 Nov 2020 12:54:53 -0800 Subject: [PATCH 2/7] Remove alpha tag --- buildtools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/version.py b/buildtools/version.py index 61478f1f..63302bba 100644 --- a/buildtools/version.py +++ b/buildtools/version.py @@ -26,7 +26,7 @@ VER_MAJOR = 4 VER_MINOR = 1 VER_RELEASE = 1 -VER_FLAGS = "a1" # wxPython release flags +VER_FLAGS = "" # wxPython release flags # The VER_FLAGS value is appended to the version number constructed from the # first 3 components and should be set according to the following patterns. From 5375f3dacfc95a59c637cf42af97a2bd9e2f68ba Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 20 Nov 2020 16:13:10 -0800 Subject: [PATCH 3/7] Update ANNOUNCE.txt --- packaging/ANNOUNCE.txt | 140 +++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 81 deletions(-) diff --git a/packaging/ANNOUNCE.txt b/packaging/ANNOUNCE.txt index 2ca25254..9a563b3a 100644 --- a/packaging/ANNOUNCE.txt +++ b/packaging/ANNOUNCE.txt @@ -9,109 +9,87 @@ -Announcing wxPython 4.1.0 +Announcing wxPython 4.1.1 ========================= -PyPI: https://pypi.org/project/wxPython/4.1.0 +PyPI: https://pypi.org/project/wxPython/4.1.1 Extras: https://extras.wxPython.org/wxPython4/extras/ -Pip: ``pip install wxPython==4.1.0`` - -Starting with this release wxPython has switched to tracking the -wxWidgets master branch (version 3.1.x) for the wxWidgets source code, -which wxPython is built upon, and which is included in the wxPython -source archives. - -This will be the last release to include binaries for Python 2.7. The -code will likely still compile and be compatible with Python 2.7 for -some time, but no effort will be put into keeping it that way. - +Pip: ``pip install wxPython==4.1.1`` New and improved in this release: -* Add a sample for wx.Font.AddPrivateFont to the demo. +* This should have been mentioned in the notes for the last release, + but alas, it wandered away and got lost. wxWidgets is now validating + the flags passed when adding items to a sizer, to ensure that they + are the correct flags for the type of the sizer. If the given flags + do not make sense, for example using horizontal alignment flags in a + horizontal box sizer, then a wxAssertionError error is raised. -* Added wrappers for the OSXEnableAutomaticQuoteSubstitution, - OSXEnableAutomaticDashSubstitution, and - OSXDisableAllSmartSubstitutions methods in wx.TextCtrl. Also added - OSXEnableAutomaticTabbing in wx.App. +* Fixed missing binder for wxEVT_STC_AUTOCOMP_SELECTION_CHANGE. (#1613) -* Added wx.ColourDialogEvent, wx.DCTextBgColourChanger, - wx.DCTextBgModeChanger, wx.grid.GridCellDateRenderer, - wx.grid.GridCellDateEditor, wx.SystemAppearance, etc. +* DataViewModel.HasValue can be overridden and will inform the + DataViewCtrl whether or not an item and column has data. If HasValue + returns False, then GetValue for that item/col will not be called. + This allows a distinction between a truly empty cell, and one that + has a value even if it is an empty string. (#1600) -* Many of the deprecated items in wxWidgets and wxPython are being or - have been removed. Be sure to test your code in a recent 4.0.x - release with warnings enabled so you can see which class, method or - function calls you need to change. +* Added flag that allows blocking of item dragging in the + UltimateListControl class. (PR#1620) -* Bug fixes in wx.lib.calendar: key navigation across month boundaries - is now possible; key navigation now sets the date and fires the - EVT_CALENDAR event; setter APIs now set the date correctly (#1230). +* Add the column index to notification events in UltimateListControl + (PR#1630) -* Switch to using a wx.Overlay in the Widget Inspection Tool to - highlight widgets when running on a GTK3 port. +* Added orientation parameter to UltimateListControl.GetScrollPos. + (PR#1632) -* Fixed issue in wx.lib.agw.customtreectrl where the label editor - could remain stuck forever (#1235). +* wx.lib.agw.aui.AuiNotebook RemovePage() now hides the removed page, + so it needs to be shown again if it is reused in another place. + (PR#1668) -* Grafted on a EnableSystemTheme method to the classes which support - it. This can be used to disable the default system theme on Windows - for native widgets like wx.ListCtrl, wx.TreeCtrl and - wx.dataview.DataViewCtrl. It has no effect on the other platforms. +* Fixed issue that could modify `bytes` objects under Python. (PR#1680) -* The wx.WS_EX_VALIDATE_RECURSIVELY extended style flag is obsolete, - as it is now the default (and only) behavior. The style flag has - been added back into wxPython for compatibility, but with a zero - value. You can just stop using it in your code with no change in - behavior. (#1278) +* Added wx.lib.agw.aui.EVT_AUI_PANE_CLOSE event which is sent when a + AUI (the agw version) Pane has been closed (after it has been + closed, not when it is about to be closed, which is when + EVT_AUI_PANE_CLOSE is sent.) (PR#1628) -* Fix a sometimes crash when using a wx.Overlay by letting the - wx.DCOverlay hold a reference to the DC, to ensure that the - DCOverlay is destroyed first. (PR#1301) +* Exposed the wx.DC methods GetGraphicsContext and SetGraphicsContext. + Depending on the platform and the type of the DC, there may be a + wx.GraphicsContext used for the implementation of the DC. If so, the + GetGraphicsContext method enables access to it. Be sure to check + that the return value is not None before trying to use it. -* Replaced the Vagrant VMs used for building wxPython for various - Linux distros with Docker images. +* Simplified the implementation of the wx.App.InitLocale method. See the + MigrationGuide for more information. -* Add some missing methods in wx.adv.BitmapComboBox (#1307) +* Added wx.lib.agw.aui.AUI_DOCKART_HINT_WINDOW_BORDER_COLOUR constant + so the hint window border color can be themed as well. -* Added the wx.svg package which contains code for parsing SVG - (Scalable Vector Graphics) files, and also code for integrating with - wxPython. It can rasterize the SVG to a wx.Bitmap of any size with - no loss of quality, and it can also render the SVG directly to a - wx.GraphicsContext using the GC's drawing primitives. (PR #1323) +* The wx.lib.mixins.listCtrl.CheckListCtrlMixin is now obsolete + because wx.ListCtrl has new functionality which does pretty much the + same thing. In fact there is some overlap in method names which may + trip up some use cases. It is advised to drop the use of + CheckListCtrlMixin and just use the wx.ListBox functionality. You + will need to call EnableCheckBoxes to turn it on, and you may need + to change some event handlers or overloaded methods. -* Ported the embedding sample from Classic, which shows how to use - wxPython from a C++ wxWidgets application that embeds Python. (PR - #1353) +* wx.html2.WebView is now able to use Microsoft's Edge browser + component as its backend renderer. This should improve the + capabilities of the WebView widget on Windows, and be more + consistent with the WebViews on the other platforms, compared to the + original IE 11 backend. Using this backed requires that a new-ish + version of the Edge browser is installed on the end user's computer. -* Fixed wx.GetApp() to use wxWidgets' global wxApp instance instead of - maintaining its own pointer. This way, if the wxApp is created by - C++ code wxPython will still be able to get access to it. (#1126) +* Added the wx.Image.ConvertToRegion method. This lets you create a + wx.Region from an image and a specified color or the mask if the + image has one. This was done to workaround a bug in wxMac, but it + seems worthwhile enough to keep it around even after the bug was + fixed. -* Added wrappers for the wx.ActivityIndicator class. +* Added the missing context manager methods for wx.LogNull. (#1842) -* Added wrappers for the wx.CollapsibleHeaderCtrl class. - -* Fixed issues in PlotCanvas around displaying and using - scrollbars. (#1428) - -* Added wx.msw.CHMHelpController, and also a wx.HelpController factory - function that creates an instance of the best Help Controller for - the platform. (#1536) - -* Added wx.adv.GenericAnimationCtrl so the generic version of the - animation classes can be used even on the platforms that have a - native version. Note that due to internal changes to support both - types of animations, some API changes in how the Animation objects - are created. See the AnimationCtrl.py sample in the demo for the - various usage patterns (#1579) - -* Added wrappers for the wx.grid.GridBlockCoords, wx.grid.GridBlocks, - and wx.grid.GridBlockDiffResult classes, as well as associated new - methods in the wx.grid.Grid class. These provide a new way to - interact with blocks of selected cells, including an iterator - interface in wx.grid.GridBlocks which should be a more efficient - (time and memory) way to process large groups of selections. +* Refactored ScrolledThumbnail out of agw.ThumbnailCtrl so as to be + usable outside of ThumbnailCtrl. From 3fef778074a6e5b61e0a19da159c5cbc6da4bb07 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 21 Nov 2020 10:54:26 -0800 Subject: [PATCH 4/7] Install the `which` package on Fedora --- docker/build/fedora-30/Dockerfile | 3 ++- docker/build/fedora-31/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/build/fedora-30/Dockerfile b/docker/build/fedora-30/Dockerfile index 75ec0de7..fad70a66 100644 --- a/docker/build/fedora-30/Dockerfile +++ b/docker/build/fedora-30/Dockerfile @@ -31,7 +31,8 @@ RUN \ libtiff-devel \ libXtst-devel \ SDL-devel \ - webkit2gtk3-devel; \ + webkit2gtk3-devel \ + which; \ # Install all available Python packages and their dev packages dnf -y install python3 python3-tools python3-devel; \ dnf -y install python36; \ diff --git a/docker/build/fedora-31/Dockerfile b/docker/build/fedora-31/Dockerfile index 47170351..33056748 100644 --- a/docker/build/fedora-31/Dockerfile +++ b/docker/build/fedora-31/Dockerfile @@ -31,7 +31,8 @@ RUN \ libtiff-devel \ libXtst-devel \ SDL-devel \ - webkit2gtk3-devel; \ + webkit2gtk3-devel \ + which; \ # Install all available Python packages and their dev packages dnf -y install python3 python3-tools python3-devel; \ dnf -y install python38; \ From 7118a360445ffee52beacabc526dec536a97c6e2 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 21 Nov 2020 10:55:25 -0800 Subject: [PATCH 5/7] Promote fedora-29 to emeritus status, enable keeping the build containers --- docker/tasks.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docker/tasks.py b/docker/tasks.py index 64447233..19ca5677 100644 --- a/docker/tasks.py +++ b/docker/tasks.py @@ -20,7 +20,7 @@ HERE = os.path.abspath(os.path.dirname(__file__)) # Distros that have been promoted to Emeritus status. They can still be selected # manually, but will be excluded by default when selecting all images. -OLD = [ 'ubuntu-14.04' ] +OLD = [ 'ubuntu-14.04', 'fedora-29' ] @@ -110,11 +110,12 @@ def push(ctx, image, gui=False, include_old=False): 'image':'Name of a docker image to use for building. May be specified more than once. Defaults to all.', 'port': 'One of "gtk2", "gtk3" or "all". Defaults to "gtk3".', 'venv': 'The name of a Python virtual environment to use for the build, like Py27, Py36, etc. Defaults to all.', - 'include_old': 'Include the "OLD" distros when selecting all.' + 'include_old': 'Include the "OLD" distros when selecting all.', + 'keep': "Keep the container when it exits. Otherwise it will be auto-removed." }, iterable=['image'], ) -def build_wxpython(ctx, image, venv='all', port='gtk3', include_old=False): +def build_wxpython(ctx, image, venv='all', port='gtk3', include_old=False, keep=False): """ Use docker images to build wxPython. @@ -127,9 +128,10 @@ def build_wxpython(ctx, image, venv='all', port='gtk3', include_old=False): os.chdir(HERE) dist=os.path.abspath('../dist') + rm = '' if keep else '--rm' for img_name in image: - ctx.run('docker run -it --rm -v {}:/dist ' - 'wxpython4/build:{} do-build.sh {} {}'.format(dist, img_name, venv, port), + ctx.run('docker run -it {} -v {}:/dist ' + 'wxpython4/build:{} do-build.sh {} {}'.format(rm, dist, img_name, venv, port), pty=True, echo=True) From 63b8099bc295e767923a9dd05693aa8a23e8c6b1 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 25 Nov 2020 13:12:18 -0800 Subject: [PATCH 6/7] Enable building the docker-based builds with gtk2 (for those that support it.) --- build.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build.py b/build.py index f2eb0449..34038cc3 100755 --- a/build.py +++ b/build.py @@ -1729,6 +1729,21 @@ def cmd_build_docker(options, args): cmd.append('-i') cmd.append(img) + # Do just the gtk2 builds? + if options.gtk2: + cmd.extend(['--port', 'gtk2']) + + # TODO: Instead of the simple options.gtk2 test above, do something like the + # following to select both. But currently if gtk2 is selected then + # options.gtk3 is explicity set to False... That needs to be made a little + # smarter. + # if options.gtk2 and options.gtk3: + # cmd.extend(['--port', 'all']) + # elif options.gtk2: + # cmd.extend(['--port', 'gtk2']) + # else: + # cmd.extend(['--port', 'gtk3']) + # 'none' can be used to skip building and go straight to uploading if options.docker_img != 'none': pwd = pushDir('docker') From dedc0d62b7400f0bfd03157b52c1737713d08412 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 25 Nov 2020 13:58:30 -0800 Subject: [PATCH 7/7] Bump version number for next release --- buildtools/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildtools/version.py b/buildtools/version.py index 63302bba..be7c0368 100644 --- a/buildtools/version.py +++ b/buildtools/version.py @@ -24,9 +24,9 @@ PROJECT_NAME = 'wxPython' # version numbers. VER_MAJOR = 4 VER_MINOR = 1 -VER_RELEASE = 1 +VER_RELEASE = 2 -VER_FLAGS = "" # wxPython release flags +VER_FLAGS = "a1" # wxPython release flags # The VER_FLAGS value is appended to the version number constructed from the # first 3 components and should be set according to the following patterns.