Skip to content

Support for Python3_13#32

Open
BakedSnake wants to merge 3 commits into
dsacre:masterfrom
BakedSnake:python3_13
Open

Support for Python3_13#32
BakedSnake wants to merge 3 commits into
dsacre:masterfrom
BakedSnake:python3_13

Conversation

@BakedSnake
Copy link
Copy Markdown

Add support for python3_13

Remove long types:

Error compiling Cython file:
------------------------------------------------------------
...
        # bool is a subclass of int, so check those first
        if value is True:
            lo_message_add_true(self._message)
        elif value is False:
            lo_message_add_false(self._message)
        elif isinstance(value, (int, long)):
                                     ^
------------------------------------------------------------
src/liblo.pyx:1001:37: undeclared name not builtin: long

Add noexcept on callbacks:

Error compiling Cython file:
------------------------------------------------------------
...
                    user_data=user_data,
                    nargs=nargs)
        # keep a reference to the callback data around
        self._keep_refs.append(cb)

        lo_server_add_method(self._server, p, t, _msg_callback, <void*>cb)
                                                 ^
------------------------------------------------------------
src/liblo.pyx:484:49: Cannot assign type 'int (const_char *, const_char *, lo_arg **, int, lo_message, void *) except? -1 nogil' to 'lo_method_handler' (alias of 'int (*)(const_char *, const_char *, lo_arg **, int, lo_message, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of '_msg_callback'.

Cast argv[i] to lo_blob:

/usr/lib/python3.13/site-packages/setuptools/_distutils/dist.py:287: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
running build
running build_ext
Compiling src/liblo.pyx because it changed.
[1/1] Cythonizing src/liblo.pyx
building 'liblo' extension
creating build/temp.linux-x86_64-cpython-313/src
x86_64-pc-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -fPIC -I/usr/include/python3.13 -c src/liblo.c -o build/temp.linux-x86_64-cpython-313/src/liblo.o -fno-strict-aliasing -Werror-implicit-function-declaration -Wfatal-errors
src/liblo.c: In function ‘__pyx_f_5liblo__msg_callback’:
src/liblo.c:6646:94: error: passing argument 1 of ‘lo_blob_dataptr’ from incompatible pointer type [-Wincompatible-pointer-types]
 6646 |         __pyx_t_5 = __Pyx_PyBytes_FromCString(((unsigned char *)lo_blob_dataptr((__pyx_v_argv[__pyx_v_i])))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error)
      |                                                                                 ~~~~~~~~~~~~~^~~~~~~~~~~~
      |                                                                                              |
      |                                                                                              lo_arg *
src/liblo.c:1361:78: note: in definition of macro ‘__Pyx_PyBytes_FromCString’
 1361 | #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
      |                                                                              ^
compilation terminated due to -Wfatal-errors.
error: command '/usr/bin/x86_64-pc-linux-gnu-gcc' failed with exit code 1

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant