Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] python3-pivy: fix for Python 3.10
@ 2022-04-16 18:30 classabbyamp
  2022-04-16 18:32 ` [PR PATCH] [Updated] " classabbyamp
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: classabbyamp @ 2022-04-16 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages fix/python3-pivy
https://github.com/void-linux/void-packages/pull/36724

python3-pivy: fix for Python 3.10
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/36724.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/python3-pivy-36724.patch --]
[-- Type: text/x-diff, Size: 5902 bytes --]

From 942be4c68bebe209ca64f0b38859d6616b74a453 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Sat, 16 Apr 2022 14:30:17 -0400
Subject: [PATCH] python3-pivy: fix for Python 3.10

---
 srcpkgs/python3-pivy/patches/python3.10.patch | 143 ++++++++++++++++++
 srcpkgs/python3-pivy/template                 |   2 +-
 2 files changed, 144 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/python3-pivy/patches/python3.10.patch

diff --git a/srcpkgs/python3-pivy/patches/python3.10.patch b/srcpkgs/python3-pivy/patches/python3.10.patch
new file mode 100644
index 000000000000..34c533bf5130
--- /dev/null
+++ b/srcpkgs/python3-pivy/patches/python3.10.patch
@@ -0,0 +1,143 @@
+From 377d97ce41519e879a6c0111f1193957653a06ae Mon Sep 17 00:00:00 2001
+From: Anton Lazarev <antonok35@gmail.com>
+Date: Mon, 24 Jan 2022 18:57:12 -0800
+Subject: [PATCH] tests no longer segfault on Python 3.10
+
+---
+ interfaces/pivy_common_typemaps.i | 52 +++++++++++++++----------------
+ 1 file changed, 25 insertions(+), 27 deletions(-)
+
+diff --git a/interfaces/pivy_common_typemaps.i b/interfaces/pivy_common_typemaps.i
+index 13f9a8c..27e26a6 100644
+--- a/interfaces/pivy_common_typemaps.i
++++ b/interfaces/pivy_common_typemaps.i
+@@ -28,19 +28,12 @@ typedef int Py_ssize_t;
+   #define IS_PY3K
+ #endif
+ 
+-/* a casting helper function */
+-SWIGEXPORT PyObject *
+-cast(PyObject * self, PyObject * args)
++PyObject *
++cast_internal(PyObject * self, PyObject * obj, const char * type_name, int type_len)
+ {
+   swig_type_info * swig_type = 0;
+   void * cast_obj = 0;
+-  char * type_name, * ptr_type;
+-  int type_len;
+-  PyObject * obj = 0;
+-
+-  if (!PyArg_ParseTuple(args, "Os#:cast", &obj, &type_name, &type_len)) {
+-    SWIG_fail;
+-  }
++  char * ptr_type;
+ 
+   /*
+    * add a pointer sign to the string coming from the interpreter
+@@ -74,7 +67,24 @@ cast(PyObject * self, PyObject * args)
+   if (SWIG_arg_fail(1)) { SWIG_fail; }
+ 
+   return SWIG_NewPointerObj((void*)cast_obj, swig_type, 0);
+-  fail:
++fail:
++  return NULL;
++}
++
++/* a casting helper function */
++SWIGEXPORT PyObject *
++cast(PyObject * self, PyObject * args)
++{
++  char * type_name;
++  int type_len;
++  PyObject * obj = 0;
++
++  if (!PyArg_ParseTuple(args, "Os#:cast", &obj, &type_name, &type_len)) {
++    SWIG_fail;
++  }
++
++  return cast_internal(self, obj, type_name, type_len);
++fail:
+   return NULL;
+ }
+ 
+@@ -86,18 +96,15 @@ autocast_base(SoBase * base)
+ 
+   /* autocast the result to the corresponding type */
+   if (base && base->isOfType(SoFieldContainer::getClassTypeId())) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = base->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)base, SWIGTYPE_p_SoBase, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+@@ -120,18 +127,15 @@ autocast_path(SoPath * path)
+   
+   /* autocast the result to the corresponding type */
+   if (path) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = path->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)path, SWIGTYPE_p_SoPath, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+@@ -154,18 +158,15 @@ autocast_field(SoField * field)
+ 
+   /* autocast the result to the corresponding type */
+   if (field) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = field->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)field, SWIGTYPE_p_SoField, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+       
+       if (!result) { type = type.getParent(); }
+@@ -188,18 +189,15 @@ autocast_event(SoEvent * event)
+   
+   /* autocast the result to the corresponding type */
+   if (event) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = event->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)event, SWIGTYPE_p_SoEvent, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+
diff --git a/srcpkgs/python3-pivy/template b/srcpkgs/python3-pivy/template
index 6105058d9982..794e03bc8c41 100644
--- a/srcpkgs/python3-pivy/template
+++ b/srcpkgs/python3-pivy/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-pivy'
 pkgname=python3-pivy
 version=0.6.6
-revision=3
+revision=4
 wrksrc="pivy-${version}"
 build_style=cmake
 hostmakedepends="python3-devel swig"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] python3-pivy: fix for Python 3.10
  2022-04-16 18:30 [PR PATCH] python3-pivy: fix for Python 3.10 classabbyamp
@ 2022-04-16 18:32 ` classabbyamp
  2022-04-16 18:51 ` classabbyamp
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-04-16 18:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages fix/python3-pivy
https://github.com/void-linux/void-packages/pull/36724

python3-pivy: fix for Python 3.10
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/36724.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/python3-pivy-36724.patch --]
[-- Type: text/x-diff, Size: 5927 bytes --]

From 5d6d05af26d3aefdce6287898ea218387cbd92da Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Sat, 16 Apr 2022 14:30:17 -0400
Subject: [PATCH] python3-pivy: fix for Python 3.10

backports coin3d/pivy#91
---
 srcpkgs/python3-pivy/patches/python3.10.patch | 143 ++++++++++++++++++
 srcpkgs/python3-pivy/template                 |   2 +-
 2 files changed, 144 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/python3-pivy/patches/python3.10.patch

diff --git a/srcpkgs/python3-pivy/patches/python3.10.patch b/srcpkgs/python3-pivy/patches/python3.10.patch
new file mode 100644
index 000000000000..34c533bf5130
--- /dev/null
+++ b/srcpkgs/python3-pivy/patches/python3.10.patch
@@ -0,0 +1,143 @@
+From 377d97ce41519e879a6c0111f1193957653a06ae Mon Sep 17 00:00:00 2001
+From: Anton Lazarev <antonok35@gmail.com>
+Date: Mon, 24 Jan 2022 18:57:12 -0800
+Subject: [PATCH] tests no longer segfault on Python 3.10
+
+---
+ interfaces/pivy_common_typemaps.i | 52 +++++++++++++++----------------
+ 1 file changed, 25 insertions(+), 27 deletions(-)
+
+diff --git a/interfaces/pivy_common_typemaps.i b/interfaces/pivy_common_typemaps.i
+index 13f9a8c..27e26a6 100644
+--- a/interfaces/pivy_common_typemaps.i
++++ b/interfaces/pivy_common_typemaps.i
+@@ -28,19 +28,12 @@ typedef int Py_ssize_t;
+   #define IS_PY3K
+ #endif
+ 
+-/* a casting helper function */
+-SWIGEXPORT PyObject *
+-cast(PyObject * self, PyObject * args)
++PyObject *
++cast_internal(PyObject * self, PyObject * obj, const char * type_name, int type_len)
+ {
+   swig_type_info * swig_type = 0;
+   void * cast_obj = 0;
+-  char * type_name, * ptr_type;
+-  int type_len;
+-  PyObject * obj = 0;
+-
+-  if (!PyArg_ParseTuple(args, "Os#:cast", &obj, &type_name, &type_len)) {
+-    SWIG_fail;
+-  }
++  char * ptr_type;
+ 
+   /*
+    * add a pointer sign to the string coming from the interpreter
+@@ -74,7 +67,24 @@ cast(PyObject * self, PyObject * args)
+   if (SWIG_arg_fail(1)) { SWIG_fail; }
+ 
+   return SWIG_NewPointerObj((void*)cast_obj, swig_type, 0);
+-  fail:
++fail:
++  return NULL;
++}
++
++/* a casting helper function */
++SWIGEXPORT PyObject *
++cast(PyObject * self, PyObject * args)
++{
++  char * type_name;
++  int type_len;
++  PyObject * obj = 0;
++
++  if (!PyArg_ParseTuple(args, "Os#:cast", &obj, &type_name, &type_len)) {
++    SWIG_fail;
++  }
++
++  return cast_internal(self, obj, type_name, type_len);
++fail:
+   return NULL;
+ }
+ 
+@@ -86,18 +96,15 @@ autocast_base(SoBase * base)
+ 
+   /* autocast the result to the corresponding type */
+   if (base && base->isOfType(SoFieldContainer::getClassTypeId())) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = base->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)base, SWIGTYPE_p_SoBase, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+@@ -120,18 +127,15 @@ autocast_path(SoPath * path)
+   
+   /* autocast the result to the corresponding type */
+   if (path) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = path->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)path, SWIGTYPE_p_SoPath, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+@@ -154,18 +158,15 @@ autocast_field(SoField * field)
+ 
+   /* autocast the result to the corresponding type */
+   if (field) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = field->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)field, SWIGTYPE_p_SoField, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+       
+       if (!result) { type = type.getParent(); }
+@@ -188,18 +189,15 @@ autocast_event(SoEvent * event)
+   
+   /* autocast the result to the corresponding type */
+   if (event) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = event->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)event, SWIGTYPE_p_SoEvent, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+
diff --git a/srcpkgs/python3-pivy/template b/srcpkgs/python3-pivy/template
index 6105058d9982..794e03bc8c41 100644
--- a/srcpkgs/python3-pivy/template
+++ b/srcpkgs/python3-pivy/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-pivy'
 pkgname=python3-pivy
 version=0.6.6
-revision=3
+revision=4
 wrksrc="pivy-${version}"
 build_style=cmake
 hostmakedepends="python3-devel swig"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] python3-pivy: fix for Python 3.10
  2022-04-16 18:30 [PR PATCH] python3-pivy: fix for Python 3.10 classabbyamp
  2022-04-16 18:32 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-04-16 18:51 ` classabbyamp
  2022-04-16 19:18 ` classabbyamp
  2022-04-18 20:52 ` [PR PATCH] [Closed]: " classabbyamp
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-04-16 18:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages fix/python3-pivy
https://github.com/void-linux/void-packages/pull/36724

