Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.13 #71

Open
erwald opened this issue Dec 21, 2024 · 0 comments
Open

Support Python 3.13 #71

erwald opened this issue Dec 21, 2024 · 0 comments

Comments

@erwald
Copy link
Contributor

erwald commented Dec 21, 2024

Currently installation fails on Python 3.13, apparently due to msgspec, which itself has not migrated yet:

$ python --version
Python 3.13.1

$ pip install squigglepy
...
Building wheels for collected packages: msgspec
  Building wheel for msgspec (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for msgspec (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [51 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/msgpack.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/_version.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/__init__.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/yaml.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/structs.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/inspect.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/_json_schema.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/json.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/_utils.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/toml.py -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/msgpack.pyi -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/__init__.pyi -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/json.pyi -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/structs.pyi -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      copying msgspec/py.typed -> build/lib.macosx-14.5-x86_64-cpython-313/msgspec
      UPDATING build/lib.macosx-14.5-x86_64-cpython-313/msgspec/_version.py
      set build/lib.macosx-14.5-x86_64-cpython-313/msgspec/_version.py to '0.18.6'
      running build_ext
      building 'msgspec._core' extension
      creating build/temp.macosx-14.5-x86_64-cpython-313/msgspec
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/Users/username/.pyenv/versions/3.13.1/include/python3.13 -c msgspec/_core.c -o build/temp.macosx-14.5-x86_64-cpython-313/msgspec/_core.o
      msgspec/_core.c:500:13: error: call to undeclared function '_PyUnicode_EQ'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
              if (_PyUnicode_EQ(kwname, key)) {
                  ^
      msgspec/_core.c:4452:12: error: call to undeclared function '_PySet_NextEntry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          while (_PySet_NextEntry(state->structs_set, &set_pos, &set_item, &set_hash)) {
                 ^
      msgspec/_core.c:7316:17: error: call to undeclared function '_PyUnicode_EQ'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                  if (_PyUnicode_EQ(kwname, field)) {
                      ^
      msgspec/_core.c:7723:17: error: call to undeclared function '_PyUnicode_EQ'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                  if (_PyUnicode_EQ(kwname, field)) goto kw_found;
                      ^
      msgspec/_core.c:11254:72: error: too few arguments to function call, expected 6, have 5
          int out = _PyLong_AsByteArray((PyLongObject *)int128, buf, 16, 0, 0);
                    ~~~~~~~~~~~~~~~~~~~                                      ^
      /Users/username/.pyenv/versions/3.13.1/include/python3.13/cpython/longobject.h:111:17: note: '_PyLong_AsByteArray' declared here
      PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
                      ^
      msgspec/_core.c:12426:12: error: call to undeclared function '_PySet_NextEntry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          while (_PySet_NextEntry(obj, &ppos, &item, &hash)) {
                 ^
      msgspec/_core.c:13748:12: error: call to undeclared function '_PySet_NextEntry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          while (_PySet_NextEntry(obj, &ppos, &item, &hash)) {
                 ^
      7 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for msgspec
Failed to build msgspec
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (msgspec)

Options include (1) wait for msgspec to release a new version supporting Python 3.13, or (2) factor msgspec out of the codebase.

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

No branches or pull requests

1 participant