Skip to content

Python3.11 compatibility #497

Closed
Closed

Description

@blackPantherOS

:(

creating build/temp.linux-x86_64-3.11/msgpack
gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -g -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -I/usr/include/ncursesw -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -D__LITTLE_ENDIAN__=1 -I. -I/usr/include/python3.11 -c msgpack/_cmsgpack.cpp -o build/temp.linux-x86_64-3.11/msgpack/_cmsgpack.o
In file included from msgpack/pack.h:68,
                 from msgpack/_cmsgpack.cpp:636:
msgpack/pack_template.h: In function ‘int msgpack_pack_float(msgpack_packer*, float)’:
msgpack/pack_template.h:571:5: error: ‘_PyFloat_Pack4’ was not declared in this scope
  571 |     _PyFloat_Pack4(d, &buf[1], 0);
      |     ^~~~~~~~~~~~~~
msgpack/pack_template.h: In function ‘int msgpack_pack_double(msgpack_packer*, double)’:
msgpack/pack_template.h:579:5: error: ‘_PyFloat_Pack8’ was not declared in this scope
  579 |     _PyFloat_Pack8(d, &buf[1], 0);
      |     ^~~~~~~~~~~~~~
In file included from msgpack/unpack.h:391,
                 from msgpack/_cmsgpack.cpp:641:
msgpack/unpack_template.h: In function ‘int unpack_execute(unpack_context*, const char*, Py_ssize_t, Py_ssize_t*)’:
msgpack/unpack_template.h:246:32: error: there are no arguments to ‘_PyFloat_Unpack4’ that depend on a template parameter, so a declaration of ‘_PyFloat_Unpack4’ must be available [-fpermissive]
  246 |                     double f = _PyFloat_Unpack4((unsigned char*)n, 0);
      |                                ^~~~~~~~~~~~~~~~
msgpack/unpack_template.h:246:32: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
msgpack/unpack_template.h:249:32: error: there are no arguments to ‘_PyFloat_Unpack8’ that depend on a template parameter, so a declaration of ‘_PyFloat_Unpack8’ must be available [-fpermissive]
  249 |                     double f = _PyFloat_Unpack8((unsigned char*)n, 0);
      |                                ^~~~~~~~~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘int __Pyx_InitCachedConstants()’:
msgpack/_cmsgpack.cpp:12247:274: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
12247 | uple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_msgpack__unpacker_pyx, __pyx_n_s_default_read_extended_type, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 116, __pyx_L1_error)
      |                                                                                                                                                         ^~~
      |                                                                                                                                                         |
      |                                                                                                                                                         int

msgpack/_cmsgpack.cpp:334:72: note: in definition of macro ‘__Pyx_PyCode_New’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
msgpack/_cmsgpack.cpp:12247:279: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]
12247 |  __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_msgpack__unpacker_pyx, __pyx_n_s_default_read_extended_type, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 116, __pyx_L1_error)
      |                                                                                                                                                         ^~~~~~~~~~~~~~~~~
      |                                                                                                                                                         |
      |                                                                                                                                                         PyObject* {aka _object*}

msgpack/_cmsgpack.cpp:334:79: note: in definition of macro ‘__Pyx_PyCode_New’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
msgpack/_cmsgpack.cpp:334:21: error: too few arguments to function ‘PyCodeObject* PyCode_New(int, int, int, int, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*, PyObject*, PyObject*)’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
msgpack/_cmsgpack.cpp:12247:34: note: in expansion of macro ‘__Pyx_PyCode_New’
12247 |   __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_msgpack__unpacker_pyx, __pyx_n_s_default_read_extended_type, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 116, __pyx_L1_error)
      |                                  ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.11/code.h:13,
                 from /usr/include/python3.11/Python.h:70,
                 from msgpack/_cmsgpack.cpp:6:
/usr/include/python3.11/cpython/code.h:153:28: note: declared here
  153 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
msgpack/_cmsgpack.cpp:12259:257: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
12259 | ytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_msgpack__unpacker_pyx, __pyx_n_s_unpackb, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 143, __pyx_L1_error)
      |                                                                                                                                                         ^~~
      |                                                                                                                                                         |
      |                                                                                                                                                         int

msgpack/_cmsgpack.cpp:334:72: note: in definition of macro ‘__Pyx_PyCode_New’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
msgpack/_cmsgpack.cpp:12259:262: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]
12259 |  __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_msgpack__unpacker_pyx, __pyx_n_s_unpackb, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 143, __pyx_L1_error)
      |                                                                                                                                                         ^~~~~~~~~~~~~~~~~
      |                                                                                                                                                         |
      |                                                                                                                                                         PyObject* {aka _object*}

