Skip to content

Commit

Permalink
Update sip to v6.8.3 and fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
swt2c committed Feb 13, 2024
1 parent 832f172 commit 2c63071
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}]
Expand Down
2 changes: 1 addition & 1 deletion buildtools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

# ---------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/sphinx/itemToModuleMap.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion etg/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))

Expand Down
2 changes: 1 addition & 1 deletion etg/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def wrapper(self, obj):

#---------------------------------------------
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));",
Expand Down
6 changes: 3 additions & 3 deletions etgtools/tweaker_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ class {ListClass}
{TypeDef}
%End
public:
SIP_SSIZE_T __len__();
Py_ssize_t __len__();
%MethodCode
sipRes = sipCpp->size();
%End
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sphinxtools/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def whatis(self, value):
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__',
Expand Down

0 comments on commit 2c63071

Please sign in to comment.