Skip to content

Fails to build under Python 3.13 #152

@lwp-joel

Description

@lwp-joel

What did you do?

I built the package using: pip install 'git+https://github.com/uploadcare/pillow-simd'

What did you expect to happen?

Compilation would succeed

What actually happened?

I got this error:

      src/_webp.c:919:28: error: initialization of ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} from incompatible pointer type ‘PyObject * (*)(void)’ {aka ‘struct _object * (*)(v
oid)’} [-Wincompatible-pointer-types]
        919 |     {"WebPDecoderVersion", WebPDecoderVersion_wrapper, METH_NOARGS, "WebPVersion"},
            |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      src/_webp.c:919:28: note: (near initialization for ‘webpMethods[4].ml_meth’)
      src/_webp.c:876:1: note: ‘WebPDecoderVersion_wrapper’ declared here
        876 | WebPDecoderVersion_wrapper() {
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      src/_webp.c:921:6: error: initialization of ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} from incompatible pointer type ‘PyObject * (*)(void)’ {aka ‘struct _object * (*)(vo
id)’} [-Wincompatible-pointer-types]
        921 |      WebPDecoderBuggyAlpha_wrapper,
            |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/_webp.c:921:6: note: (near initialization for ‘webpMethods[5].ml_meth’)
      src/_webp.c:904:1: note: ‘WebPDecoderBuggyAlpha_wrapper’ declared here
        904 | WebPDecoderBuggyAlpha_wrapper() {
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/_imagingft.c: In function ‘getfont’:
      src/_imagingft.c:138:13: warning: ‘Py_FileSystemDefaultEncoding’ is deprecated [-Wdeprecated-declarations]
        138 |             Py_FileSystemDefaultEncoding,
            |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /usr/include/python3.13/Python.h:99,
                       from src/_imagingft.c:22:
      /usr/include/python3.13/fileobject.h:22:46: note: declared here
         22 | Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
            |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      building 'PIL._imagingtk' extension

What are your OS, Python and Pillow versions?

  • OS: Linux 6.15
  • Python: 3.13
  • Pillow: Latest Git (4c0ee09)

Thanks for your work on this project!

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