CadQuery / CadQuery/cadquery

CadQuery Fork of black Will Not Install on Python 3.13

Open
#1,958 4 comments 0 reactions 0 assignees View on GitHub
infrastructure
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

## To Reproduce

```bash
pip install "black@git+https://github.com/cadquery/black.git@cq"
```

## Backtrace

```
Building wheels for collected packages: black, typed-ast
Building wheel for black (pyproject.toml) ... done
Created wheel for black: filename=black-0.1.dev631+gef9d4677d-py36-none-any.whl size=104464 sha256=9b7d6a0d78e1fc733d1d3dd1a7bff1e1c4a2be265b28da9549fc8c5b0ae5596f
Stored in directory: /tmp/pip-ephem-wheel-cache-ot5yy8np/wheels/ca/79/0d/c4f86d7397e424d400236f25772adfedfd8940d720280008ed
Building wheel for typed-ast (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for typed-ast (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-313/typed_ast
copying typed_ast/conversions.py -> build/lib.linux-x86_64-cpython-313/typed_ast
copying typed_ast/ast3.py -> build/lib.linux-x86_64-cpython-313/typed_ast
copying typed_ast/ast27.py -> build/lib.linux-x86_64-cpython-313/typed_ast
copying typed_ast/__init__.py -> build/lib.linux-x86_64-cpython-313/typed_ast
creating build/lib.linux-x86_64-cpython-313/typed_ast/tests
copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-cpython-313/typed_ast/tests
running build_ext
building '_ast27' extension
creating build/temp.linux-x86_64-cpython-313/ast27/Custom
creating build/temp.linux-x86_64-cpython-313/ast27/Parser
creating build/temp.linux-x86_64-cpython-313/ast27/Python
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Iast27/Include -I/home/jwright/venvs/cadquery/include -I/usr/include/python3.13 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-313/ast27/Custom/typed_ast.o
In file included from /usr/include/python3.13/pyport.h:358,
from /usr/include/python3.13/Python.h:63,
from ast27/Custom/typed_ast.c:1:
ast27/Custom/../Include/compile.h:12:12: error: unknown type name ‘PyFutureFeatures’
12 | PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
| ^~~~~~~~~~~~~~~~
/usr/include/python3.13/exports.h:94:53: note: in definition of macro ‘PyAPI_FUNC’
94 | # define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
| ^~~~~
error: command '/usr/bin/x86_64-linux-gnu-gcc' 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 typed-ast
Successfully built black
Failed to build typed-ast
ERROR: Failed to build installable wheels for some pyproject.toml based projects (typed-ast)
```

## Background

In Python 3.13, `PyFutureFeatures` was apparently made inaccessible to packages like `typed_ast`. I am unable to reproduce this install error with current versions of black.

## Environment

OS: Debian 12

No install of CadQuery is needed to reproduce this issue. I am using the pip/git install line that is commented out in our setup.py.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.