From 8005fa0e4856db421a520f053ad8e8b963970c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 10 Oct 2023 11:16:52 +0700 Subject: [PATCH] wxPython: clear Python 3.12 warning --- srcpkgs/wxPython/patches/02.python3.12.patch | 57 ++++++++++++++++++++ srcpkgs/wxPython/template | 2 +- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/wxPython/patches/02.python3.12.patch diff --git a/srcpkgs/wxPython/patches/02.python3.12.patch b/srcpkgs/wxPython/patches/02.python3.12.patch new file mode 100644 index 00000000000..ae2cd251d5c --- /dev/null +++ b/srcpkgs/wxPython/patches/02.python3.12.patch @@ -0,0 +1,57 @@ +--- a/wx/lib/docview.py ++++ b/wx/lib/docview.py +@@ -1034,7 +1034,7 @@ class DocTemplate(wx.Object): + string will be displayed in the file filter list of Windows file + selectors. + +- filter is an appropriate file filter such as \*.txt. ++ filter is an appropriate file filter such as *.txt. + + dir is the default directory to use for file selectors. + +--- a/wx/lib/layoutf.py ++++ b/wx/lib/layoutf.py +@@ -132,8 +132,8 @@ class Layoutf(wx.LayoutConstraints): + 'r': 'wx.Right', 'h': 'wx.Height', 'w': 'wx.Width', + 'x': 'wx.CentreX', 'y': 'wx.CentreY' } + +- rexp1 = re.compile('^\s*([tlrbhwxy])\s*([!\?\*])\s*(\d*)\s*$') +- rexp2 = re.compile('^\s*([tlrbhwxy])\s*([=%<>^_])\s*([tlrbhwxy]?)\s*(\d*)\s*#(\d+)\s*$') ++ rexp1 = re.compile(r'^\s*([tlrbhwxy])\s*([!\?\*])\s*(\d*)\s*$') ++ rexp2 = re.compile(r'^\s*([tlrbhwxy])\s*([=%<>^_])\s*([tlrbhwxy]?)\s*(\d*)\s*#(\d+)\s*$') + + def __init__(self,pstr=None,winlist=None): + wx.LayoutConstraints.__init__(self) +--- a/wx/lib/wxpTag.py ++++ b/wx/lib/wxpTag.py +@@ -45,7 +45,7 @@ The name-value pairs in all the nested P + strings into a python dictionary and passed to the __init__ method of + the class as keyword arguments. This means that they are all + accessible from the __init__ method as regular parameters, or you use +-the special Python \*\*kw syntax in your __init__ method to get the ++the special Python **kw syntax in your __init__ method to get the + dictionary directly. + + Some parameter values are special and if they are present then they will +--- a/wx/tools/pywxrc.py ++++ b/wx/tools/pywxrc.py +@@ -521,7 +521,7 @@ class XmlResourceCompiler: + # Generate subclasses + for subclass in subclasses: + windowClass = bases[subclass] +- subclass = re.sub("^\S+\.", "", subclass) ++ subclass = re.sub(r"^\S+\.", "", subclass) + windowClass = re.sub("^wx", "", windowClass) + outputList.append(self.templates.SUBCLASS_HEADER % locals()) + outputList.append('\n') +@@ -766,8 +766,8 @@ class XmlResourceCompiler: + \n => \\n + \r => \\r + \t => \\t +- \ => \\ +- " => \" ++ \\ => \\\\ ++ " => \\" + + Returns result as string, which is bytes in py2 or unicode in py3. + """ diff --git a/srcpkgs/wxPython/template b/srcpkgs/wxPython/template index dc78279707f..8e828ed225a 100644 --- a/srcpkgs/wxPython/template +++ b/srcpkgs/wxPython/template @@ -1,7 +1,7 @@ # Template file for 'wxPython' pkgname=wxPython version=4.2.1 -revision=3 +revision=4 build_style=python3-module make_build_args="--skip-build" make_install_args="--skip-build"