Skip to content

pybind11>=2.6.0 Insufficient – Update tools/pythonpkg/requirements-dev.txt #16101

@vkuma-arista

Description

@vkuma-arista

What happens?

The tools/pythonpkg/requirements-dev.txt file needs to be updated, as pybind11>=2.6.0 is insufficient.

I have the following installed:

pybind11-devel-2.6.2-4.el9.x86_64
python3-pybind11-2.6.2-4.el9.x86_64

However, the build fails with the following error:

/builddir/build/BUILD/duckdb-1.1.3/tools/pythonpkg/src/include/duckdb_python/python_objects.hpp:237:48: error: ‘const_name’ was not declared in this scope
  237 |         static constexpr auto name = const_name("typing.Optional[") + concat(make_caster<T>::name) + const_name("]");
      |                                      ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/duckdb-1.1.3/tools/pythonpkg/src/include/duckdb_python/python_objects.hpp:237:112: error: ‘const_name’ was not declared in this scope
  237 |         static constexpr auto name = const_name("typing.Optional[") + concat(make_caster<T>::name) + const_name("]");
      |                                                                                                      ~~~~~~~~~~^~~~~

The commit pybind/pybind11@39fbc79#diff-08367c43787b430e7db8cbe20060c3a5c1c2d14e31726475a779d9940efcc075
indicates that const_name was introduced after v2.9.0

It remains unclear whether v2.9.0 is fully sufficient to resolve this issue.

To Reproduce

With pybind version 2.6.x, the python build fails

pybind11-devel-2.6.2-4.el9.x86_64
python3-pybind11-2.6.2-4.el9.x86_64

OS:

AlmaLinux 9.3 x86_64

DuckDB Version:

1.1.3

DuckDB Client:

Python

Hardware:

No response

Full Name:

Vivek Kumar

Affiliation:

Arista Networks

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • 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