---
title: "pybind11 3.0 Overhauls C++ to Python Bindings With Smart Pointers"
subtitle: "pybind11 crosses into 3.x with a merged smart-holder, subinterpreter support, Python 3.14 free-threading, and a required ABI bump on Unix."
url: "https://alphasignal.ai/news/pybind11-3-0-overhauls-c-to-python-bindings-with-smart-pointers"
author: "AlphaSignal Newsroom"
author_url: "https://alphasignal.ai/editorial-team"
company: "AlphaSignal"
company_url: "https://alphasignal.ai/company/alphasignal"
published: "2026-04-19T03:05:32.000Z"
updated: "2026-08-22T01:07:10.286Z"
type: "Repo"
topics:
  - "Development"
  - "Open Source"
subtopics:
  - "Code Generation"
upvotes: 11
source_url: "https://github.com/pybind/pybind11"
comments: 0
truncated: true
---

# pybind11 3.0 Overhauls C++ to Python Bindings With Smart Pointers

> pybind11 crosses into 3.x with a merged smart-holder, subinterpreter support, Python 3.14 free-threading, and a required ABI bump on Unix.

The venerable C++ to Python bindings library [pybind11](https://github.com/pybind/pybind11) has crossed into the 3.x line, with a fresh 3.0.4 patch now shipping on top of the biggest overhaul the project has seen in years. [The upgrade guide](https://pybind11.readthedocs.io/en/stable/upgrade.html) confirms that most existing extensions should build and run without modification, though minor adjustments may be needed in rare cases. Extensions built with 3.0 are not ABI-compatible with those built against 2.13.

If you have C++ code exposed to Python anywhere in your ML stack (custom CUDA kernels, tensor ops, simulation environments, feature extractors), this is a release worth tracking.

## What actually landed

The headline items in 3.0 are unusually dense for a library that has spent most of its life doing careful, incremental work. Version 3.0 includes an ABI bump (the first required bump in many years on Unix), the smart-holder branch, multi-phase init and subinterpreter support, `py::native_enum`, an interface to warnings, typing improvements, and more. CMake now defaults to FindPython mode.

A few of these deserve unpacking:

* **Smart holder merged.** After years in development, Google's smart-holder branch has landed. You can now opt into a custom smart pointer, or use any other smart pointer since holders are templated. There is also a `py::classh` shortcut. The new holder supports shared/unique pointer conversion, disowning a Python object, trampoline objects, const smart pointers, and `std::enable_shared_from_this`.
* **Subinterpreters and free-threading.**

_Preview only. Full text requires an AlphaSignal Pro account._

## Sources

- [pybind11 3.0.0 Release Notes](https://github.com/pybind/pybind11/releases)
- [pybind11 Upgrade Guide](https://pybind11.readthedocs.io/en/stable/upgrade.html)
- [pybind11 3.0.0 - ISciNumPy.dev](https://iscinumpy.dev/post/pybind11-3-0-0/)
- [Why another binding library? - nanobind documentation](https://nanobind.readthedocs.io/en/latest/why.html)
- [nanobind documentation](https://nanobind.readthedocs.io/)