msgpack/_cmsgpack.cpp:334:79: note: in definition of macro ‘__Pyx_PyCode_New’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
msgpack/_cmsgpack.cpp:334:21: error: too few arguments to function ‘PyCodeObject* PyCode_New(int, int, int, int, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*, PyObject*, PyObject*)’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
msgpack/_cmsgpack.cpp:12259:34: note: in expansion of macro ‘__Pyx_PyCode_New’
12259 |   __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 14, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_msgpack__unpacker_pyx, __pyx_n_s_unpackb, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 143, __pyx_L1_error)
      |                                  ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.11/code.h:13,
                 from /usr/include/python3.11/Python.h:70,
                 from msgpack/_cmsgpack.cpp:6:
/usr/include/python3.11/cpython/code.h:153:28: note: declared here
  153 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘int __pyx_pymod_exec__cmsgpack(PyObject*)’:
msgpack/_cmsgpack.cpp:1161:85: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_localsplus’
 1161 |     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
      |                                                                                     ^~~~~~~~~~~~
msgpack/_cmsgpack.cpp:1154:27: note: in definition of macro ‘__Pyx_BUILD_ASSERT_EXPR’
 1154 |     (sizeof(char [1 - 2*!(cond)]) - 1)
      |                           ^~~~
msgpack/_cmsgpack.cpp:12543:3: note: in expansion of macro ‘__Pxy_PyFrame_Initialize_Offsets’
12543 |   __Pxy_PyFrame_Initialize_Offsets();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
msgpack/_cmsgpack.cpp:1161:131: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_localsplus’
 1161 |     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
      |                                                                                                                                   ^~~~~~~~~~~~
msgpack/_cmsgpack.cpp:1154:27: note: in definition of macro ‘__Pyx_BUILD_ASSERT_EXPR’
 1154 |     (sizeof(char [1 - 2*!(cond)]) - 1)
      |                           ^~~~
msgpack/_cmsgpack.cpp:1161:101: note: in expansion of macro ‘Py_MEMBER_SIZE’
 1161 |     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
      |                                                                                                     ^~~~~~~~~~~~~~
msgpack/_cmsgpack.cpp:12543:3: note: in expansion of macro ‘__Pxy_PyFrame_Initialize_Offsets’
12543 |   __Pxy_PyFrame_Initialize_Offsets();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.11/Python.h:39,
                 from msgpack/_cmsgpack.cpp:6:
msgpack/_cmsgpack.cpp:1162:115: error: ‘PyFrameObject’ {aka ‘struct _frame’} has no member named ‘f_localsplus’
 1162 |      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
      |                                                                                                                   ^~~~~~~~~~~~
/usr/include/python3.11/pymacro.h:22:58: note: in definition of macro ‘Py_MEMBER_SIZE’
   22 | #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
      |                                                          ^~~~~~
msgpack/_cmsgpack.cpp:12543:3: note: in expansion of macro ‘__Pxy_PyFrame_Initialize_Offsets’
12543 |   __Pxy_PyFrame_Initialize_Offsets();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘_PyErr_StackItem* __Pyx_PyErr_GetTopmostException(PyThreadState*)’:
msgpack/_cmsgpack.cpp:13370:23: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13370 |     while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
      |                       ^~~~~~~~
