69 Commits (f1a2e03d1966fd778ed40d855f6fcc23abd168cd)

Author SHA1 Message Date
Ralf W. Grosse-Kunstleve f1a2e03d19
feat: remove Python 3.6 support (#5177) 1 year ago
Michael Carlstrom 7c4ac91d75
Add type[T] support to typing.h (#5166) 1 year ago
Michael Carlstrom 68405a1141
Add `Union` and `Optional` to typing.h (#5165) 1 year ago
Thierry Coppey 35ff42b56e
Add a pybind function to clear a list. (#5153) 1 year ago
Henry Schreiner 1a0ff40549
tests: avoid immortal objects in tests (#5150) 1 year ago
Henry Schreiner ae6432b817
fix: Python 3.13t with GIL (#5139) 1 year ago
Ralf W. Grosse-Kunstleve 0efff79f01
Bug fixes: Add missing `handle_type_name` specializations. (#5073) 1 year ago
Jason Watson 65370f330e
Create handle_type_name specialization to type-hint variable length tuples (#5051) 1 year ago
Sergei Izmailov 8c7b8dd0ae
fix: Missing typed variants of `iterator` and `iterable` (#4832) 2 years ago
Dustin Spicuzza f8703154ec
Provide better type hints for a variety of generic types (#4259) 2 years ago
Ralf W. Grosse-Kunstleve 2fb3d7cbde
Trivial refactoring to make the capsule API more user friendly. (#4720) 2 years ago
pre-commit-ci[bot] 3617f3554a
chore(deps): update pre-commit hooks (#4689) 2 years ago
Henry Schreiner 438034c5b8
chore: move to Ruff and add rules (#4483) 2 years ago
Dustin Spicuzza 8dcced29ae
Always display python type information in cast errors (#4463) 2 years ago
Ralf W. Grosse-Kunstleve f12e098f1d
Fix `detail::obj_class_name()` to work correctly for meta classes. (#4436) 3 years ago
Aaron Gokaslan b07223fa69
fix: improve bytes to str decoding error handling (#4294) 3 years ago
Aaron Gokaslan b926396bdf
bugfix: py contains raises errors when appropiate (#4209) 3 years ago
Daniel Galvez 7c6f2f80a7
fix: PyCapsule_GetDestructor is allowed to return a nullptr destructor (#4221) 3 years ago
Aaron Gokaslan b884b9dc6b
chore: Add pytests for constructing pytypes from iterable (#4138) 3 years ago
Aaron Gokaslan f47f1edfe8
Fix #3812 and fix const of inplace assignments (#4065) 3 years ago
Ralf W. Grosse-Kunstleve 1d81191077
Disable implicit conversion of `0` to `pybind11::handle`. (#4008) 3 years ago
Aaron Gokaslan 58802de41b
perf: Add object rvalue overload for accessors. Enables reference stealing (#3970) 3 years ago
Ralf W. Grosse-Kunstleve 9f7b3f735a
addl unit tests for PR #3970 (#3977) 3 years ago
Ed Catmur 68a0b2dfd8
Add anyset & frozenset, enable copying (cast) to std::set (#3901) 3 years ago
Michael Voznesensky f0b9f755e4
Replace error printing code gated by NDEBUG with a new flag: PYBIND11_DETAILED_ERROR_MESSAGES (#3913) 3 years ago
Oleksandr Pavlyk fa98804a07
Adds set_name method of pybind11::capsule class (#3866) 3 years ago
Oleksandr Pavlyk 91a6e129d9
PYBIND11_OBJECT_CVT should use namespace for error_already_set() (#3797) 3 years ago
Peter Hawkins 44596bc4ee
Fix exception handling when pybind11::weakref() fails. (#3739) 3 years ago
Henry Schreiner 522c59ceb2
chore: drop Python 3.5 (#3719) 3 years ago
Ralf W. Grosse-Kunstleve 6493f496e3
Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (#3688) 3 years ago
Sergei Izmailov 5194855900
Render `py::bool_` and `py::float_` without `_` in docstrings (#3622) 4 years ago
Aaron Gokaslan f4c81e0877
maint: Add additional linter-related pre-commit hooks (#3337) 4 years ago
Jeremy Maitin-Shepard 14976c853b
Eliminate duplicate TLS keys for loader_life_support stack (#3275) 4 years ago
Ralf W. Grosse-Kunstleve 6c65ab5950
Follow-on to PR #3254, to address user code breakages. (#3263) 4 years ago
Ralf W. Grosse-Kunstleve 777352fcd1
Adding `ssize_t_cast` to support passing `size_t` or `ssize_t` values where `ssize_t` is needed. (#3219) 4 years ago
Jouke Witteveen 031a700dfd
Add make_simple_namespace function and tests (#2840) 4 years ago
Aaron Gokaslan 9df2f1ff13
maint(precommit): Apply isort (#3195) 4 years ago
Shane Loretz 7331d381af
Raise codec errors when casting to std::string (#2903) 4 years ago
Henry Schreiner 0e2e003508 style: add pyupgrade check, 2.7+ 4 years ago
Robert Haschke c090c8c409
Unify cast_error message thrown by [simple|unpacking]_collector (#3013) 4 years ago
Vikram Pal 417067eeb8
Add pybind11::bytearray (#2799) 4 years ago
Yannick Jadoul 6cf6bf203e
Fix confusing weakref constructor overload (#2832) 4 years ago
Ralf W. Grosse-Kunstleve 0432ae7c52
Changing pybind11::str to exclusively hold PyUnicodeObject (#2409) 5 years ago
Yannick Jadoul 30eb39ed79
fix: also throw in the move-constructor added by the PYBIND11_OBJECT macro, after the argument has been moved-out (if necessary) (#2701) 5 years ago
Henry Schreiner c50f90eca6
style: use Black everywhere (#2594) 5 years ago
Yannick Jadoul 99773fc5f6
fix: throw error_already_set in py::len on failing PyObject_Length (#2575) 5 years ago
Yannick Jadoul f537093a2f
Fail on passing py::object with wrong Python type to py::object subclass using PYBIND11_OBJECT macro (#2349) 5 years ago
Yannick Jadoul fe9ee86ba8
Add check if `str(handle)` correctly converted the object, and throw py::error_already_set if not (bis) (#2477) 5 years ago
Eric Cousineau 44fa79ca80
pytypes: Add Gotchas section about default-constructed wrapper types and py::none() (#2362) 5 years ago
Ralf W. Grosse-Kunstleve 3c061f2168 Fixing `pybind11::bytes()` ambiguous conversion issue. 5 years ago