python3-pivy: fix for Python 3.10
<!-- Uncomment relevant sections and delete options which are not applicable -->

backports coin3d/pivy#91

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/36724.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/python3-pivy-36724.patch --]
[-- Type: text/x-diff, Size: 5927 bytes --]

From 8f97045d51cb9e48294a1ec4b4a137333000c1ab Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Sat, 16 Apr 2022 14:30:17 -0400
Subject: [PATCH] python3-pivy: fix for Python 3.10

backports coin3d/pivy#91
---
 srcpkgs/python3-pivy/patches/python3.10.patch | 143 ++++++++++++++++++
 srcpkgs/python3-pivy/template                 |   2 +-
 2 files changed, 144 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/python3-pivy/patches/python3.10.patch

diff --git a/srcpkgs/python3-pivy/patches/python3.10.patch b/srcpkgs/python3-pivy/patches/python3.10.patch
new file mode 100644
index 000000000000..34c533bf5130
--- /dev/null
+++ b/srcpkgs/python3-pivy/patches/python3.10.patch
@@ -0,0 +1,143 @@
+From 377d97ce41519e879a6c0111f1193957653a06ae Mon Sep 17 00:00:00 2001
+From: Anton Lazarev <antonok35@gmail.com>
+Date: Mon, 24 Jan 2022 18:57:12 -0800
+Subject: [PATCH] tests no longer segfault on Python 3.10
+
+---
+ interfaces/pivy_common_typemaps.i | 52 +++++++++++++++----------------
+ 1 file changed, 25 insertions(+), 27 deletions(-)
+
+diff --git a/interfaces/pivy_common_typemaps.i b/interfaces/pivy_common_typemaps.i
+index 13f9a8c..27e26a6 100644
+--- a/interfaces/pivy_common_typemaps.i
++++ b/interfaces/pivy_common_typemaps.i
+@@ -28,19 +28,12 @@ typedef int Py_ssize_t;
+   #define IS_PY3K
+ #endif
+ 
+-/* a casting helper function */
+-SWIGEXPORT PyObject *
+-cast(PyObject * self, PyObject * args)
++PyObject *
++cast_internal(PyObject * self, PyObject * obj, const char * type_name, int type_len)
+ {
+   swig_type_info * swig_type = 0;
+   void * cast_obj = 0;
+-  char * type_name, * ptr_type;
+-  int type_len;
+-  PyObject * obj = 0;
+-
+-  if (!PyArg_ParseTuple(args, "Os#:cast", &obj, &type_name, &type_len)) {
+-    SWIG_fail;
+-  }
++  char * ptr_type;
+ 
+   /*
+    * add a pointer sign to the string coming from the interpreter
+@@ -74,7 +67,24 @@ cast(PyObject * self, PyObject * args)
+   if (SWIG_arg_fail(1)) { SWIG_fail; }
+ 
+   return SWIG_NewPointerObj((void*)cast_obj, swig_type, 0);
+-  fail:
++fail:
++  return NULL;
++}
++
++/* a casting helper function */
++SWIGEXPORT PyObject *
++cast(PyObject * self, PyObject * args)
++{
++  char * type_name;
++  int type_len;
++  PyObject * obj = 0;
++
++  if (!PyArg_ParseTuple(args, "Os#:cast", &obj, &type_name, &type_len)) {
++    SWIG_fail;
++  }
++
++  return cast_internal(self, obj, type_name, type_len);
++fail:
+   return NULL;
+ }
+ 
+@@ -86,18 +96,15 @@ autocast_base(SoBase * base)
+ 
+   /* autocast the result to the corresponding type */
+   if (base && base->isOfType(SoFieldContainer::getClassTypeId())) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = base->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)base, SWIGTYPE_p_SoBase, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+@@ -120,18 +127,15 @@ autocast_path(SoPath * path)
+   
+   /* autocast the result to the corresponding type */
+   if (path) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = path->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)path, SWIGTYPE_p_SoPath, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+@@ -154,18 +158,15 @@ autocast_field(SoField * field)
+ 
+   /* autocast the result to the corresponding type */
+   if (field) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = field->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)field, SWIGTYPE_p_SoField, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+       
+       if (!result) { type = type.getParent(); }
+@@ -188,18 +189,15 @@ autocast_event(SoEvent * event)
+   
+   /* autocast the result to the corresponding type */
+   if (event) {
+-    PyObject * cast_args = NULL;
+     PyObject * obj = NULL;
+     SoType type = event->getTypeId();
+ 
+     /* in case of a non built-in type get the closest built-in parent */
+     while (!(type.isBad() || result)) {
+       obj = SWIG_NewPointerObj((void*)event, SWIGTYPE_p_SoEvent, 0);
+-      cast_args = Py_BuildValue("(Os)", obj, type.getName().getString());
+       
+-      result = cast(NULL, cast_args);
++      result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength());
+ 
+-      Py_DECREF(cast_args);
+       Py_DECREF(obj);
+ 
+       if (!result) { type = type.getParent(); }
+
diff --git a/srcpkgs/python3-pivy/template b/srcpkgs/python3-pivy/template
index 6105058d9982..794e03bc8c41 100644
--- a/srcpkgs/python3-pivy/template
+++ b/srcpkgs/python3-pivy/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-pivy'
 pkgname=python3-pivy
 version=0.6.6
-revision=3
+revision=4
 wrksrc="pivy-${version}"
 build_style=cmake
 hostmakedepends="python3-devel swig"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: python3-pivy: fix for Python 3.10
  2022-04-16 18:30 [PR PATCH] python3-pivy: fix for Python 3.10 classabbyamp
  2022-04-16 18:32 ` [PR PATCH] [Updated] " classabbyamp
  2022-04-16 18:51 ` classabbyamp
@ 2022-04-16 19:18 ` classabbyamp
  2022-04-18 20:52 ` [PR PATCH] [Closed]: " classabbyamp
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-04-16 19:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/36724#issuecomment-1100737051

Comment:
draft for now... doesn't seem to fix the issues

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Closed]: python3-pivy: fix for Python 3.10
  2022-04-16 18:30 [PR PATCH] python3-pivy: fix for Python 3.10 classabbyamp
                   ` (2 preceding siblings ...)
  2022-04-16 19:18 ` classabbyamp
@ 2022-04-18 20:52 ` classabbyamp
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-04-18 20:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

There's a closed pull request on the void-packages repository

python3-pivy: fix for Python 3.10
https://github.com/void-linux/void-packages/pull/36724

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

backports coin3d/pivy#91

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-18 20:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-16 18:30 [PR PATCH] python3-pivy: fix for Python 3.10 classabbyamp
2022-04-16 18:32 ` [PR PATCH] [Updated] " classabbyamp
2022-04-16 18:51 ` classabbyamp
2022-04-16 19:18 ` classabbyamp
2022-04-18 20:52 ` [PR PATCH] [Closed]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).