Changes:
- 🐛 Fixed: Missed numpy unsigned int types (#219) by @Yc7521
Changes:
- 🐛 Fixed: Don't render pybind11
KeysView
,ValuesView
,ItemsView
class definitions (#211) - 🐛 Fixed: Escape backslashes in stub output (#208)
Changes:
- 🔁 Revert #196 due to poor review
Changes:
- ✨ Automatically replace invalid enum expressions with corresponding valid expression & import (#196) contributed by @ringohoffman
- 🐛 Fixed: do not remove
self
parameter annotation when types do not match (#195) contributed by @ringohoffman
Changes:
- ✨ Added
--numpy-array-use-type-var
flag which reformats the pybind11-generatednumpy.ndarray[numpy.float32[m, 1]]
annotation asnumpy.ndarray[tuple[M, Literal[1]], numpy.dtype[numpy.float32]]
contributed by @ringohoffman (#188)
Changes:
- 🐛 fix: Handle top-level list-like annotations as types (#183)
Changes:
- 🐛 fix: Missing
py::dtype
translation (#179)
Changes:
- 🐛 fix: Wrong import for lowercase
buffer
(#175), issue (#173)
Changes:
- 🐛 fix: Misleading warning that referred to ignored errors (#171)
Changes:
- 🐛 fix: The
typing.Annotated
does not exist in python < 3.9, usetyping_extensions
(#168)
Changes:
- 🐛 fix: Missing function name in error message (#165)
Changes:
- 🐛 fix: Crash on
None
-valued docstring of property getter (#161)
Changes:
- 🐛 fix: Inconsistent
--enum-class-locations
behaviour (#158)
Changes:
- 🐛 fix: Missing
-?
in eum representation regex
Changes:
- 📝 Update
--print-invalid-expressions-as-is
description
Changes:
- 🐛 Fix: Python literals as default arg rendered as
...
(#147) - ✨ Add
--print-safe-value-reprs=REGEX
CLI option to override the print-safe flag of Value (for custom default value representations provided viapybind11::arg_v()
) (#147) - ✨ Add
--enum-class-locations=REGEX:LOC
CLI option to rewrite enum values as valid Python expressions with correct imports. (#147)
<MyEnum.Zero: 0>
) were always treated
as non-printable values and were rendered as ...
.
The invalid expressions should be acknowledged by --enum-class-locations
or --ignore-invalid-expressions
.
Changes:
- ✨ Add
--stub-extension
CLI option (#142)
Changes:
- 🐛 Fix: missing
isinstance
check (#138)
Changes:
- 🐛 Fix: missing subdirectories for top-level submodules (#136)
Changes:
- 🐛 Explicitly set encoding of stubs to utf-8 (#133)
- 🐛 Fix value representation for collections with print-unsafe elements (#132)
Changes:
- 🐛 Fix missing remap of
numpy.ndarray.flags
(#128) - ✨ Process
scipy.sparse.*
types the same asnumpy.ndarray
with--numpy-array-wrap-with-annotated
(#128) - ✨ Support dynamic array size with
--numpy-array-wrap-with-annotated
(#128) - ❗️ Renamed CLI argument
--numpy-array-wrap-with-annotated-fixed-size
to--numpy-array-wrap-with-annotated
(#128)
Changes:
- 🐛 Fix compatibility with Python 3.7..3.9 (#124)
- 🐛 Fix incorrect list of base classes (#123)
- ✨ Replace
typing
collections with builtin types (e.g.typing.List
->list
) according to PEP 585 (#122) - ✨ Add missing translations of pybind types:
function
->Callable
,object
/handle
->typing.Any
(#121) - ✨ Support function-valued default arguments (#119)
- 🐛 Fix missing properties docstrings (#118)
Changes:
- Added
--dry-run
CLI option to skip writing stubs stage (#114 )
1.x
. This allowed me to address some long-standing issues, but I might
accidentally brake behaviour you relied on.
Changes:
- Updated CLI interface, some options were removed, please see
pybind11-stubgen --help
for details - Replaced regex-based signature parsing with more robust procedure which enables to produce partially degraded signatures
- Added type parsing/replacing, including deeply annotated types
- Support implicit imports required for static analysis
- Add introspection of pure python functions
- Support python 3.10+ only (temporarily)
- Improved structure of test binary pybind module