Skip to content

Py wheel fails to build with Python 3.12.0 #9563

@yuanweixin

Description

@yuanweixin

What happens?

duckdb python package 0.9.1 fails to build with python 3.12.0

When I downgrade to python 3.11.0 it builds successfully.

In python 3.12.0, Legacy Unicode APIs based on Py_UNICODE* representation has been removed. Please migrate to APIs based on UTF-8 or wchar_t*.. (https://docs.python.org/dev/whatsnew/3.12.html).

Error message I get:

      src/numpy/numpy_scan.cpp:402:69: error: ‘PyUnicode_WCHAR_KIND’ was not declared in this scope; did you mean ‘PyUnicode_4BYTE_KIND’?
                

To Reproduce

I am using conda, so the repro here is assuming you use it to isolate your dependency.

conda create -n repro python=3.12.0
conda activate repro
pip install duckdb --upgrade --pre

...Downloading duckdb-0.9.2.dev242.tar.gz (10.7 MB)

OS:

Linux devvm 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

DuckDB Version:

0.9.1

DuckDB Client:

python

Full Name:

Wei Xin Yuan

Affiliation:

None

Have you tried this on the latest main branch?

I have tested with a release build (and could not test with a main build)

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions