pybind11/include/pybind11/detail
crimsoncor 9ea39dc356
Force the builtin module key to be the correct type. (#2814)
* Force the builtin module key to be the correct type.

Previously it was always going to be a std::string which converted into
unicode. Python 2 appears to want module keys to be normal str types, so
this was breaking code that expected plain string types in the
builtins.keys() data structure

* Add a simple unit test to ensure all built-in keys are str

* Update the unit test so it will also run on pypy

* Run pre-commit.

Co-authored-by: Jesse Clemens <jesse.clemens@sony.com>
2021-01-24 09:17:28 -08:00
..
class.h Fix various minor memory leaks in the tests (found by Valgrind in #2746) (#2758) 2021-01-01 17:05:22 +01:00
common.h fix: Intel ICC C++17 compatibility (#2729) 2021-01-17 19:53:07 -05:00
descr.h Change NAMESPACE_* macros into PYBIND11_NAMESPACE_* (#2283) 2020-07-08 18:14:41 -04:00
init.h Throw exception on returning a unique_ptr or shared_ptr nullptr (or any other holder type) from py::init, rather than crashing (#2430) 2020-08-25 18:51:06 +02:00
internals.h Force the builtin module key to be the correct type. (#2814) 2021-01-24 09:17:28 -08:00
typeid.h Change NAMESPACE_* macros into PYBIND11_NAMESPACE_* (#2283) 2020-07-08 18:14:41 -04:00