Update sip to v6.8.3 and fix deprecations

This commit is contained in:
Scott Talbert
2024-02-12 23:20:17 -05:00
parent 832f17260f
commit 2c6307142f
8 changed files with 10 additions and 9 deletions

View File

@@ -1290,7 +1290,7 @@ def cmd_sip(options, args):
requires = ["sip >=6.6.2, <7"]
build-backend = "sipbuild.api"
[tool.sip.metadata]
[project]
name = "{base}"
[tool.sip.bindings.{base}]

View File

@@ -85,7 +85,7 @@ class Configuration(object):
PKGDIR = 'wx'
# The name of the top-level package
SIP_ABI = '12.8'
SIP_ABI = '12.9'
SIP_TRACE = False
# ---------------------------------------------------------------

View File

@@ -874,6 +874,7 @@
"DataViewBitmapRenderer":"wx.dataview.",
"DataViewCellMode":"wx.dataview.",
"DataViewCellRenderState":"wx.dataview.",
"DataViewCheckIconText":"wx.dataview.",
"DataViewCheckIconTextRenderer":"wx.dataview.",
"DataViewChoiceRenderer":"wx.dataview.",
"DataViewColumn":"wx.dataview.",

View File

@@ -75,7 +75,7 @@ def run():
module.insertItemAfter(td, etgtools.TypedefDef(type='wchar_t', name='wxChar'))
module.insertItemAfter(td, etgtools.TypedefDef(type='wxInt64', name='time_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='long long', name='wxFileOffset'))
module.insertItemAfter(td, etgtools.TypedefDef(type='SIP_SSIZE_T', name='ssize_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='Py_ssize_t', name='ssize_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='unsigned char', name='byte', pyInt=True))
module.insertItemAfter(td, etgtools.TypedefDef(type='unsigned long', name='ulong'))

View File

@@ -286,7 +286,7 @@ def run():
#---------------------------------------------
c = module.find('wxGraphicsGradientStops')
c.addCppMethod('SIP_SSIZE_T', '__len__', '()', body="return (SIP_SSIZE_T)self->GetCount();")
c.addCppMethod('Py_ssize_t', '__len__', '()', body="return (Py_ssize_t)self->GetCount();")
c.addCppMethod('wxGraphicsGradientStop*', '__getitem__', '(ulong n)',
pyArgsString='(n)',
body="return new wxGraphicsGradientStop(self->Item(n));",

View File

@@ -958,7 +958,7 @@ class {ListClass}
{TypeDef}
%End
public:
SIP_SSIZE_T __len__();
Py_ssize_t __len__();
%MethodCode
sipRes = sipCpp->size();
%End
@@ -1129,7 +1129,7 @@ def wxArrayWrapperTemplate(ArrayClass, ItemClass, module, itemIsPtr=False, getIt
class {ArrayClass}
{{
public:
SIP_SSIZE_T __len__();
Py_ssize_t __len__();
%MethodCode
sipRes = sipCpp->GetCount();
%End
@@ -1183,7 +1183,7 @@ def wxArrayPtrWrapperTemplate(ArrayClass, ItemClass, module):
class {ArrayClass}
{{
public:
SIP_SSIZE_T __len__();
Py_ssize_t __len__();
%MethodCode
sipRes = sipCpp->GetCount();
%End

View File

@@ -3,7 +3,7 @@
appdirs
setuptools < 45 ; python_version < '3.0'
setuptools ; python_version >= '3.0'
sip == 6.8.2
sip == 6.8.3
wheel
twine

View File

@@ -223,7 +223,7 @@ class Enumeration(object):
return self.reverseLookup[value]
CONSTANT_RE = re.compile('^([\w\s,]+)=', re.M)
CONSTANT_RE = re.compile(r'^([\w\s,]+)=', re.M)
EXCLUDED_ATTRS = ['__builtins__', '__doc__', '__name__', '__file__', '__path__',
'__module__', '__all__', '__cached__', '__loader__', '__package__',