msgpack/_cmsgpack.cpp:13370:53: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13370 |     while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
      |                                                     ^~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘void __Pyx__ExceptionSave(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
msgpack/_cmsgpack.cpp:13384:23: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13384 |     *type = exc_info->exc_type;
      |                       ^~~~~~~~
msgpack/_cmsgpack.cpp:13386:21: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
13386 |     *tb = exc_info->exc_traceback;
      |                     ^~~~~~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘void __Pyx__ExceptionReset(PyThreadState*, PyObject*, PyObject*, PyObject*)’:
msgpack/_cmsgpack.cpp:13400:26: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13400 |     tmp_type = exc_info->exc_type;
      |                          ^~~~~~~~
msgpack/_cmsgpack.cpp:13402:24: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
13402 |     tmp_tb = exc_info->exc_traceback;
      |                        ^~~~~~~~~~~~~
msgpack/_cmsgpack.cpp:13403:15: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13403 |     exc_info->exc_type = type;
      |               ^~~~~~~~
msgpack/_cmsgpack.cpp:13405:15: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
13405 |     exc_info->exc_traceback = tb;
      |               ^~~~~~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘int __Pyx__GetException(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
msgpack/_cmsgpack.cpp:13487:30: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13487 |         tmp_type = exc_info->exc_type;
      |                              ^~~~~~~~
msgpack/_cmsgpack.cpp:13489:28: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
13489 |         tmp_tb = exc_info->exc_traceback;
      |                            ^~~~~~~~~~~~~
msgpack/_cmsgpack.cpp:13490:19: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13490 |         exc_info->exc_type = local_type;
      |                   ^~~~~~~~
msgpack/_cmsgpack.cpp:13492:19: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
13492 |         exc_info->exc_traceback = local_tb;
      |                   ^~~~~~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject*, PyObject**, Py_ssize_t, PyObject*)’:
msgpack/_cmsgpack.cpp:13567:15: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
13567 |     ++tstate->recursion_depth;
      |               ^~~~~~~~~~~~~~~
      |               recursion_limit
msgpack/_cmsgpack.cpp:13569:15: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
13569 |     --tstate->recursion_depth;
      |               ^~~~~~~~~~~~~~~
      |               recursion_limit
msgpack/_cmsgpack.cpp: In function ‘PyObject* __Pyx_PyFunction_FastCallDict(PyObject*, PyObject**, Py_ssize_t, PyObject*)’:
msgpack/_cmsgpack.cpp:13596:60: error: ‘CO_NOFREE’ was not declared in this scope
13596 |             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
      |                                                            ^~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘void __Pyx__ExceptionSwap(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
msgpack/_cmsgpack.cpp:13756:26: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13756 |     tmp_type = exc_info->exc_type;
      |                          ^~~~~~~~
msgpack/_cmsgpack.cpp:13758:24: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
13758 |     tmp_tb = exc_info->exc_traceback;
      |                        ^~~~~~~~~~~~~
msgpack/_cmsgpack.cpp:13759:15: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
13759 |     exc_info->exc_type = *type;
      |               ^~~~~~~~
msgpack/_cmsgpack.cpp:13761:15: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
13761 |     exc_info->exc_traceback = *tb;
      |               ^~~~~~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘void __Pyx_ReraiseException()’:
msgpack/_cmsgpack.cpp:14193:22: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
14193 |     type = exc_info->exc_type;
      |                      ^~~~~~~~
msgpack/_cmsgpack.cpp:14195:20: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
14195 |     tb = exc_info->exc_traceback;
      |                    ^~~~~~~~~~~~~
msgpack/_cmsgpack.cpp: In function ‘PyCodeObject* __Pyx_CreateCodeObjectForTraceback(const char*, int, int, const char*)’:
msgpack/_cmsgpack.cpp:14934:9: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
14934 |         py_line,
      |         ^~~~~~~
      |         |
      |         int
msgpack/_cmsgpack.cpp:334:72: note: in definition of macro ‘__Pyx_PyCode_New’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                        ^~~~~
msgpack/_cmsgpack.cpp:14935:9: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]
14935 |         __pyx_empty_bytes  /*PyObject *lnotab*/
      |         ^~~~~~~~~~~~~~~~~
      |         |
      |         PyObject* {aka _object*}
msgpack/_cmsgpack.cpp:334:79: note: in definition of macro ‘__Pyx_PyCode_New’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |                                                                               ^~~~
msgpack/_cmsgpack.cpp:334:21: error: too few arguments to function ‘PyCodeObject* PyCode_New(int, int, int, int, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*, PyObject*, PyObject*)’
  334 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
      |           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
msgpack/_cmsgpack.cpp:14920:15: note: in expansion of macro ‘__Pyx_PyCode_New’
14920 |     py_code = __Pyx_PyCode_New(
      |               ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.11/code.h:13,
                 from /usr/include/python3.11/Python.h:70,
                 from msgpack/_cmsgpack.cpp:6:
/usr/include/python3.11/cpython/code.h:153:28: note: declared here
  153 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from msgpack/unpack.h:391,
                 from msgpack/_cmsgpack.cpp:641:
msgpack/unpack_template.h: In instantiation of ‘int unpack_execute(unpack_context*, const char*, Py_ssize_t, Py_ssize_t*) [with bool construct = true; unpack_context = unpack_context; Py_ssize_t = long int]’:
msgpack/unpack_template.h:447:45:   required from here
msgpack/unpack_template.h:246:48: error: ‘_PyFloat_Unpack4’ was not declared in this scope; did you mean ‘PySlice_Unpack’?
  246 |                     double f = _PyFloat_Unpack4((unsigned char*)n, 0);
      |                                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                PySlice_Unpack
msgpack/unpack_template.h:249:48: error: ‘_PyFloat_Unpack8’ was not declared in this scope; did you mean ‘PySlice_Unpack’?
  249 |                     double f = _PyFloat_Unpack8((unsigned char*)n, 0);
      |                                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                PySlice_Unpack
msgpack/unpack_template.h: In instantiation of ‘int unpack_execute(unpack_context*, const char*, Py_ssize_t, Py_ssize_t*) [with bool construct = false; unpack_context = unpack_context; Py_ssize_t = long int]’:
msgpack/unpack_template.h:448:40:   required from here
msgpack/unpack_template.h:246:48: error: ‘_PyFloat_Unpack4’ was not declared in this scope; did you mean ‘PySlice_Unpack’?
  246 |                     double f = _PyFloat_Unpack4((unsigned char*)n, 0);
      |                                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                PySlice_Unpack
msgpack/unpack_template.h:249:48: error: ‘_PyFloat_Unpack8’ was not declared in this scope; did you mean ‘PySlice_Unpack’?
  249 |                     double f = _PyFloat_Unpack8((unsigned char*)n, 0);
      |                                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                PySlice_Unpack
WARNING: Failed to compile extension modules.
msgpack uses fallback pure python implementation.
command '/usr/bin/gcc' failed with exit code 1

Activity

  1. jfolz commented on Mar 2, 2022

    @jfolz
    Contributor

    _cmsgpack.cpp should be Cython-generated code. That would make this a Cython issue. In fact, _PyFloat_Unpack4 and the like are not referenced in this codebase.

  2. methane commented on Mar 3, 2022

    @methane
    Member

    PyCode_New() is Cython issue. And it is fixed already. Since sdist contains pyx source, you can regenerate c++ source.
    I will release msgpack 1.0.4 that contains C++ source generated by newer Cython.

    On the other hand, I use _PyFloat_(Pack|Unpack)(4|8) in pack_template.h and unpack_template.h
    These APIs are moved to "internal" headers. Using internal headers from third party modules is not impossible, but hard.

    I created https://bugs.python.org/issue46906 to move them back to "cpython" API.
    "cpython" API might not be available Pythons other than CPython. But we don't use _cmsgpack module on PyPy so it is not a big problem at the moment.

  3. jfolz commented on Mar 3, 2022

    @jfolz
    Contributor

    On the other hand, I use _PyFloat_(Pack|Unpack)(4|8) in pack_template.h and unpack_template.h These APIs are moved to "internal" headers. Using internal headers from third party modules is not impossible, but hard.

    My bad. Turns out code search on Github doesn't actually search code properly...

  4. ThomasWaldmann commented on May 16, 2022

    @ThomasWaldmann
    Contributor

    Cython 0.29.29 is out and expected to solve some py311 issues.

    But packages which include cythonized stuff (generated *.c) need to get repackaged using the latest Cython release, see:

    Toblerity/Fiona#1087

    We are running into this with msgpack there: borgbackup/borg#6555

  5. ThomasWaldmann commented on May 22, 2022

    @ThomasWaldmann
    Contributor

    @methane ^ did you see my comment?

  6. methane commented on May 24, 2022

    @methane
    Member

    I saw it but I din't hurry.
    py311 is very early beta. manylinux just supported it. cibuildwheel don't support it yet.
    sdist contains pyx file so you can regenerate .cpp file if you need to test py311.

    But I fixed one bug so I will release next version in a week with recent Cython.

  7. methane commented on May 25, 2022

    @methane
    Member

    @ThomasWaldmann I published v1.0.4rc1. I will release v1.0.4 next week if no problem found.
    py311 wheels won't be released unless cibuildwheel support it by then.

  8. ThomasWaldmann commented on May 25, 2022

    @ThomasWaldmann
    Contributor

    Thanks for the release candidate.

    ========== 1312 passed, 279 skipped, 3 warnings in 1040.57s (0:17:20) ==========
    

    1.0.4rc1 works for borgbackup. \o/

  9. ThomasWaldmann commented on Jun 2, 2022

    @ThomasWaldmann
    Contributor

    BTW, guess py311 compatibility would be worth mentioning in the msgpack-python 1.0.4 changelog.

  10. methane commented on Jun 3, 2022

    @methane
    Member

    OK. I published 1.0.4 to PyPI.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions