xcoll 0.3.3__py3-none-any.whl → 0.3.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xcoll might be problematic. Click here for more details.

Files changed (317) hide show
  1. xcoll/beam_elements/__init__.py +5 -0
  2. xcoll/beam_elements/absorber.py +2 -1
  3. xcoll/beam_elements/base.py +32 -17
  4. xcoll/beam_elements/collimators_src/absorber.h +5 -0
  5. xcoll/beam_elements/everest.py +14 -25
  6. xcoll/colldb.py +50 -27
  7. xcoll/general.py +1 -1
  8. xcoll/headers/checks.h +7 -1
  9. xcoll/impacts/impacts.py +2 -1
  10. xcoll/impacts/impacts_src/impacts.h +1 -6
  11. xcoll/manager.py +5 -5
  12. xcoll/rf_sweep.py +90 -19
  13. xcoll/scattering_routines/everest/__init__.py +5 -0
  14. xcoll/scattering_routines/everest/everest.py +1 -1
  15. xcoll/scattering_routines/fluka/build_fluka_input.py +58 -0
  16. xcoll/scattering_routines/fluka/flukaio/lib/libFlukaIO64.a +0 -0
  17. xcoll/scattering_routines/fluka/flukaio/lib/libFlukaIO64.so +0 -0
  18. xcoll/scattering_routines/fluka/flukaio/src/Connection.d +68 -48
  19. xcoll/scattering_routines/fluka/flukaio/src/Connection.o +0 -0
  20. xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.d +46 -37
  21. xcoll/scattering_routines/fluka/flukaio/src/FlukaIO.o +0 -0
  22. xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.d +28 -25
  23. xcoll/scattering_routines/fluka/flukaio/src/FlukaIOHandshake.o +0 -0
  24. xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.d +67 -47
  25. xcoll/scattering_routines/fluka/flukaio/src/FlukaIOServer.o +0 -0
  26. xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.d +39 -33
  27. xcoll/scattering_routines/fluka/flukaio/src/FortranFlukaIO.o +0 -0
  28. xcoll/scattering_routines/fluka/flukaio/src/NetIO.d +66 -47
  29. xcoll/scattering_routines/fluka/flukaio/src/NetIO.o +0 -0
  30. {xcoll-0.3.3.dist-info → xcoll-0.3.5.dist-info}/METADATA +3 -2
  31. xcoll-0.3.5.dist-info/NOTICE +2 -0
  32. xcoll-0.3.5.dist-info/RECORD +111 -0
  33. {xcoll-0.3.3.dist-info → xcoll-0.3.5.dist-info}/WHEEL +1 -1
  34. xcoll/beam_elements/collimators_src/base_block.h +0 -14
  35. xcoll/beam_elements/collimators_src/base_collimator.h +0 -14
  36. xcoll/beam_elements/collimators_src/invalid_collimator.h +0 -15
  37. xcoll/install_collimators.py +0 -180
  38. xcoll/scattering_routines/geant4/collimasim/.git +0 -1
  39. xcoll/scattering_routines/geant4/collimasim/.gitignore +0 -12
  40. xcoll/scattering_routines/geant4/collimasim/.gitmodules +0 -3
  41. xcoll/scattering_routines/geant4/collimasim/CMakeLists.txt +0 -26
  42. xcoll/scattering_routines/geant4/collimasim/README.md +0 -21
  43. xcoll/scattering_routines/geant4/collimasim/docs/Makefile +0 -20
  44. xcoll/scattering_routines/geant4/collimasim/docs/make.bat +0 -35
  45. xcoll/scattering_routines/geant4/collimasim/docs/source/collimasim.rst +0 -10
  46. xcoll/scattering_routines/geant4/collimasim/docs/source/conf.py +0 -59
  47. xcoll/scattering_routines/geant4/collimasim/docs/source/index.rst +0 -26
  48. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.appveyor.yml +0 -37
  49. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-format +0 -19
  50. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-tidy +0 -65
  51. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.cmake-format.yaml +0 -73
  52. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.git +0 -1
  53. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CODEOWNERS +0 -9
  54. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CONTRIBUTING.md +0 -386
  55. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +0 -45
  56. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/config.yml +0 -8
  57. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/dependabot.yml +0 -16
  58. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler.yml +0 -8
  59. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler_merged.yml +0 -3
  60. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/pull_request_template.md +0 -19
  61. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/ci.yml +0 -969
  62. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/configure.yml +0 -84
  63. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/format.yml +0 -48
  64. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/labeler.yml +0 -16
  65. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/pip.yml +0 -103
  66. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.gitignore +0 -45
  67. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.pre-commit-config.yaml +0 -151
  68. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.readthedocs.yml +0 -3
  69. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/CMakeLists.txt +0 -297
  70. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/LICENSE +0 -29
  71. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/MANIFEST.in +0 -6
  72. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/README.rst +0 -180
  73. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Doxyfile +0 -23
  74. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Makefile +0 -192
  75. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/_static/theme_overrides.css +0 -11
  76. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/chrono.rst +0 -81
  77. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/custom.rst +0 -93
  78. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/eigen.rst +0 -310
  79. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/functional.rst +0 -109
  80. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/index.rst +0 -43
  81. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/overview.rst +0 -171
  82. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/stl.rst +0 -251
  83. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/strings.rst +0 -305
  84. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/classes.rst +0 -1297
  85. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/embedding.rst +0 -262
  86. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/exceptions.rst +0 -396
  87. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/functions.rst +0 -568
  88. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/misc.rst +0 -337
  89. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/index.rst +0 -13
  90. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/numpy.rst +0 -463
  91. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/object.rst +0 -286
  92. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/utilities.rst +0 -155
  93. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/smart_ptrs.rst +0 -174
  94. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/basics.rst +0 -308
  95. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.py +0 -91
  96. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.rst +0 -95
  97. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/changelog.rst +0 -2050
  98. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/classes.rst +0 -542
  99. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/cmake/index.rst +0 -8
  100. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/compiling.rst +0 -648
  101. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/conf.py +0 -381
  102. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/faq.rst +0 -343
  103. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/index.rst +0 -48
  104. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/installing.rst +0 -105
  105. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/limitations.rst +0 -72
  106. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11-logo.png +0 -0
  107. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
  108. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.svg +0 -427
  109. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
  110. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.svg +0 -427
  111. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/reference.rst +0 -130
  112. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/release.rst +0 -96
  113. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/requirements.txt +0 -8
  114. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/upgrade.rst +0 -548
  115. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/attr.h +0 -605
  116. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/buffer_info.h +0 -144
  117. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/cast.h +0 -1432
  118. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/chrono.h +0 -213
  119. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/common.h +0 -2
  120. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/complex.h +0 -65
  121. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/class.h +0 -709
  122. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/common.h +0 -1021
  123. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/descr.h +0 -104
  124. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/init.h +0 -346
  125. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/internals.h +0 -467
  126. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/type_caster_base.h +0 -978
  127. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/typeid.h +0 -55
  128. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eigen.h +0 -606
  129. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/embed.h +0 -284
  130. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eval.h +0 -163
  131. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/functional.h +0 -121
  132. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/gil.h +0 -193
  133. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/iostream.h +0 -275
  134. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/numpy.h +0 -1741
  135. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/operators.h +0 -163
  136. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/options.h +0 -65
  137. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pybind11.h +0 -2497
  138. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pytypes.h +0 -1879
  139. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl/filesystem.h +0 -103
  140. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl.h +0 -375
  141. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl_bind.h +0 -747
  142. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/noxfile.py +0 -88
  143. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__init__.py +0 -11
  144. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__main__.py +0 -52
  145. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.py +0 -12
  146. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.pyi +0 -6
  147. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/commands.py +0 -21
  148. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/py.typed +0 -0
  149. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.py +0 -482
  150. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.pyi +0 -63
  151. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pyproject.toml +0 -41
  152. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.cfg +0 -56
  153. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.py +0 -155
  154. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/CMakeLists.txt +0 -503
  155. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/conftest.py +0 -208
  156. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/constructor_stats.h +0 -275
  157. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/cross_module_gil_utils.cpp +0 -73
  158. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/env.py +0 -33
  159. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/pytest.ini +0 -0
  160. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/test_files.py +0 -279
  161. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/pytest.ini +0 -0
  162. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/test_setuphelper.py +0 -143
  163. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/local_bindings.h +0 -85
  164. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/object.h +0 -179
  165. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_cross_module_tests.cpp +0 -151
  166. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.cpp +0 -91
  167. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.h +0 -85
  168. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pytest.ini +0 -19
  169. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/requirements.txt +0 -12
  170. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.cpp +0 -26
  171. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.py +0 -25
  172. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.cpp +0 -216
  173. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.py +0 -163
  174. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.cpp +0 -286
  175. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.py +0 -536
  176. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.cpp +0 -107
  177. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.py +0 -248
  178. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.cpp +0 -227
  179. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.py +0 -202
  180. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.cpp +0 -84
  181. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.py +0 -210
  182. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.cpp +0 -550
  183. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.py +0 -473
  184. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/CMakeLists.txt +0 -84
  185. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/embed.cpp +0 -21
  186. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +0 -28
  187. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +0 -39
  188. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +0 -46
  189. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/main.cpp +0 -6
  190. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +0 -41
  191. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +0 -35
  192. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +0 -41
  193. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/test.py +0 -10
  194. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.cpp +0 -165
  195. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.py +0 -53
  196. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.cpp +0 -238
  197. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.py +0 -126
  198. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.cpp +0 -141
  199. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.py +0 -117
  200. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.cpp +0 -41
  201. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.py +0 -50
  202. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.cpp +0 -69
  203. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.py +0 -42
  204. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.cpp +0 -348
  205. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.py +0 -771
  206. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/CMakeLists.txt +0 -47
  207. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/catch.cpp +0 -22
  208. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/external_module.cpp +0 -23
  209. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.cpp +0 -326
  210. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.py +0 -15
  211. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.cpp +0 -148
  212. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.py +0 -272
  213. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.cpp +0 -119
  214. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.py +0 -51
  215. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval_call.py +0 -5
  216. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.cpp +0 -285
  217. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.h +0 -12
  218. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.py +0 -265
  219. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.cpp +0 -397
  220. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.py +0 -520
  221. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.cpp +0 -49
  222. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.py +0 -94
  223. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.cpp +0 -125
  224. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.py +0 -331
  225. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.cpp +0 -153
  226. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.py +0 -284
  227. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.cpp +0 -107
  228. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.py +0 -257
  229. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.cpp +0 -412
  230. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.py +0 -517
  231. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.cpp +0 -102
  232. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.py +0 -92
  233. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.cpp +0 -233
  234. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.py +0 -360
  235. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.cpp +0 -472
  236. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.py +0 -593
  237. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.cpp +0 -524
  238. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.py +0 -441
  239. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.cpp +0 -103
  240. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.py +0 -267
  241. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.cpp +0 -73
  242. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.py +0 -59
  243. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.cpp +0 -235
  244. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.py +0 -146
  245. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.cpp +0 -189
  246. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.py +0 -82
  247. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.cpp +0 -560
  248. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.py +0 -651
  249. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.cpp +0 -500
  250. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.py +0 -253
  251. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.cpp +0 -452
  252. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.py +0 -318
  253. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.cpp +0 -342
  254. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.py +0 -291
  255. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.cpp +0 -131
  256. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.py +0 -318
  257. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.cpp +0 -144
  258. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.py +0 -29
  259. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.cpp +0 -66
  260. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.py +0 -44
  261. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.cpp +0 -22
  262. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.py +0 -9
  263. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.cpp +0 -510
  264. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.py +0 -408
  265. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-numpy-scipy.supp +0 -140
  266. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-python.supp +0 -117
  267. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindCatch.cmake +0 -70
  268. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindEigen3.cmake +0 -86
  269. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindPythonLibsNew.cmake +0 -257
  270. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/check-style.sh +0 -44
  271. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/cmake_uninstall.cmake.in +0 -23
  272. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/libsize.py +0 -39
  273. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/make_changelog.py +0 -64
  274. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Common.cmake +0 -402
  275. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Config.cmake.in +0 -233
  276. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11NewTools.cmake +0 -276
  277. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Tools.cmake +0 -214
  278. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pyproject.toml +0 -3
  279. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_global.py.in +0 -65
  280. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_main.py.in +0 -41
  281. xcoll/scattering_routines/geant4/collimasim/pyproject.toml +0 -8
  282. xcoll/scattering_routines/geant4/collimasim/setup.py +0 -144
  283. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.cpp +0 -403
  284. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.hh +0 -100
  285. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.cpp +0 -662
  286. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.hh +0 -110
  287. xcoll/scattering_routines/geant4/collimasim/src/collimasim/__init__.py +0 -8
  288. xcoll/scattering_routines/geant4/collimasim/src/collimasim/bindings.cpp +0 -63
  289. xcoll/scattering_routines/geant4/collimasim/src/collimasim/pyCollimatorPass.py +0 -142
  290. xcoll/scattering_routines/geant4/collimasim/src/collimasim/xtrack_collimator.py +0 -475
  291. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/PKG-INFO +0 -6
  292. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/SOURCES.txt +0 -20
  293. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/dependency_links.txt +0 -1
  294. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/not-zip-safe +0 -1
  295. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/top_level.txt +0 -1
  296. xcoll/scattering_routines/geant4/collimasim/tests/README.md +0 -25
  297. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_new_example.dat +0 -18
  298. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_old_example.dat +0 -68
  299. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_testing.dat +0 -15
  300. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_yaml_example.yaml +0 -110
  301. xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps.dat +0 -7
  302. xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps_pyat_test.dat +0 -3
  303. xcoll/scattering_routines/geant4/collimasim/tests/resources/collonly_twiss_file_example.tfs +0 -54
  304. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings.gmad +0 -3
  305. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings_black_absorber.gmad +0 -3
  306. xcoll/scattering_routines/geant4/collimasim/tests/resources/twiss_file_testing.tfs +0 -51
  307. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat.py +0 -65
  308. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_passmethod.py +0 -59
  309. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_tracking.py +0 -102
  310. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack.py +0 -75
  311. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_angle.py +0 -74
  312. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_colldb_load.py +0 -84
  313. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_interaction.py +0 -159
  314. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tilt.py +0 -80
  315. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tracking.py +0 -97
  316. xcoll-0.3.3.dist-info/RECORD +0 -391
  317. {xcoll-0.3.3.dist-info → xcoll-0.3.5.dist-info}/LICENSE +0 -0
@@ -1,2050 +0,0 @@
1
- .. _changelog:
2
-
3
- Changelog
4
- #########
5
-
6
- Starting with version 1.8.0, pybind11 releases use a `semantic versioning
7
- <http://semver.org>`_ policy.
8
-
9
-
10
- IN DEVELOPMENT
11
- --------------
12
-
13
- * The simple namespace creation shortcut added in 2.8.0 was deprecated due to
14
- usage of CPython internal API, and will be removed soon. Use
15
- ``py::module_::import("types").attr("SimpleNamespace")``.
16
- `#3374 <https://github.com/pybinyyd/pybind11/pull/3374>`_
17
-
18
-
19
- v2.8.0 (Oct 4, 2021)
20
- --------------------
21
-
22
- New features:
23
-
24
- * Added ``py::raise_from`` to enable chaining exceptions.
25
- `#3215 <https://github.com/pybind/pybind11/pull/3215>`_
26
-
27
- * Allow exception translators to be optionally registered local to a module
28
- instead of applying globally across all pybind11 modules. Use
29
- ``register_local_exception_translator(ExceptionTranslator&& translator)``
30
- instead of ``register_exception_translator(ExceptionTranslator&&
31
- translator)`` to keep your exception remapping code local to the module.
32
- `#2650 <https://github.com/pybinyyd/pybind11/pull/2650>`_
33
-
34
- * Add ``make_simple_namespace`` function for instantiating Python
35
- ``SimpleNamespace`` objects. **Deprecated in 2.8.1.**
36
- `#2840 <https://github.com/pybind/pybind11/pull/2840>`_
37
-
38
- * ``pybind11::scoped_interpreter`` and ``initialize_interpreter`` have new
39
- arguments to allow ``sys.argv`` initialization.
40
- `#2341 <https://github.com/pybind/pybind11/pull/2341>`_
41
-
42
- * Allow Python builtins to be used as callbacks in CPython.
43
- `#1413 <https://github.com/pybind/pybind11/pull/1413>`_
44
-
45
- * Added ``view`` to view arrays with a different datatype.
46
- `#987 <https://github.com/pybind/pybind11/pull/987>`_
47
-
48
- * Implemented ``reshape`` on arrays.
49
- `#984 <https://github.com/pybind/pybind11/pull/984>`_
50
-
51
- * Enable defining custom ``__new__`` methods on classes by fixing bug
52
- preventing overriding methods if they have non-pybind11 siblings.
53
- `#3265 <https://github.com/pybind/pybind11/pull/3265>`_
54
-
55
- * Add ``make_value_iterator()``, and fix ``make_key_iterator()`` to return
56
- references instead of copies.
57
- `#3293 <https://github.com/pybind/pybind11/pull/3293>`_
58
-
59
- * Improve the classes generated by ``bind_map``: `#3310 <https://github.com/pybind/pybind11/pull/3310>`_
60
-
61
- * Change ``.items`` from an iterator to a dictionary view.
62
- * Add ``.keys`` and ``.values`` (both dictionary views).
63
- * Allow ``__contains__`` to take any object.
64
-
65
- * ``pybind11::custom_type_setup`` was added, for customizing the
66
- ``PyHeapTypeObject`` corresponding to a class, which may be useful for
67
- enabling garbage collection support, among other things.
68
- `#3287 <https://github.com/pybind/pybind11/pull/3287>`_
69
-
70
-
71
- Changes:
72
-
73
- * Set ``__file__`` constant when running ``eval_file`` in an embedded interpreter.
74
- `#3233 <https://github.com/pybind/pybind11/pull/3233>`_
75
-
76
- * Python objects and (C++17) ``std::optional`` now accepted in ``py::slice``
77
- constructor.
78
- `#1101 <https://github.com/pybind/pybind11/pull/1101>`_
79
-
80
- * The pybind11 proxy types ``str``, ``bytes``, ``bytearray``, ``tuple``,
81
- ``list`` now consistently support passing ``ssize_t`` values for sizes and
82
- indexes. Previously, only ``size_t`` was accepted in several interfaces.
83
- `#3219 <https://github.com/pybind/pybind11/pull/3219>`_
84
-
85
- * Avoid evaluating ``PYBIND11_TLS_REPLACE_VALUE`` arguments more than once.
86
- `#3290 <https://github.com/pybind/pybind11/pull/3290>`_
87
-
88
- Fixes:
89
-
90
- * Bug fix: enum value's ``__int__`` returning non-int when underlying type is
91
- bool or of char type.
92
- `#1334 <https://github.com/pybind/pybind11/pull/1334>`_
93
-
94
- * Fixes bug in setting error state in Capsule's pointer methods.
95
- `#3261 <https://github.com/pybind/pybind11/pull/3261>`_
96
-
97
- * A long-standing memory leak in ``py::cpp_function::initialize`` was fixed.
98
- `#3229 <https://github.com/pybind/pybind11/pull/3229>`_
99
-
100
- * Fixes thread safety for some ``pybind11::type_caster`` which require lifetime
101
- extension, such as for ``std::string_view``.
102
- `#3237 <https://github.com/pybind/pybind11/pull/3237>`_
103
-
104
- * Restore compatibility with gcc 4.8.4 as distributed by ubuntu-trusty, linuxmint-17.
105
- `#3270 <https://github.com/pybind/pybind11/pull/3270>`_
106
-
107
-
108
- Build system improvements:
109
-
110
- * Fix regression in CMake Python package config: improper use of absolute path.
111
- `#3144 <https://github.com/pybind/pybind11/pull/3144>`_
112
-
113
- * Cached Python version information could become stale when CMake was re-run
114
- with a different Python version. The build system now detects this and
115
- updates this information.
116
- `#3299 <https://github.com/pybind/pybind11/pull/3299>`_
117
-
118
- * Specified UTF8-encoding in setup.py calls of open().
119
- `#3137 <https://github.com/pybind/pybind11/pull/3137>`_
120
-
121
- * Fix a harmless warning from CMake 3.21 with the classic Python discovery.
122
- `#3220 <https://github.com/pybind/pybind11/pull/3220>`_
123
-
124
- * Eigen repo and version can now be specified as cmake options.
125
- `#3324 <https://github.com/pybind/pybind11/pull/3324>`_
126
-
127
-
128
- Backend and tidying up:
129
-
130
- * Reduced thread-local storage required for keeping alive temporary data for
131
- type conversion to one key per ABI version, rather than one key per extension
132
- module. This makes the total thread-local storage required by pybind11 2
133
- keys per ABI version.
134
- `#3275 <https://github.com/pybind/pybind11/pull/3275>`_
135
-
136
- * Optimize NumPy array construction with additional moves.
137
- `#3183 <https://github.com/pybind/pybind11/pull/3183>`_
138
-
139
- * Conversion to ``std::string`` and ``std::string_view`` now avoids making an
140
- extra copy of the data on Python >= 3.3.
141
- `#3257 <https://github.com/pybind/pybind11/pull/3257>`_
142
-
143
- * Remove const modifier from certain C++ methods on Python collections
144
- (``list``, ``set``, ``dict``) such as (``clear()``, ``append()``,
145
- ``insert()``, etc...) and annotated them with ``py-non-const``.
146
-
147
- * Enable readability ``clang-tidy-const-return`` and remove useless consts.
148
- `#3254 <https://github.com/pybind/pybind11/pull/3254>`_
149
- `#3194 <https://github.com/pybind/pybind11/pull/3194>`_
150
-
151
- * The clang-tidy ``google-explicit-constructor`` option was enabled.
152
- `#3250 <https://github.com/pybind/pybind11/pull/3250>`_
153
-
154
- * Mark a pytype move constructor as noexcept (perf).
155
- `#3236 <https://github.com/pybind/pybind11/pull/3236>`_
156
-
157
- * Enable clang-tidy check to guard against inheritance slicing.
158
- `#3210 <https://github.com/pybind/pybind11/pull/3210>`_
159
-
160
- * Legacy warning suppression pragma were removed from eigen.h. On Unix
161
- platforms, please use -isystem for Eigen include directories, to suppress
162
- compiler warnings originating from Eigen headers. Note that CMake does this
163
- by default. No adjustments are needed for Windows.
164
- `#3198 <https://github.com/pybind/pybind11/pull/3198>`_
165
-
166
- * Format pybind11 with isort consistent ordering of imports
167
- `#3195 <https://github.com/pybind/pybind11/pull/3195>`_
168
-
169
- * The warnings-suppression "pragma clamp" at the top/bottom of pybind11 was
170
- removed, clearing the path to refactoring and IWYU cleanup.
171
- `#3186 <https://github.com/pybind/pybind11/pull/3186>`_
172
-
173
- * Enable most bugprone checks in clang-tidy and fix the found potential bugs
174
- and poor coding styles.
175
- `#3166 <https://github.com/pybind/pybind11/pull/3166>`_
176
-
177
- * Add ``clang-tidy-readability`` rules to make boolean casts explicit improving
178
- code readability. Also enabled other misc and readability clang-tidy checks.
179
- `#3148 <https://github.com/pybind/pybind11/pull/3148>`_
180
-
181
- * Move object in ``.pop()`` for list.
182
- `#3116 <https://github.com/pybind/pybind11/pull/3116>`_
183
-
184
-
185
-
186
-
187
- v2.7.1 (Aug 3, 2021)
188
- ---------------------
189
-
190
- Minor missing functionality added:
191
-
192
- * Allow Python builtins to be used as callbacks in CPython.
193
- `#1413 <https://github.com/pybind/pybind11/pull/1413>`_
194
-
195
- Bug fixes:
196
-
197
- * Fix regression in CMake Python package config: improper use of absolute path.
198
- `#3144 <https://github.com/pybind/pybind11/pull/3144>`_
199
-
200
- * Fix Mingw64 and add to the CI testing matrix.
201
- `#3132 <https://github.com/pybind/pybind11/pull/3132>`_
202
-
203
- * Specified UTF8-encoding in setup.py calls of open().
204
- `#3137 <https://github.com/pybind/pybind11/pull/3137>`_
205
-
206
- * Add clang-tidy-readability rules to make boolean casts explicit improving
207
- code readability. Also enabled other misc and readability clang-tidy checks.
208
- `#3148 <https://github.com/pybind/pybind11/pull/3148>`_
209
-
210
- * Move object in ``.pop()`` for list.
211
- `#3116 <https://github.com/pybind/pybind11/pull/3116>`_
212
-
213
- Backend and tidying up:
214
-
215
- * Removed and fixed warning suppressions.
216
- `#3127 <https://github.com/pybind/pybind11/pull/3127>`_
217
- `#3129 <https://github.com/pybind/pybind11/pull/3129>`_
218
- `#3135 <https://github.com/pybind/pybind11/pull/3135>`_
219
- `#3141 <https://github.com/pybind/pybind11/pull/3141>`_
220
- `#3142 <https://github.com/pybind/pybind11/pull/3142>`_
221
- `#3150 <https://github.com/pybind/pybind11/pull/3150>`_
222
- `#3152 <https://github.com/pybind/pybind11/pull/3152>`_
223
- `#3160 <https://github.com/pybind/pybind11/pull/3160>`_
224
- `#3161 <https://github.com/pybind/pybind11/pull/3161>`_
225
-
226
-
227
- v2.7.0 (Jul 16, 2021)
228
- ---------------------
229
-
230
- New features:
231
-
232
- * Enable ``py::implicitly_convertible<py::none, ...>`` for
233
- ``py::class_``-wrapped types.
234
- `#3059 <https://github.com/pybind/pybind11/pull/3059>`_
235
-
236
- * Allow function pointer extraction from overloaded functions.
237
- `#2944 <https://github.com/pybind/pybind11/pull/2944>`_
238
-
239
- * NumPy: added ``.char_()`` to type which gives the NumPy public ``char``
240
- result, which also distinguishes types by bit length (unlike ``.kind()``).
241
- `#2864 <https://github.com/pybind/pybind11/pull/2864>`_
242
-
243
- * Add ``pybind11::bytearray`` to manipulate ``bytearray`` similar to ``bytes``.
244
- `#2799 <https://github.com/pybind/pybind11/pull/2799>`_
245
-
246
- * ``pybind11/stl/filesystem.h`` registers a type caster that, on C++17/Python
247
- 3.6+, converts ``std::filesystem::path`` to ``pathlib.Path`` and any
248
- ``os.PathLike`` to ``std::filesystem::path``.
249
- `#2730 <https://github.com/pybind/pybind11/pull/2730>`_
250
-
251
- * A ``PYBIND11_VERSION_HEX`` define was added, similar to ``PY_VERSION_HEX``.
252
- `#3120 <https://github.com/pybind/pybind11/pull/3120>`_
253
-
254
-
255
-
256
- Changes:
257
-
258
- * ``py::str`` changed to exclusively hold ``PyUnicodeObject``. Previously
259
- ``py::str`` could also hold ``bytes``, which is probably surprising, was
260
- never documented, and can mask bugs (e.g. accidental use of ``py::str``
261
- instead of ``py::bytes``).
262
- `#2409 <https://github.com/pybind/pybind11/pull/2409>`_
263
-
264
- * Add a safety guard to ensure that the Python GIL is held when C++ calls back
265
- into Python via ``object_api<>::operator()`` (e.g. ``py::function``
266
- ``__call__``). (This feature is available for Python 3.6+ only.)
267
- `#2919 <https://github.com/pybind/pybind11/pull/2919>`_
268
-
269
- * Catch a missing ``self`` argument in calls to ``__init__()``.
270
- `#2914 <https://github.com/pybind/pybind11/pull/2914>`_
271
-
272
- * Use ``std::string_view`` if available to avoid a copy when passing an object
273
- to a ``std::ostream``.
274
- `#3042 <https://github.com/pybind/pybind11/pull/3042>`_
275
-
276
- * An important warning about thread safety was added to the ``iostream.h``
277
- documentation; attempts to make ``py::scoped_ostream_redirect`` thread safe
278
- have been removed, as it was only partially effective.
279
- `#2995 <https://github.com/pybind/pybind11/pull/2995>`_
280
-
281
-
282
- Fixes:
283
-
284
- * Performance: avoid unnecessary strlen calls.
285
- `#3058 <https://github.com/pybind/pybind11/pull/3058>`_
286
-
287
- * Fix auto-generated documentation string when using ``const T`` in
288
- ``pyarray_t``.
289
- `#3020 <https://github.com/pybind/pybind11/pull/3020>`_
290
-
291
- * Unify error messages thrown by ``simple_collector``/``unpacking_collector``.
292
- `#3013 <https://github.com/pybind/pybind11/pull/3013>`_
293
-
294
- * ``pybind11::builtin_exception`` is now explicitly exported, which means the
295
- types included/defined in different modules are identical, and exceptions
296
- raised in different modules can be caught correctly. The documentation was
297
- updated to explain that custom exceptions that are used across module
298
- boundaries need to be explicitly exported as well.
299
- `#2999 <https://github.com/pybind/pybind11/pull/2999>`_
300
-
301
- * Fixed exception when printing UTF-8 to a ``scoped_ostream_redirect``.
302
- `#2982 <https://github.com/pybind/pybind11/pull/2982>`_
303
-
304
- * Pickle support enhancement: ``setstate`` implementation will attempt to
305
- ``setattr`` ``__dict__`` only if the unpickled ``dict`` object is not empty,
306
- to not force use of ``py::dynamic_attr()`` unnecessarily.
307
- `#2972 <https://github.com/pybind/pybind11/pull/2972>`_
308
-
309
- * Allow negative timedelta values to roundtrip.
310
- `#2870 <https://github.com/pybind/pybind11/pull/2870>`_
311
-
312
- * Fix unchecked errors could potentially swallow signals/other exceptions.
313
- `#2863 <https://github.com/pybind/pybind11/pull/2863>`_
314
-
315
- * Add null pointer check with ``std::localtime``.
316
- `#2846 <https://github.com/pybind/pybind11/pull/2846>`_
317
-
318
- * Fix the ``weakref`` constructor from ``py::object`` to create a new
319
- ``weakref`` on conversion.
320
- `#2832 <https://github.com/pybind/pybind11/pull/2832>`_
321
-
322
- * Avoid relying on exceptions in C++17 when getting a ``shared_ptr`` holder
323
- from a ``shared_from_this`` class.
324
- `#2819 <https://github.com/pybind/pybind11/pull/2819>`_
325
-
326
- * Allow the codec's exception to be raised instead of :code:`RuntimeError` when
327
- casting from :code:`py::str` to :code:`std::string`.
328
- `#2903 <https://github.com/pybind/pybind11/pull/2903>`_
329
-
330
-
331
- Build system improvements:
332
-
333
- * In ``setup_helpers.py``, test for platforms that have some multiprocessing
334
- features but lack semaphores, which ``ParallelCompile`` requires.
335
- `#3043 <https://github.com/pybind/pybind11/pull/3043>`_
336
-
337
- * Fix ``pybind11_INCLUDE_DIR`` in case ``CMAKE_INSTALL_INCLUDEDIR`` is
338
- absolute.
339
- `#3005 <https://github.com/pybind/pybind11/pull/3005>`_
340
-
341
- * Fix bug not respecting ``WITH_SOABI`` or ``WITHOUT_SOABI`` to CMake.
342
- `#2938 <https://github.com/pybind/pybind11/pull/2938>`_
343
-
344
- * Fix the default ``Pybind11Extension`` compilation flags with a Mingw64 python.
345
- `#2921 <https://github.com/pybind/pybind11/pull/2921>`_
346
-
347
- * Clang on Windows: do not pass ``/MP`` (ignored flag).
348
- `#2824 <https://github.com/pybind/pybind11/pull/2824>`_
349
-
350
- * ``pybind11.setup_helpers.intree_extensions`` can be used to generate
351
- ``Pybind11Extension`` instances from cpp files placed in the Python package
352
- source tree.
353
- `#2831 <https://github.com/pybind/pybind11/pull/2831>`_
354
-
355
- Backend and tidying up:
356
-
357
- * Enable clang-tidy performance, readability, and modernization checks
358
- throughout the codebase to enforce best coding practices.
359
- `#3046 <https://github.com/pybind/pybind11/pull/3046>`_,
360
- `#3049 <https://github.com/pybind/pybind11/pull/3049>`_,
361
- `#3051 <https://github.com/pybind/pybind11/pull/3051>`_,
362
- `#3052 <https://github.com/pybind/pybind11/pull/3052>`_,
363
- `#3080 <https://github.com/pybind/pybind11/pull/3080>`_, and
364
- `#3094 <https://github.com/pybind/pybind11/pull/3094>`_
365
-
366
-
367
- * Checks for common misspellings were added to the pre-commit hooks.
368
- `#3076 <https://github.com/pybind/pybind11/pull/3076>`_
369
-
370
- * Changed ``Werror`` to stricter ``Werror-all`` for Intel compiler and fixed
371
- minor issues.
372
- `#2948 <https://github.com/pybind/pybind11/pull/2948>`_
373
-
374
- * Fixed compilation with GCC < 5 when the user defines ``_GLIBCXX_USE_CXX11_ABI``.
375
- `#2956 <https://github.com/pybind/pybind11/pull/2956>`_
376
-
377
- * Added nox support for easier local testing and linting of contributions.
378
- `#3101 <https://github.com/pybind/pybind11/pull/3101>`_ and
379
- `#3121 <https://github.com/pybind/pybind11/pull/3121>`_
380
-
381
- * Avoid RTD style issue with docutils 0.17+.
382
- `#3119 <https://github.com/pybind/pybind11/pull/3119>`_
383
-
384
- * Support pipx run, such as ``pipx run pybind11 --include`` for a quick compile.
385
- `#3117 <https://github.com/pybind/pybind11/pull/3117>`_
386
-
387
-
388
-
389
- v2.6.2 (Jan 26, 2021)
390
- ---------------------
391
-
392
- Minor missing functionality added:
393
-
394
- * enum: add missing Enum.value property.
395
- `#2739 <https://github.com/pybind/pybind11/pull/2739>`_
396
-
397
- * Allow thread termination to be avoided during shutdown for CPython 3.7+ via
398
- ``.disarm`` for ``gil_scoped_acquire``/``gil_scoped_release``.
399
- `#2657 <https://github.com/pybind/pybind11/pull/2657>`_
400
-
401
- Fixed or improved behavior in a few special cases:
402
-
403
- * Fix bug where the constructor of ``object`` subclasses would not throw on
404
- being passed a Python object of the wrong type.
405
- `#2701 <https://github.com/pybind/pybind11/pull/2701>`_
406
-
407
- * The ``type_caster`` for integers does not convert Python objects with
408
- ``__int__`` anymore with ``noconvert`` or during the first round of trying
409
- overloads.
410
- `#2698 <https://github.com/pybind/pybind11/pull/2698>`_
411
-
412
- * When casting to a C++ integer, ``__index__`` is always called and not
413
- considered as conversion, consistent with Python 3.8+.
414
- `#2801 <https://github.com/pybind/pybind11/pull/2801>`_
415
-
416
- Build improvements:
417
-
418
- * Setup helpers: ``extra_compile_args`` and ``extra_link_args`` automatically set by
419
- Pybind11Extension are now prepended, which allows them to be overridden
420
- by user-set ``extra_compile_args`` and ``extra_link_args``.
421
- `#2808 <https://github.com/pybind/pybind11/pull/2808>`_
422
-
423
- * Setup helpers: Don't trigger unused parameter warning.
424
- `#2735 <https://github.com/pybind/pybind11/pull/2735>`_
425
-
426
- * CMake: Support running with ``--warn-uninitialized`` active.
427
- `#2806 <https://github.com/pybind/pybind11/pull/2806>`_
428
-
429
- * CMake: Avoid error if included from two submodule directories.
430
- `#2804 <https://github.com/pybind/pybind11/pull/2804>`_
431
-
432
- * CMake: Fix ``STATIC`` / ``SHARED`` being ignored in FindPython mode.
433
- `#2796 <https://github.com/pybind/pybind11/pull/2796>`_
434
-
435
- * CMake: Respect the setting for ``CMAKE_CXX_VISIBILITY_PRESET`` if defined.
436
- `#2793 <https://github.com/pybind/pybind11/pull/2793>`_
437
-
438
- * CMake: Fix issue with FindPython2/FindPython3 not working with ``pybind11::embed``.
439
- `#2662 <https://github.com/pybind/pybind11/pull/2662>`_
440
-
441
- * CMake: mixing local and installed pybind11's would prioritize the installed
442
- one over the local one (regression in 2.6.0).
443
- `#2716 <https://github.com/pybind/pybind11/pull/2716>`_
444
-
445
-
446
- Bug fixes:
447
-
448
- * Fixed segfault in multithreaded environments when using
449
- ``scoped_ostream_redirect``.
450
- `#2675 <https://github.com/pybind/pybind11/pull/2675>`_
451
-
452
- * Leave docstring unset when all docstring-related options are disabled, rather
453
- than set an empty string.
454
- `#2745 <https://github.com/pybind/pybind11/pull/2745>`_
455
-
456
- * The module key in builtins that pybind11 uses to store its internals changed
457
- from std::string to a python str type (more natural on Python 2, no change on
458
- Python 3).
459
- `#2814 <https://github.com/pybind/pybind11/pull/2814>`_
460
-
461
- * Fixed assertion error related to unhandled (later overwritten) exception in
462
- CPython 3.8 and 3.9 debug builds.
463
- `#2685 <https://github.com/pybind/pybind11/pull/2685>`_
464
-
465
- * Fix ``py::gil_scoped_acquire`` assert with CPython 3.9 debug build.
466
- `#2683 <https://github.com/pybind/pybind11/pull/2683>`_
467
-
468
- * Fix issue with a test failing on pytest 6.2.
469
- `#2741 <https://github.com/pybind/pybind11/pull/2741>`_
470
-
471
- Warning fixes:
472
-
473
- * Fix warning modifying constructor parameter 'flag' that shadows a field of
474
- 'set_flag' ``[-Wshadow-field-in-constructor-modified]``.
475
- `#2780 <https://github.com/pybind/pybind11/pull/2780>`_
476
-
477
- * Suppressed some deprecation warnings about old-style
478
- ``__init__``/``__setstate__`` in the tests.
479
- `#2759 <https://github.com/pybind/pybind11/pull/2759>`_
480
-
481
- Valgrind work:
482
-
483
- * Fix invalid access when calling a pybind11 ``__init__`` on a non-pybind11
484
- class instance.
485
- `#2755 <https://github.com/pybind/pybind11/pull/2755>`_
486
-
487
- * Fixed various minor memory leaks in pybind11's test suite.
488
- `#2758 <https://github.com/pybind/pybind11/pull/2758>`_
489
-
490
- * Resolved memory leak in cpp_function initialization when exceptions occurred.
491
- `#2756 <https://github.com/pybind/pybind11/pull/2756>`_
492
-
493
- * Added a Valgrind build, checking for leaks and memory-related UB, to CI.
494
- `#2746 <https://github.com/pybind/pybind11/pull/2746>`_
495
-
496
- Compiler support:
497
-
498
- * Intel compiler was not activating C++14 support due to a broken define.
499
- `#2679 <https://github.com/pybind/pybind11/pull/2679>`_
500
-
501
- * Support ICC and NVIDIA HPC SDK in C++17 mode.
502
- `#2729 <https://github.com/pybind/pybind11/pull/2729>`_
503
-
504
- * Support Intel OneAPI compiler (ICC 20.2) and add to CI.
505
- `#2573 <https://github.com/pybind/pybind11/pull/2573>`_
506
-
507
-
508
-
509
- v2.6.1 (Nov 11, 2020)
510
- ---------------------
511
-
512
- * ``py::exec``, ``py::eval``, and ``py::eval_file`` now add the builtins module
513
- as ``"__builtins__"`` to their ``globals`` argument, better matching ``exec``
514
- and ``eval`` in pure Python.
515
- `#2616 <https://github.com/pybind/pybind11/pull/2616>`_
516
-
517
- * ``setup_helpers`` will no longer set a minimum macOS version higher than the
518
- current version.
519
- `#2622 <https://github.com/pybind/pybind11/pull/2622>`_
520
-
521
- * Allow deleting static properties.
522
- `#2629 <https://github.com/pybind/pybind11/pull/2629>`_
523
-
524
- * Seal a leak in ``def_buffer``, cleaning up the ``capture`` object after the
525
- ``class_`` object goes out of scope.
526
- `#2634 <https://github.com/pybind/pybind11/pull/2634>`_
527
-
528
- * ``pybind11_INCLUDE_DIRS`` was incorrect, potentially causing a regression if
529
- it was expected to include ``PYTHON_INCLUDE_DIRS`` (please use targets
530
- instead).
531
- `#2636 <https://github.com/pybind/pybind11/pull/2636>`_
532
-
533
- * Added parameter names to the ``py::enum_`` constructor and methods, avoiding
534
- ``arg0`` in the generated docstrings.
535
- `#2637 <https://github.com/pybind/pybind11/pull/2637>`_
536
-
537
- * Added ``needs_recompile`` optional function to the ``ParallelCompiler``
538
- helper, to allow a recompile to be skipped based on a user-defined function.
539
- `#2643 <https://github.com/pybind/pybind11/pull/2643>`_
540
-
541
-
542
- v2.6.0 (Oct 21, 2020)
543
- ---------------------
544
-
545
- See :ref:`upgrade-guide-2.6` for help upgrading to the new version.
546
-
547
- New features:
548
-
549
- * Keyword-only arguments supported in Python 2 or 3 with ``py::kw_only()``.
550
- `#2100 <https://github.com/pybind/pybind11/pull/2100>`_
551
-
552
- * Positional-only arguments supported in Python 2 or 3 with ``py::pos_only()``.
553
- `#2459 <https://github.com/pybind/pybind11/pull/2459>`_
554
-
555
- * ``py::is_final()`` class modifier to block subclassing (CPython only).
556
- `#2151 <https://github.com/pybind/pybind11/pull/2151>`_
557
-
558
- * Added ``py::prepend()``, allowing a function to be placed at the beginning of
559
- the overload chain.
560
- `#1131 <https://github.com/pybind/pybind11/pull/1131>`_
561
-
562
- * Access to the type object now provided with ``py::type::of<T>()`` and
563
- ``py::type::of(h)``.
564
- `#2364 <https://github.com/pybind/pybind11/pull/2364>`_
565
-
566
- * Perfect forwarding support for methods.
567
- `#2048 <https://github.com/pybind/pybind11/pull/2048>`_
568
-
569
- * Added ``py::error_already_set::discard_as_unraisable()``.
570
- `#2372 <https://github.com/pybind/pybind11/pull/2372>`_
571
-
572
- * ``py::hash`` is now public.
573
- `#2217 <https://github.com/pybind/pybind11/pull/2217>`_
574
-
575
- * ``py::class_<union_type>`` is now supported. Note that writing to one data
576
- member of the union and reading another (type punning) is UB in C++. Thus
577
- pybind11-bound enums should never be used for such conversions.
578
- `#2320 <https://github.com/pybind/pybind11/pull/2320>`_.
579
-
580
- * Classes now check local scope when registering members, allowing a subclass
581
- to have a member with the same name as a parent (such as an enum).
582
- `#2335 <https://github.com/pybind/pybind11/pull/2335>`_
583
-
584
- Code correctness features:
585
-
586
- * Error now thrown when ``__init__`` is forgotten on subclasses.
587
- `#2152 <https://github.com/pybind/pybind11/pull/2152>`_
588
-
589
- * Throw error if conversion to a pybind11 type if the Python object isn't a
590
- valid instance of that type, such as ``py::bytes(o)`` when ``py::object o``
591
- isn't a bytes instance.
592
- `#2349 <https://github.com/pybind/pybind11/pull/2349>`_
593
-
594
- * Throw if conversion to ``str`` fails.
595
- `#2477 <https://github.com/pybind/pybind11/pull/2477>`_
596
-
597
-
598
- API changes:
599
-
600
- * ``py::module`` was renamed ``py::module_`` to avoid issues with C++20 when
601
- used unqualified, but an alias ``py::module`` is provided for backward
602
- compatibility.
603
- `#2489 <https://github.com/pybind/pybind11/pull/2489>`_
604
-
605
- * Public constructors for ``py::module_`` have been deprecated; please use
606
- ``pybind11::module_::create_extension_module`` if you were using the public
607
- constructor (fairly rare after ``PYBIND11_MODULE`` was introduced).
608
- `#2552 <https://github.com/pybind/pybind11/pull/2552>`_
609
-
610
- * ``PYBIND11_OVERLOAD*`` macros and ``get_overload`` function replaced by
611
- correctly-named ``PYBIND11_OVERRIDE*`` and ``get_override``, fixing
612
- inconsistencies in the presence of a closing ``;`` in these macros.
613
- ``get_type_overload`` is deprecated.
614
- `#2325 <https://github.com/pybind/pybind11/pull/2325>`_
615
-
616
- Packaging / building improvements:
617
-
618
- * The Python package was reworked to be more powerful and useful.
619
- `#2433 <https://github.com/pybind/pybind11/pull/2433>`_
620
-
621
- * :ref:`build-setuptools` is easier thanks to a new
622
- ``pybind11.setup_helpers`` module, which provides utilities to use
623
- setuptools with pybind11. It can be used via PEP 518, ``setup_requires``,
624
- or by directly importing or copying ``setup_helpers.py`` into your project.
625
-
626
- * CMake configuration files are now included in the Python package. Use
627
- ``pybind11.get_cmake_dir()`` or ``python -m pybind11 --cmakedir`` to get
628
- the directory with the CMake configuration files, or include the
629
- site-packages location in your ``CMAKE_MODULE_PATH``. Or you can use the
630
- new ``pybind11[global]`` extra when you install ``pybind11``, which
631
- installs the CMake files and headers into your base environment in the
632
- standard location.
633
-
634
- * ``pybind11-config`` is another way to write ``python -m pybind11`` if you
635
- have your PATH set up.
636
-
637
- * Added external typing support to the helper module, code from
638
- ``import pybind11`` can now be type checked.
639
- `#2588 <https://github.com/pybind/pybind11/pull/2588>`_
640
-
641
- * Minimum CMake required increased to 3.4.
642
- `#2338 <https://github.com/pybind/pybind11/pull/2338>`_ and
643
- `#2370 <https://github.com/pybind/pybind11/pull/2370>`_
644
-
645
- * Full integration with CMake’s C++ standard system and compile features
646
- replaces ``PYBIND11_CPP_STANDARD``.
647
-
648
- * Generated config file is now portable to different Python/compiler/CMake
649
- versions.
650
-
651
- * Virtual environments prioritized if ``PYTHON_EXECUTABLE`` is not set
652
- (``venv``, ``virtualenv``, and ``conda``) (similar to the new FindPython
653
- mode).
654
-
655
- * Other CMake features now natively supported, like
656
- ``CMAKE_INTERPROCEDURAL_OPTIMIZATION``, ``set(CMAKE_CXX_VISIBILITY_PRESET
657
- hidden)``.
658
-
659
- * ``CUDA`` as a language is now supported.
660
-
661
- * Helper functions ``pybind11_strip``, ``pybind11_extension``,
662
- ``pybind11_find_import`` added, see :doc:`cmake/index`.
663
-
664
- * Optional :ref:`find-python-mode` and :ref:`nopython-mode` with CMake.
665
- `#2370 <https://github.com/pybind/pybind11/pull/2370>`_
666
-
667
- * Uninstall target added.
668
- `#2265 <https://github.com/pybind/pybind11/pull/2265>`_ and
669
- `#2346 <https://github.com/pybind/pybind11/pull/2346>`_
670
-
671
- * ``pybind11_add_module()`` now accepts an optional ``OPT_SIZE`` flag that
672
- switches the binding target to size-based optimization if the global build
673
- type can not always be fixed to ``MinSizeRel`` (except in debug mode, where
674
- optimizations remain disabled). ``MinSizeRel`` or this flag reduces binary
675
- size quite substantially (~25% on some platforms).
676
- `#2463 <https://github.com/pybind/pybind11/pull/2463>`_
677
-
678
- Smaller or developer focused features and fixes:
679
-
680
- * Moved ``mkdoc.py`` to a new repo, `pybind11-mkdoc`_. There are no longer
681
- submodules in the main repo.
682
-
683
- * ``py::memoryview`` segfault fix and update, with new
684
- ``py::memoryview::from_memory`` in Python 3, and documentation.
685
- `#2223 <https://github.com/pybind/pybind11/pull/2223>`_
686
-
687
- * Fix for ``buffer_info`` on Python 2.
688
- `#2503 <https://github.com/pybind/pybind11/pull/2503>`_
689
-
690
- * If ``__eq__`` defined but not ``__hash__``, ``__hash__`` is now set to
691
- ``None``.
692
- `#2291 <https://github.com/pybind/pybind11/pull/2291>`_
693
-
694
- * ``py::ellipsis`` now also works on Python 2.
695
- `#2360 <https://github.com/pybind/pybind11/pull/2360>`_
696
-
697
- * Pointer to ``std::tuple`` & ``std::pair`` supported in cast.
698
- `#2334 <https://github.com/pybind/pybind11/pull/2334>`_
699
-
700
- * Small fixes in NumPy support. ``py::array`` now uses ``py::ssize_t`` as first
701
- argument type.
702
- `#2293 <https://github.com/pybind/pybind11/pull/2293>`_
703
-
704
- * Added missing signature for ``py::array``.
705
- `#2363 <https://github.com/pybind/pybind11/pull/2363>`_
706
-
707
- * ``unchecked_mutable_reference`` has access to operator ``()`` and ``[]`` when
708
- const.
709
- `#2514 <https://github.com/pybind/pybind11/pull/2514>`_
710
-
711
- * ``py::vectorize`` is now supported on functions that return void.
712
- `#1969 <https://github.com/pybind/pybind11/pull/1969>`_
713
-
714
- * ``py::capsule`` supports ``get_pointer`` and ``set_pointer``.
715
- `#1131 <https://github.com/pybind/pybind11/pull/1131>`_
716
-
717
- * Fix crash when different instances share the same pointer of the same type.
718
- `#2252 <https://github.com/pybind/pybind11/pull/2252>`_
719
-
720
- * Fix for ``py::len`` not clearing Python's error state when it fails and throws.
721
- `#2575 <https://github.com/pybind/pybind11/pull/2575>`_
722
-
723
- * Bugfixes related to more extensive testing, new GitHub Actions CI.
724
- `#2321 <https://github.com/pybind/pybind11/pull/2321>`_
725
-
726
- * Bug in timezone issue in Eastern hemisphere midnight fixed.
727
- `#2438 <https://github.com/pybind/pybind11/pull/2438>`_
728
-
729
- * ``std::chrono::time_point`` now works when the resolution is not the same as
730
- the system.
731
- `#2481 <https://github.com/pybind/pybind11/pull/2481>`_
732
-
733
- * Bug fixed where ``py::array_t`` could accept arrays that did not match the
734
- requested ordering.
735
- `#2484 <https://github.com/pybind/pybind11/pull/2484>`_
736
-
737
- * Avoid a segfault on some compilers when types are removed in Python.
738
- `#2564 <https://github.com/pybind/pybind11/pull/2564>`_
739
-
740
- * ``py::arg::none()`` is now also respected when passing keyword arguments.
741
- `#2611 <https://github.com/pybind/pybind11/pull/2611>`_
742
-
743
- * PyPy fixes, PyPy 7.3.x now supported, including PyPy3. (Known issue with
744
- PyPy2 and Windows `#2596 <https://github.com/pybind/pybind11/issues/2596>`_).
745
- `#2146 <https://github.com/pybind/pybind11/pull/2146>`_
746
-
747
- * CPython 3.9.0 workaround for undefined behavior (macOS segfault).
748
- `#2576 <https://github.com/pybind/pybind11/pull/2576>`_
749
-
750
- * CPython 3.9 warning fixes.
751
- `#2253 <https://github.com/pybind/pybind11/pull/2253>`_
752
-
753
- * Improved C++20 support, now tested in CI.
754
- `#2489 <https://github.com/pybind/pybind11/pull/2489>`_
755
- `#2599 <https://github.com/pybind/pybind11/pull/2599>`_
756
-
757
- * Improved but still incomplete debug Python interpreter support.
758
- `#2025 <https://github.com/pybind/pybind11/pull/2025>`_
759
-
760
- * NVCC (CUDA 11) now supported and tested in CI.
761
- `#2461 <https://github.com/pybind/pybind11/pull/2461>`_
762
-
763
- * NVIDIA PGI compilers now supported and tested in CI.
764
- `#2475 <https://github.com/pybind/pybind11/pull/2475>`_
765
-
766
- * At least Intel 18 now explicitly required when compiling with Intel.
767
- `#2577 <https://github.com/pybind/pybind11/pull/2577>`_
768
-
769
- * Extensive style checking in CI, with `pre-commit`_ support. Code
770
- modernization, checked by clang-tidy.
771
-
772
- * Expanded docs, including new main page, new installing section, and CMake
773
- helpers page, along with over a dozen new sections on existing pages.
774
-
775
- * In GitHub, new docs for contributing and new issue templates.
776
-
777
- .. _pre-commit: https://pre-commit.com
778
-
779
- .. _pybind11-mkdoc: https://github.com/pybind/pybind11-mkdoc
780
-
781
- v2.5.0 (Mar 31, 2020)
782
- -----------------------------------------------------
783
-
784
- * Use C++17 fold expressions in type casters, if available. This can
785
- improve performance during overload resolution when functions have
786
- multiple arguments.
787
- `#2043 <https://github.com/pybind/pybind11/pull/2043>`_.
788
-
789
- * Changed include directory resolution in ``pybind11/__init__.py``
790
- and installation in ``setup.py``. This fixes a number of open issues
791
- where pybind11 headers could not be found in certain environments.
792
- `#1995 <https://github.com/pybind/pybind11/pull/1995>`_.
793
-
794
- * C++20 ``char8_t`` and ``u8string`` support. `#2026
795
- <https://github.com/pybind/pybind11/pull/2026>`_.
796
-
797
- * CMake: search for Python 3.9. `bb9c91
798
- <https://github.com/pybind/pybind11/commit/bb9c91>`_.
799
-
800
- * Fixes for MSYS-based build environments.
801
- `#2087 <https://github.com/pybind/pybind11/pull/2087>`_,
802
- `#2053 <https://github.com/pybind/pybind11/pull/2053>`_.
803
-
804
- * STL bindings for ``std::vector<...>::clear``. `#2074
805
- <https://github.com/pybind/pybind11/pull/2074>`_.
806
-
807
- * Read-only flag for ``py::buffer``. `#1466
808
- <https://github.com/pybind/pybind11/pull/1466>`_.
809
-
810
- * Exception handling during module initialization.
811
- `bf2b031 <https://github.com/pybind/pybind11/commit/bf2b031>`_.
812
-
813
- * Support linking against a CPython debug build.
814
- `#2025 <https://github.com/pybind/pybind11/pull/2025>`_.
815
-
816
- * Fixed issues involving the availability and use of aligned ``new`` and
817
- ``delete``. `#1988 <https://github.com/pybind/pybind11/pull/1988>`_,
818
- `759221 <https://github.com/pybind/pybind11/commit/759221>`_.
819
-
820
- * Fixed a resource leak upon interpreter shutdown.
821
- `#2020 <https://github.com/pybind/pybind11/pull/2020>`_.
822
-
823
- * Fixed error handling in the boolean caster.
824
- `#1976 <https://github.com/pybind/pybind11/pull/1976>`_.
825
-
826
- v2.4.3 (Oct 15, 2019)
827
- -----------------------------------------------------
828
-
829
- * Adapt pybind11 to a C API convention change in Python 3.8. `#1950
830
- <https://github.com/pybind/pybind11/pull/1950>`_.
831
-
832
- v2.4.2 (Sep 21, 2019)
833
- -----------------------------------------------------
834
-
835
- * Replaced usage of a C++14 only construct. `#1929
836
- <https://github.com/pybind/pybind11/pull/1929>`_.
837
-
838
- * Made an ifdef future-proof for Python >= 4. `f3109d
839
- <https://github.com/pybind/pybind11/commit/f3109d>`_.
840
-
841
- v2.4.1 (Sep 20, 2019)
842
- -----------------------------------------------------
843
-
844
- * Fixed a problem involving implicit conversion from enumerations to integers
845
- on Python 3.8. `#1780 <https://github.com/pybind/pybind11/pull/1780>`_.
846
-
847
- v2.4.0 (Sep 19, 2019)
848
- -----------------------------------------------------
849
-
850
- * Try harder to keep pybind11-internal data structures separate when there
851
- are potential ABI incompatibilities. Fixes crashes that occurred when loading
852
- multiple pybind11 extensions that were e.g. compiled by GCC (libstdc++)
853
- and Clang (libc++).
854
- `#1588 <https://github.com/pybind/pybind11/pull/1588>`_ and
855
- `c9f5a <https://github.com/pybind/pybind11/commit/c9f5a>`_.
856
-
857
- * Added support for ``__await__``, ``__aiter__``, and ``__anext__`` protocols.
858
- `#1842 <https://github.com/pybind/pybind11/pull/1842>`_.
859
-
860
- * ``pybind11_add_module()``: don't strip symbols when compiling in
861
- ``RelWithDebInfo`` mode. `#1980
862
- <https://github.com/pybind/pybind11/pull/1980>`_.
863
-
864
- * ``enum_``: Reproduce Python behavior when comparing against invalid values
865
- (e.g. ``None``, strings, etc.). Add back support for ``__invert__()``.
866
- `#1912 <https://github.com/pybind/pybind11/pull/1912>`_,
867
- `#1907 <https://github.com/pybind/pybind11/pull/1907>`_.
868
-
869
- * List insertion operation for ``py::list``.
870
- Added ``.empty()`` to all collection types.
871
- Added ``py::set::contains()`` and ``py::dict::contains()``.
872
- `#1887 <https://github.com/pybind/pybind11/pull/1887>`_,
873
- `#1884 <https://github.com/pybind/pybind11/pull/1884>`_,
874
- `#1888 <https://github.com/pybind/pybind11/pull/1888>`_.
875
-
876
- * ``py::details::overload_cast_impl`` is available in C++11 mode, can be used
877
- like ``overload_cast`` with an additional set of parentheses.
878
- `#1581 <https://github.com/pybind/pybind11/pull/1581>`_.
879
-
880
- * Fixed ``get_include()`` on Conda.
881
- `#1877 <https://github.com/pybind/pybind11/pull/1877>`_.
882
-
883
- * ``stl_bind.h``: negative indexing support.
884
- `#1882 <https://github.com/pybind/pybind11/pull/1882>`_.
885
-
886
- * Minor CMake fix to add MinGW compatibility.
887
- `#1851 <https://github.com/pybind/pybind11/pull/1851>`_.
888
-
889
- * GIL-related fixes.
890
- `#1836 <https://github.com/pybind/pybind11/pull/1836>`_,
891
- `8b90b <https://github.com/pybind/pybind11/commit/8b90b>`_.
892
-
893
- * Other very minor/subtle fixes and improvements.
894
- `#1329 <https://github.com/pybind/pybind11/pull/1329>`_,
895
- `#1910 <https://github.com/pybind/pybind11/pull/1910>`_,
896
- `#1863 <https://github.com/pybind/pybind11/pull/1863>`_,
897
- `#1847 <https://github.com/pybind/pybind11/pull/1847>`_,
898
- `#1890 <https://github.com/pybind/pybind11/pull/1890>`_,
899
- `#1860 <https://github.com/pybind/pybind11/pull/1860>`_,
900
- `#1848 <https://github.com/pybind/pybind11/pull/1848>`_,
901
- `#1821 <https://github.com/pybind/pybind11/pull/1821>`_,
902
- `#1837 <https://github.com/pybind/pybind11/pull/1837>`_,
903
- `#1833 <https://github.com/pybind/pybind11/pull/1833>`_,
904
- `#1748 <https://github.com/pybind/pybind11/pull/1748>`_,
905
- `#1852 <https://github.com/pybind/pybind11/pull/1852>`_.
906
-
907
- v2.3.0 (June 11, 2019)
908
- -----------------------------------------------------
909
-
910
- * Significantly reduced module binary size (10-20%) when compiled in C++11 mode
911
- with GCC/Clang, or in any mode with MSVC. Function signatures are now always
912
- precomputed at compile time (this was previously only available in C++14 mode
913
- for non-MSVC compilers).
914
- `#934 <https://github.com/pybind/pybind11/pull/934>`_.
915
-
916
- * Add basic support for tag-based static polymorphism, where classes
917
- provide a method to returns the desired type of an instance.
918
- `#1326 <https://github.com/pybind/pybind11/pull/1326>`_.
919
-
920
- * Python type wrappers (``py::handle``, ``py::object``, etc.)
921
- now support map Python's number protocol onto C++ arithmetic
922
- operators such as ``operator+``, ``operator/=``, etc.
923
- `#1511 <https://github.com/pybind/pybind11/pull/1511>`_.
924
-
925
- * A number of improvements related to enumerations:
926
-
927
- 1. The ``enum_`` implementation was rewritten from scratch to reduce
928
- code bloat. Rather than instantiating a full implementation for each
929
- enumeration, most code is now contained in a generic base class.
930
- `#1511 <https://github.com/pybind/pybind11/pull/1511>`_.
931
-
932
- 2. The ``value()`` method of ``py::enum_`` now accepts an optional
933
- docstring that will be shown in the documentation of the associated
934
- enumeration. `#1160 <https://github.com/pybind/pybind11/pull/1160>`_.
935
-
936
- 3. check for already existing enum value and throw an error if present.
937
- `#1453 <https://github.com/pybind/pybind11/pull/1453>`_.
938
-
939
- * Support for over-aligned type allocation via C++17's aligned ``new``
940
- statement. `#1582 <https://github.com/pybind/pybind11/pull/1582>`_.
941
-
942
- * Added ``py::ellipsis()`` method for slicing of multidimensional NumPy arrays
943
- `#1502 <https://github.com/pybind/pybind11/pull/1502>`_.
944
-
945
- * Numerous Improvements to the ``mkdoc.py`` script for extracting documentation
946
- from C++ header files.
947
- `#1788 <https://github.com/pybind/pybind11/pull/1788>`_.
948
-
949
- * ``pybind11_add_module()``: allow including Python as a ``SYSTEM`` include path.
950
- `#1416 <https://github.com/pybind/pybind11/pull/1416>`_.
951
-
952
- * ``pybind11/stl.h`` does not convert strings to ``vector<string>`` anymore.
953
- `#1258 <https://github.com/pybind/pybind11/issues/1258>`_.
954
-
955
- * Mark static methods as such to fix auto-generated Sphinx documentation.
956
- `#1732 <https://github.com/pybind/pybind11/pull/1732>`_.
957
-
958
- * Re-throw forced unwind exceptions (e.g. during pthread termination).
959
- `#1208 <https://github.com/pybind/pybind11/pull/1208>`_.
960
-
961
- * Added ``__contains__`` method to the bindings of maps (``std::map``,
962
- ``std::unordered_map``).
963
- `#1767 <https://github.com/pybind/pybind11/pull/1767>`_.
964
-
965
- * Improvements to ``gil_scoped_acquire``.
966
- `#1211 <https://github.com/pybind/pybind11/pull/1211>`_.
967
-
968
- * Type caster support for ``std::deque<T>``.
969
- `#1609 <https://github.com/pybind/pybind11/pull/1609>`_.
970
-
971
- * Support for ``std::unique_ptr`` holders, whose deleters differ between a base and derived
972
- class. `#1353 <https://github.com/pybind/pybind11/pull/1353>`_.
973
-
974
- * Construction of STL array/vector-like data structures from
975
- iterators. Added an ``extend()`` operation.
976
- `#1709 <https://github.com/pybind/pybind11/pull/1709>`_,
977
-
978
- * CMake build system improvements for projects that include non-C++
979
- files (e.g. plain C, CUDA) in ``pybind11_add_module`` et al.
980
- `#1678 <https://github.com/pybind/pybind11/pull/1678>`_.
981
-
982
- * Fixed asynchronous invocation and deallocation of Python functions
983
- wrapped in ``std::function``.
984
- `#1595 <https://github.com/pybind/pybind11/pull/1595>`_.
985
-
986
- * Fixes regarding return value policy propagation in STL type casters.
987
- `#1603 <https://github.com/pybind/pybind11/pull/1603>`_.
988
-
989
- * Fixed scoped enum comparisons.
990
- `#1571 <https://github.com/pybind/pybind11/pull/1571>`_.
991
-
992
- * Fixed iostream redirection for code that releases the GIL.
993
- `#1368 <https://github.com/pybind/pybind11/pull/1368>`_,
994
-
995
- * A number of CI-related fixes.
996
- `#1757 <https://github.com/pybind/pybind11/pull/1757>`_,
997
- `#1744 <https://github.com/pybind/pybind11/pull/1744>`_,
998
- `#1670 <https://github.com/pybind/pybind11/pull/1670>`_.
999
-
1000
- v2.2.4 (September 11, 2018)
1001
- -----------------------------------------------------
1002
-
1003
- * Use new Python 3.7 Thread Specific Storage (TSS) implementation if available.
1004
- `#1454 <https://github.com/pybind/pybind11/pull/1454>`_,
1005
- `#1517 <https://github.com/pybind/pybind11/pull/1517>`_.
1006
-
1007
- * Fixes for newer MSVC versions and C++17 mode.
1008
- `#1347 <https://github.com/pybind/pybind11/pull/1347>`_,
1009
- `#1462 <https://github.com/pybind/pybind11/pull/1462>`_.
1010
-
1011
- * Propagate return value policies to type-specific casters
1012
- when casting STL containers.
1013
- `#1455 <https://github.com/pybind/pybind11/pull/1455>`_.
1014
-
1015
- * Allow ostream-redirection of more than 1024 characters.
1016
- `#1479 <https://github.com/pybind/pybind11/pull/1479>`_.
1017
-
1018
- * Set ``Py_DEBUG`` define when compiling against a debug Python build.
1019
- `#1438 <https://github.com/pybind/pybind11/pull/1438>`_.
1020
-
1021
- * Untangle integer logic in number type caster to work for custom
1022
- types that may only be castable to a restricted set of builtin types.
1023
- `#1442 <https://github.com/pybind/pybind11/pull/1442>`_.
1024
-
1025
- * CMake build system: Remember Python version in cache file.
1026
- `#1434 <https://github.com/pybind/pybind11/pull/1434>`_.
1027
-
1028
- * Fix for custom smart pointers: use ``std::addressof`` to obtain holder
1029
- address instead of ``operator&``.
1030
- `#1435 <https://github.com/pybind/pybind11/pull/1435>`_.
1031
-
1032
- * Properly report exceptions thrown during module initialization.
1033
- `#1362 <https://github.com/pybind/pybind11/pull/1362>`_.
1034
-
1035
- * Fixed a segmentation fault when creating empty-shaped NumPy array.
1036
- `#1371 <https://github.com/pybind/pybind11/pull/1371>`_.
1037
-
1038
- * The version of Intel C++ compiler must be >= 2017, and this is now checked by
1039
- the header files. `#1363 <https://github.com/pybind/pybind11/pull/1363>`_.
1040
-
1041
- * A few minor typo fixes and improvements to the test suite, and
1042
- patches that silence compiler warnings.
1043
-
1044
- * Vectors now support construction from generators, as well as ``extend()`` from a
1045
- list or generator.
1046
- `#1496 <https://github.com/pybind/pybind11/pull/1496>`_.
1047
-
1048
-
1049
- v2.2.3 (April 29, 2018)
1050
- -----------------------------------------------------
1051
-
1052
- * The pybind11 header location detection was replaced by a new implementation
1053
- that no longer depends on ``pip`` internals (the recently released ``pip``
1054
- 10 has restricted access to this API).
1055
- `#1190 <https://github.com/pybind/pybind11/pull/1190>`_.
1056
-
1057
- * Small adjustment to an implementation detail to work around a compiler segmentation fault in Clang 3.3/3.4.
1058
- `#1350 <https://github.com/pybind/pybind11/pull/1350>`_.
1059
-
1060
- * The minimal supported version of the Intel compiler was >= 17.0 since
1061
- pybind11 v2.1. This check is now explicit, and a compile-time error is raised
1062
- if the compiler meet the requirement.
1063
- `#1363 <https://github.com/pybind/pybind11/pull/1363>`_.
1064
-
1065
- * Fixed an endianness-related fault in the test suite.
1066
- `#1287 <https://github.com/pybind/pybind11/pull/1287>`_.
1067
-
1068
- v2.2.2 (February 7, 2018)
1069
- -----------------------------------------------------
1070
-
1071
- * Fixed a segfault when combining embedded interpreter
1072
- shutdown/reinitialization with external loaded pybind11 modules.
1073
- `#1092 <https://github.com/pybind/pybind11/pull/1092>`_.
1074
-
1075
- * Eigen support: fixed a bug where Nx1/1xN numpy inputs couldn't be passed as
1076
- arguments to Eigen vectors (which for Eigen are simply compile-time fixed
1077
- Nx1/1xN matrices).
1078
- `#1106 <https://github.com/pybind/pybind11/pull/1106>`_.
1079
-
1080
- * Clarified to license by moving the licensing of contributions from
1081
- ``LICENSE`` into ``CONTRIBUTING.md``: the licensing of contributions is not
1082
- actually part of the software license as distributed. This isn't meant to be
1083
- a substantial change in the licensing of the project, but addresses concerns
1084
- that the clause made the license non-standard.
1085
- `#1109 <https://github.com/pybind/pybind11/issues/1109>`_.
1086
-
1087
- * Fixed a regression introduced in 2.1 that broke binding functions with lvalue
1088
- character literal arguments.
1089
- `#1128 <https://github.com/pybind/pybind11/pull/1128>`_.
1090
-
1091
- * MSVC: fix for compilation failures under /permissive-, and added the flag to
1092
- the appveyor test suite.
1093
- `#1155 <https://github.com/pybind/pybind11/pull/1155>`_.
1094
-
1095
- * Fixed ``__qualname__`` generation, and in turn, fixes how class names
1096
- (especially nested class names) are shown in generated docstrings.
1097
- `#1171 <https://github.com/pybind/pybind11/pull/1171>`_.
1098
-
1099
- * Updated the FAQ with a suggested project citation reference.
1100
- `#1189 <https://github.com/pybind/pybind11/pull/1189>`_.
1101
-
1102
- * Added fixes for deprecation warnings when compiled under C++17 with
1103
- ``-Wdeprecated`` turned on, and add ``-Wdeprecated`` to the test suite
1104
- compilation flags.
1105
- `#1191 <https://github.com/pybind/pybind11/pull/1191>`_.
1106
-
1107
- * Fixed outdated PyPI URLs in ``setup.py``.
1108
- `#1213 <https://github.com/pybind/pybind11/pull/1213>`_.
1109
-
1110
- * Fixed a refcount leak for arguments that end up in a ``py::args`` argument
1111
- for functions with both fixed positional and ``py::args`` arguments.
1112
- `#1216 <https://github.com/pybind/pybind11/pull/1216>`_.
1113
-
1114
- * Fixed a potential segfault resulting from possible premature destruction of
1115
- ``py::args``/``py::kwargs`` arguments with overloaded functions.
1116
- `#1223 <https://github.com/pybind/pybind11/pull/1223>`_.
1117
-
1118
- * Fixed ``del map[item]`` for a ``stl_bind.h`` bound stl map.
1119
- `#1229 <https://github.com/pybind/pybind11/pull/1229>`_.
1120
-
1121
- * Fixed a regression from v2.1.x where the aggregate initialization could
1122
- unintentionally end up at a constructor taking a templated
1123
- ``std::initializer_list<T>`` argument.
1124
- `#1249 <https://github.com/pybind/pybind11/pull/1249>`_.
1125
-
1126
- * Fixed an issue where calling a function with a keep_alive policy on the same
1127
- nurse/patient pair would cause the internal patient storage to needlessly
1128
- grow (unboundedly, if the nurse is long-lived).
1129
- `#1251 <https://github.com/pybind/pybind11/issues/1251>`_.
1130
-
1131
- * Various other minor fixes.
1132
-
1133
- v2.2.1 (September 14, 2017)
1134
- -----------------------------------------------------
1135
-
1136
- * Added ``py::module_::reload()`` member function for reloading a module.
1137
- `#1040 <https://github.com/pybind/pybind11/pull/1040>`_.
1138
-
1139
- * Fixed a reference leak in the number converter.
1140
- `#1078 <https://github.com/pybind/pybind11/pull/1078>`_.
1141
-
1142
- * Fixed compilation with Clang on host GCC < 5 (old libstdc++ which isn't fully
1143
- C++11 compliant). `#1062 <https://github.com/pybind/pybind11/pull/1062>`_.
1144
-
1145
- * Fixed a regression where the automatic ``std::vector<bool>`` caster would
1146
- fail to compile. The same fix also applies to any container which returns
1147
- element proxies instead of references.
1148
- `#1053 <https://github.com/pybind/pybind11/pull/1053>`_.
1149
-
1150
- * Fixed a regression where the ``py::keep_alive`` policy could not be applied
1151
- to constructors. `#1065 <https://github.com/pybind/pybind11/pull/1065>`_.
1152
-
1153
- * Fixed a nullptr dereference when loading a ``py::module_local`` type
1154
- that's only registered in an external module.
1155
- `#1058 <https://github.com/pybind/pybind11/pull/1058>`_.
1156
-
1157
- * Fixed implicit conversion of accessors to types derived from ``py::object``.
1158
- `#1076 <https://github.com/pybind/pybind11/pull/1076>`_.
1159
-
1160
- * The ``name`` in ``PYBIND11_MODULE(name, variable)`` can now be a macro.
1161
- `#1082 <https://github.com/pybind/pybind11/pull/1082>`_.
1162
-
1163
- * Relaxed overly strict ``py::pickle()`` check for matching get and set types.
1164
- `#1064 <https://github.com/pybind/pybind11/pull/1064>`_.
1165
-
1166
- * Conversion errors now try to be more informative when it's likely that
1167
- a missing header is the cause (e.g. forgetting ``<pybind11/stl.h>``).
1168
- `#1077 <https://github.com/pybind/pybind11/pull/1077>`_.
1169
-
1170
- v2.2.0 (August 31, 2017)
1171
- -----------------------------------------------------
1172
-
1173
- * Support for embedding the Python interpreter. See the
1174
- :doc:`documentation page </advanced/embedding>` for a
1175
- full overview of the new features.
1176
- `#774 <https://github.com/pybind/pybind11/pull/774>`_,
1177
- `#889 <https://github.com/pybind/pybind11/pull/889>`_,
1178
- `#892 <https://github.com/pybind/pybind11/pull/892>`_,
1179
- `#920 <https://github.com/pybind/pybind11/pull/920>`_.
1180
-
1181
- .. code-block:: cpp
1182
-
1183
- #include <pybind11/embed.h>
1184
- namespace py = pybind11;
1185
-
1186
- int main() {
1187
- py::scoped_interpreter guard{}; // start the interpreter and keep it alive
1188
-
1189
- py::print("Hello, World!"); // use the Python API
1190
- }
1191
-
1192
- * Support for inheriting from multiple C++ bases in Python.
1193
- `#693 <https://github.com/pybind/pybind11/pull/693>`_.
1194
-
1195
- .. code-block:: python
1196
-
1197
- from cpp_module import CppBase1, CppBase2
1198
-
1199
-
1200
- class PyDerived(CppBase1, CppBase2):
1201
- def __init__(self):
1202
- CppBase1.__init__(self) # C++ bases must be initialized explicitly
1203
- CppBase2.__init__(self)
1204
-
1205
- * ``PYBIND11_MODULE`` is now the preferred way to create module entry points.
1206
- ``PYBIND11_PLUGIN`` is deprecated. See :ref:`macros` for details.
1207
- `#879 <https://github.com/pybind/pybind11/pull/879>`_.
1208
-
1209
- .. code-block:: cpp
1210
-
1211
- // new
1212
- PYBIND11_MODULE(example, m) {
1213
- m.def("add", [](int a, int b) { return a + b; });
1214
- }
1215
-
1216
- // old
1217
- PYBIND11_PLUGIN(example) {
1218
- py::module m("example");
1219
- m.def("add", [](int a, int b) { return a + b; });
1220
- return m.ptr();
1221
- }
1222
-
1223
- * pybind11's headers and build system now more strictly enforce hidden symbol
1224
- visibility for extension modules. This should be seamless for most users,
1225
- but see the :doc:`upgrade` if you use a custom build system.
1226
- `#995 <https://github.com/pybind/pybind11/pull/995>`_.
1227
-
1228
- * Support for ``py::module_local`` types which allow multiple modules to
1229
- export the same C++ types without conflicts. This is useful for opaque
1230
- types like ``std::vector<int>``. ``py::bind_vector`` and ``py::bind_map``
1231
- now default to ``py::module_local`` if their elements are builtins or
1232
- local types. See :ref:`module_local` for details.
1233
- `#949 <https://github.com/pybind/pybind11/pull/949>`_,
1234
- `#981 <https://github.com/pybind/pybind11/pull/981>`_,
1235
- `#995 <https://github.com/pybind/pybind11/pull/995>`_,
1236
- `#997 <https://github.com/pybind/pybind11/pull/997>`_.
1237
-
1238
- * Custom constructors can now be added very easily using lambdas or factory
1239
- functions which return a class instance by value, pointer or holder. This
1240
- supersedes the old placement-new ``__init__`` technique.
1241
- See :ref:`custom_constructors` for details.
1242
- `#805 <https://github.com/pybind/pybind11/pull/805>`_,
1243
- `#1014 <https://github.com/pybind/pybind11/pull/1014>`_.
1244
-
1245
- .. code-block:: cpp
1246
-
1247
- struct Example {
1248
- Example(std::string);
1249
- };
1250
-
1251
- py::class_<Example>(m, "Example")
1252
- .def(py::init<std::string>()) // existing constructor
1253
- .def(py::init([](int n) { // custom constructor
1254
- return std::make_unique<Example>(std::to_string(n));
1255
- }));
1256
-
1257
- * Similarly to custom constructors, pickling support functions are now bound
1258
- using the ``py::pickle()`` adaptor which improves type safety. See the
1259
- :doc:`upgrade` and :ref:`pickling` for details.
1260
- `#1038 <https://github.com/pybind/pybind11/pull/1038>`_.
1261
-
1262
- * Builtin support for converting C++17 standard library types and general
1263
- conversion improvements:
1264
-
1265
- 1. C++17 ``std::variant`` is supported right out of the box. C++11/14
1266
- equivalents (e.g. ``boost::variant``) can also be added with a simple
1267
- user-defined specialization. See :ref:`cpp17_container_casters` for details.
1268
- `#811 <https://github.com/pybind/pybind11/pull/811>`_,
1269
- `#845 <https://github.com/pybind/pybind11/pull/845>`_,
1270
- `#989 <https://github.com/pybind/pybind11/pull/989>`_.
1271
-
1272
- 2. Out-of-the-box support for C++17 ``std::string_view``.
1273
- `#906 <https://github.com/pybind/pybind11/pull/906>`_.
1274
-
1275
- 3. Improved compatibility of the builtin ``optional`` converter.
1276
- `#874 <https://github.com/pybind/pybind11/pull/874>`_.
1277
-
1278
- 4. The ``bool`` converter now accepts ``numpy.bool_`` and types which
1279
- define ``__bool__`` (Python 3.x) or ``__nonzero__`` (Python 2.7).
1280
- `#925 <https://github.com/pybind/pybind11/pull/925>`_.
1281
-
1282
- 5. C++-to-Python casters are now more efficient and move elements out
1283
- of rvalue containers whenever possible.
1284
- `#851 <https://github.com/pybind/pybind11/pull/851>`_,
1285
- `#936 <https://github.com/pybind/pybind11/pull/936>`_,
1286
- `#938 <https://github.com/pybind/pybind11/pull/938>`_.
1287
-
1288
- 6. Fixed ``bytes`` to ``std::string/char*`` conversion on Python 3.
1289
- `#817 <https://github.com/pybind/pybind11/pull/817>`_.
1290
-
1291
- 7. Fixed lifetime of temporary C++ objects created in Python-to-C++ conversions.
1292
- `#924 <https://github.com/pybind/pybind11/pull/924>`_.
1293
-
1294
- * Scope guard call policy for RAII types, e.g. ``py::call_guard<py::gil_scoped_release>()``,
1295
- ``py::call_guard<py::scoped_ostream_redirect>()``. See :ref:`call_policies` for details.
1296
- `#740 <https://github.com/pybind/pybind11/pull/740>`_.
1297
-
1298
- * Utility for redirecting C++ streams to Python (e.g. ``std::cout`` ->
1299
- ``sys.stdout``). Scope guard ``py::scoped_ostream_redirect`` in C++ and
1300
- a context manager in Python. See :ref:`ostream_redirect`.
1301
- `#1009 <https://github.com/pybind/pybind11/pull/1009>`_.
1302
-
1303
- * Improved handling of types and exceptions across module boundaries.
1304
- `#915 <https://github.com/pybind/pybind11/pull/915>`_,
1305
- `#951 <https://github.com/pybind/pybind11/pull/951>`_,
1306
- `#995 <https://github.com/pybind/pybind11/pull/995>`_.
1307
-
1308
- * Fixed destruction order of ``py::keep_alive`` nurse/patient objects
1309
- in reference cycles.
1310
- `#856 <https://github.com/pybind/pybind11/pull/856>`_.
1311
-
1312
- * NumPy and buffer protocol related improvements:
1313
-
1314
- 1. Support for negative strides in Python buffer objects/numpy arrays. This
1315
- required changing integers from unsigned to signed for the related C++ APIs.
1316
- Note: If you have compiler warnings enabled, you may notice some new conversion
1317
- warnings after upgrading. These can be resolved with ``static_cast``.
1318
- `#782 <https://github.com/pybind/pybind11/pull/782>`_.
1319
-
1320
- 2. Support ``std::complex`` and arrays inside ``PYBIND11_NUMPY_DTYPE``.
1321
- `#831 <https://github.com/pybind/pybind11/pull/831>`_,
1322
- `#832 <https://github.com/pybind/pybind11/pull/832>`_.
1323
-
1324
- 3. Support for constructing ``py::buffer_info`` and ``py::arrays`` using
1325
- arbitrary containers or iterators instead of requiring a ``std::vector``.
1326
- `#788 <https://github.com/pybind/pybind11/pull/788>`_,
1327
- `#822 <https://github.com/pybind/pybind11/pull/822>`_,
1328
- `#860 <https://github.com/pybind/pybind11/pull/860>`_.
1329
-
1330
- 4. Explicitly check numpy version and require >= 1.7.0.
1331
- `#819 <https://github.com/pybind/pybind11/pull/819>`_.
1332
-
1333
- * Support for allowing/prohibiting ``None`` for specific arguments and improved
1334
- ``None`` overload resolution order. See :ref:`none_arguments` for details.
1335
- `#843 <https://github.com/pybind/pybind11/pull/843>`_.
1336
- `#859 <https://github.com/pybind/pybind11/pull/859>`_.
1337
-
1338
- * Added ``py::exec()`` as a shortcut for ``py::eval<py::eval_statements>()``
1339
- and support for C++11 raw string literals as input. See :ref:`eval`.
1340
- `#766 <https://github.com/pybind/pybind11/pull/766>`_,
1341
- `#827 <https://github.com/pybind/pybind11/pull/827>`_.
1342
-
1343
- * ``py::vectorize()`` ignores non-vectorizable arguments and supports
1344
- member functions.
1345
- `#762 <https://github.com/pybind/pybind11/pull/762>`_.
1346
-
1347
- * Support for bound methods as callbacks (``pybind11/functional.h``).
1348
- `#815 <https://github.com/pybind/pybind11/pull/815>`_.
1349
-
1350
- * Allow aliasing pybind11 methods: ``cls.attr("foo") = cls.attr("bar")``.
1351
- `#802 <https://github.com/pybind/pybind11/pull/802>`_.
1352
-
1353
- * Don't allow mixed static/non-static overloads.
1354
- `#804 <https://github.com/pybind/pybind11/pull/804>`_.
1355
-
1356
- * Fixed overriding static properties in derived classes.
1357
- `#784 <https://github.com/pybind/pybind11/pull/784>`_.
1358
-
1359
- * Added support for write only properties.
1360
- `#1144 <https://github.com/pybind/pybind11/pull/1144>`_.
1361
-
1362
- * Improved deduction of member functions of a derived class when its bases
1363
- aren't registered with pybind11.
1364
- `#855 <https://github.com/pybind/pybind11/pull/855>`_.
1365
-
1366
- .. code-block:: cpp
1367
-
1368
- struct Base {
1369
- int foo() { return 42; }
1370
- }
1371
-
1372
- struct Derived : Base {}
1373
-
1374
- // Now works, but previously required also binding `Base`
1375
- py::class_<Derived>(m, "Derived")
1376
- .def("foo", &Derived::foo); // function is actually from `Base`
1377
-
1378
- * The implementation of ``py::init<>`` now uses C++11 brace initialization
1379
- syntax to construct instances, which permits binding implicit constructors of
1380
- aggregate types. `#1015 <https://github.com/pybind/pybind11/pull/1015>`_.
1381
-
1382
- .. code-block:: cpp
1383
-
1384
- struct Aggregate {
1385
- int a;
1386
- std::string b;
1387
- };
1388
-
1389
- py::class_<Aggregate>(m, "Aggregate")
1390
- .def(py::init<int, const std::string &>());
1391
-
1392
- * Fixed issues with multiple inheritance with offset base/derived pointers.
1393
- `#812 <https://github.com/pybind/pybind11/pull/812>`_,
1394
- `#866 <https://github.com/pybind/pybind11/pull/866>`_,
1395
- `#960 <https://github.com/pybind/pybind11/pull/960>`_.
1396
-
1397
- * Fixed reference leak of type objects.
1398
- `#1030 <https://github.com/pybind/pybind11/pull/1030>`_.
1399
-
1400
- * Improved support for the ``/std:c++14`` and ``/std:c++latest`` modes
1401
- on MSVC 2017.
1402
- `#841 <https://github.com/pybind/pybind11/pull/841>`_,
1403
- `#999 <https://github.com/pybind/pybind11/pull/999>`_.
1404
-
1405
- * Fixed detection of private operator new on MSVC.
1406
- `#893 <https://github.com/pybind/pybind11/pull/893>`_,
1407
- `#918 <https://github.com/pybind/pybind11/pull/918>`_.
1408
-
1409
- * Intel C++ compiler compatibility fixes.
1410
- `#937 <https://github.com/pybind/pybind11/pull/937>`_.
1411
-
1412
- * Fixed implicit conversion of ``py::enum_`` to integer types on Python 2.7.
1413
- `#821 <https://github.com/pybind/pybind11/pull/821>`_.
1414
-
1415
- * Added ``py::hash`` to fetch the hash value of Python objects, and
1416
- ``.def(hash(py::self))`` to provide the C++ ``std::hash`` as the Python
1417
- ``__hash__`` method.
1418
- `#1034 <https://github.com/pybind/pybind11/pull/1034>`_.
1419
-
1420
- * Fixed ``__truediv__`` on Python 2 and ``__itruediv__`` on Python 3.
1421
- `#867 <https://github.com/pybind/pybind11/pull/867>`_.
1422
-
1423
- * ``py::capsule`` objects now support the ``name`` attribute. This is useful
1424
- for interfacing with ``scipy.LowLevelCallable``.
1425
- `#902 <https://github.com/pybind/pybind11/pull/902>`_.
1426
-
1427
- * Fixed ``py::make_iterator``'s ``__next__()`` for past-the-end calls.
1428
- `#897 <https://github.com/pybind/pybind11/pull/897>`_.
1429
-
1430
- * Added ``error_already_set::matches()`` for checking Python exceptions.
1431
- `#772 <https://github.com/pybind/pybind11/pull/772>`_.
1432
-
1433
- * Deprecated ``py::error_already_set::clear()``. It's no longer needed
1434
- following a simplification of the ``py::error_already_set`` class.
1435
- `#954 <https://github.com/pybind/pybind11/pull/954>`_.
1436
-
1437
- * Deprecated ``py::handle::operator==()`` in favor of ``py::handle::is()``
1438
- `#825 <https://github.com/pybind/pybind11/pull/825>`_.
1439
-
1440
- * Deprecated ``py::object::borrowed``/``py::object::stolen``.
1441
- Use ``py::object::borrowed_t{}``/``py::object::stolen_t{}`` instead.
1442
- `#771 <https://github.com/pybind/pybind11/pull/771>`_.
1443
-
1444
- * Changed internal data structure versioning to avoid conflicts between
1445
- modules compiled with different revisions of pybind11.
1446
- `#1012 <https://github.com/pybind/pybind11/pull/1012>`_.
1447
-
1448
- * Additional compile-time and run-time error checking and more informative messages.
1449
- `#786 <https://github.com/pybind/pybind11/pull/786>`_,
1450
- `#794 <https://github.com/pybind/pybind11/pull/794>`_,
1451
- `#803 <https://github.com/pybind/pybind11/pull/803>`_.
1452
-
1453
- * Various minor improvements and fixes.
1454
- `#764 <https://github.com/pybind/pybind11/pull/764>`_,
1455
- `#791 <https://github.com/pybind/pybind11/pull/791>`_,
1456
- `#795 <https://github.com/pybind/pybind11/pull/795>`_,
1457
- `#840 <https://github.com/pybind/pybind11/pull/840>`_,
1458
- `#844 <https://github.com/pybind/pybind11/pull/844>`_,
1459
- `#846 <https://github.com/pybind/pybind11/pull/846>`_,
1460
- `#849 <https://github.com/pybind/pybind11/pull/849>`_,
1461
- `#858 <https://github.com/pybind/pybind11/pull/858>`_,
1462
- `#862 <https://github.com/pybind/pybind11/pull/862>`_,
1463
- `#871 <https://github.com/pybind/pybind11/pull/871>`_,
1464
- `#872 <https://github.com/pybind/pybind11/pull/872>`_,
1465
- `#881 <https://github.com/pybind/pybind11/pull/881>`_,
1466
- `#888 <https://github.com/pybind/pybind11/pull/888>`_,
1467
- `#899 <https://github.com/pybind/pybind11/pull/899>`_,
1468
- `#928 <https://github.com/pybind/pybind11/pull/928>`_,
1469
- `#931 <https://github.com/pybind/pybind11/pull/931>`_,
1470
- `#944 <https://github.com/pybind/pybind11/pull/944>`_,
1471
- `#950 <https://github.com/pybind/pybind11/pull/950>`_,
1472
- `#952 <https://github.com/pybind/pybind11/pull/952>`_,
1473
- `#962 <https://github.com/pybind/pybind11/pull/962>`_,
1474
- `#965 <https://github.com/pybind/pybind11/pull/965>`_,
1475
- `#970 <https://github.com/pybind/pybind11/pull/970>`_,
1476
- `#978 <https://github.com/pybind/pybind11/pull/978>`_,
1477
- `#979 <https://github.com/pybind/pybind11/pull/979>`_,
1478
- `#986 <https://github.com/pybind/pybind11/pull/986>`_,
1479
- `#1020 <https://github.com/pybind/pybind11/pull/1020>`_,
1480
- `#1027 <https://github.com/pybind/pybind11/pull/1027>`_,
1481
- `#1037 <https://github.com/pybind/pybind11/pull/1037>`_.
1482
-
1483
- * Testing improvements.
1484
- `#798 <https://github.com/pybind/pybind11/pull/798>`_,
1485
- `#882 <https://github.com/pybind/pybind11/pull/882>`_,
1486
- `#898 <https://github.com/pybind/pybind11/pull/898>`_,
1487
- `#900 <https://github.com/pybind/pybind11/pull/900>`_,
1488
- `#921 <https://github.com/pybind/pybind11/pull/921>`_,
1489
- `#923 <https://github.com/pybind/pybind11/pull/923>`_,
1490
- `#963 <https://github.com/pybind/pybind11/pull/963>`_.
1491
-
1492
- v2.1.1 (April 7, 2017)
1493
- -----------------------------------------------------
1494
-
1495
- * Fixed minimum version requirement for MSVC 2015u3
1496
- `#773 <https://github.com/pybind/pybind11/pull/773>`_.
1497
-
1498
- v2.1.0 (March 22, 2017)
1499
- -----------------------------------------------------
1500
-
1501
- * pybind11 now performs function overload resolution in two phases. The first
1502
- phase only considers exact type matches, while the second allows for implicit
1503
- conversions to take place. A special ``noconvert()`` syntax can be used to
1504
- completely disable implicit conversions for specific arguments.
1505
- `#643 <https://github.com/pybind/pybind11/pull/643>`_,
1506
- `#634 <https://github.com/pybind/pybind11/pull/634>`_,
1507
- `#650 <https://github.com/pybind/pybind11/pull/650>`_.
1508
-
1509
- * Fixed a regression where static properties no longer worked with classes
1510
- using multiple inheritance. The ``py::metaclass`` attribute is no longer
1511
- necessary (and deprecated as of this release) when binding classes with
1512
- static properties.
1513
- `#679 <https://github.com/pybind/pybind11/pull/679>`_,
1514
-
1515
- * Classes bound using ``pybind11`` can now use custom metaclasses.
1516
- `#679 <https://github.com/pybind/pybind11/pull/679>`_,
1517
-
1518
- * ``py::args`` and ``py::kwargs`` can now be mixed with other positional
1519
- arguments when binding functions using pybind11.
1520
- `#611 <https://github.com/pybind/pybind11/pull/611>`_.
1521
-
1522
- * Improved support for C++11 unicode string and character types; added
1523
- extensive documentation regarding pybind11's string conversion behavior.
1524
- `#624 <https://github.com/pybind/pybind11/pull/624>`_,
1525
- `#636 <https://github.com/pybind/pybind11/pull/636>`_,
1526
- `#715 <https://github.com/pybind/pybind11/pull/715>`_.
1527
-
1528
- * pybind11 can now avoid expensive copies when converting Eigen arrays to NumPy
1529
- arrays (and vice versa). `#610 <https://github.com/pybind/pybind11/pull/610>`_.
1530
-
1531
- * The "fast path" in ``py::vectorize`` now works for any full-size group of C or
1532
- F-contiguous arrays. The non-fast path is also faster since it no longer performs
1533
- copies of the input arguments (except when type conversions are necessary).
1534
- `#610 <https://github.com/pybind/pybind11/pull/610>`_.
1535
-
1536
- * Added fast, unchecked access to NumPy arrays via a proxy object.
1537
- `#746 <https://github.com/pybind/pybind11/pull/746>`_.
1538
-
1539
- * Transparent support for class-specific ``operator new`` and
1540
- ``operator delete`` implementations.
1541
- `#755 <https://github.com/pybind/pybind11/pull/755>`_.
1542
-
1543
- * Slimmer and more efficient STL-compatible iterator interface for sequence types.
1544
- `#662 <https://github.com/pybind/pybind11/pull/662>`_.
1545
-
1546
- * Improved custom holder type support.
1547
- `#607 <https://github.com/pybind/pybind11/pull/607>`_.
1548
-
1549
- * ``nullptr`` to ``None`` conversion fixed in various builtin type casters.
1550
- `#732 <https://github.com/pybind/pybind11/pull/732>`_.
1551
-
1552
- * ``enum_`` now exposes its members via a special ``__members__`` attribute.
1553
- `#666 <https://github.com/pybind/pybind11/pull/666>`_.
1554
-
1555
- * ``std::vector`` bindings created using ``stl_bind.h`` can now optionally
1556
- implement the buffer protocol. `#488 <https://github.com/pybind/pybind11/pull/488>`_.
1557
-
1558
- * Automated C++ reference documentation using doxygen and breathe.
1559
- `#598 <https://github.com/pybind/pybind11/pull/598>`_.
1560
-
1561
- * Added minimum compiler version assertions.
1562
- `#727 <https://github.com/pybind/pybind11/pull/727>`_.
1563
-
1564
- * Improved compatibility with C++1z.
1565
- `#677 <https://github.com/pybind/pybind11/pull/677>`_.
1566
-
1567
- * Improved ``py::capsule`` API. Can be used to implement cleanup
1568
- callbacks that are involved at module destruction time.
1569
- `#752 <https://github.com/pybind/pybind11/pull/752>`_.
1570
-
1571
- * Various minor improvements and fixes.
1572
- `#595 <https://github.com/pybind/pybind11/pull/595>`_,
1573
- `#588 <https://github.com/pybind/pybind11/pull/588>`_,
1574
- `#589 <https://github.com/pybind/pybind11/pull/589>`_,
1575
- `#603 <https://github.com/pybind/pybind11/pull/603>`_,
1576
- `#619 <https://github.com/pybind/pybind11/pull/619>`_,
1577
- `#648 <https://github.com/pybind/pybind11/pull/648>`_,
1578
- `#695 <https://github.com/pybind/pybind11/pull/695>`_,
1579
- `#720 <https://github.com/pybind/pybind11/pull/720>`_,
1580
- `#723 <https://github.com/pybind/pybind11/pull/723>`_,
1581
- `#729 <https://github.com/pybind/pybind11/pull/729>`_,
1582
- `#724 <https://github.com/pybind/pybind11/pull/724>`_,
1583
- `#742 <https://github.com/pybind/pybind11/pull/742>`_,
1584
- `#753 <https://github.com/pybind/pybind11/pull/753>`_.
1585
-
1586
- v2.0.1 (Jan 4, 2017)
1587
- -----------------------------------------------------
1588
-
1589
- * Fix pointer to reference error in type_caster on MSVC
1590
- `#583 <https://github.com/pybind/pybind11/pull/583>`_.
1591
-
1592
- * Fixed a segmentation in the test suite due to a typo
1593
- `cd7eac <https://github.com/pybind/pybind11/commit/cd7eac>`_.
1594
-
1595
- v2.0.0 (Jan 1, 2017)
1596
- -----------------------------------------------------
1597
-
1598
- * Fixed a reference counting regression affecting types with custom metaclasses
1599
- (introduced in v2.0.0-rc1).
1600
- `#571 <https://github.com/pybind/pybind11/pull/571>`_.
1601
-
1602
- * Quenched a CMake policy warning.
1603
- `#570 <https://github.com/pybind/pybind11/pull/570>`_.
1604
-
1605
- v2.0.0-rc1 (Dec 23, 2016)
1606
- -----------------------------------------------------
1607
-
1608
- The pybind11 developers are excited to issue a release candidate of pybind11
1609
- with a subsequent v2.0.0 release planned in early January next year.
1610
-
1611
- An incredible amount of effort by went into pybind11 over the last ~5 months,
1612
- leading to a release that is jam-packed with exciting new features and numerous
1613
- usability improvements. The following list links PRs or individual commits
1614
- whenever applicable.
1615
-
1616
- Happy Christmas!
1617
-
1618
- * Support for binding C++ class hierarchies that make use of multiple
1619
- inheritance. `#410 <https://github.com/pybind/pybind11/pull/410>`_.
1620
-
1621
- * PyPy support: pybind11 now supports nightly builds of PyPy and will
1622
- interoperate with the future 5.7 release. No code changes are necessary,
1623
- everything "just" works as usual. Note that we only target the Python 2.7
1624
- branch for now; support for 3.x will be added once its ``cpyext`` extension
1625
- support catches up. A few minor features remain unsupported for the time
1626
- being (notably dynamic attributes in custom types).
1627
- `#527 <https://github.com/pybind/pybind11/pull/527>`_.
1628
-
1629
- * Significant work on the documentation -- in particular, the monolithic
1630
- ``advanced.rst`` file was restructured into a easier to read hierarchical
1631
- organization. `#448 <https://github.com/pybind/pybind11/pull/448>`_.
1632
-
1633
- * Many NumPy-related improvements:
1634
-
1635
- 1. Object-oriented API to access and modify NumPy ``ndarray`` instances,
1636
- replicating much of the corresponding NumPy C API functionality.
1637
- `#402 <https://github.com/pybind/pybind11/pull/402>`_.
1638
-
1639
- 2. NumPy array ``dtype`` array descriptors are now first-class citizens and
1640
- are exposed via a new class ``py::dtype``.
1641
-
1642
- 3. Structured dtypes can be registered using the ``PYBIND11_NUMPY_DTYPE()``
1643
- macro. Special ``array`` constructors accepting dtype objects were also
1644
- added.
1645
-
1646
- One potential caveat involving this change: format descriptor strings
1647
- should now be accessed via ``format_descriptor::format()`` (however, for
1648
- compatibility purposes, the old syntax ``format_descriptor::value`` will
1649
- still work for non-structured data types). `#308
1650
- <https://github.com/pybind/pybind11/pull/308>`_.
1651
-
1652
- 4. Further improvements to support structured dtypes throughout the system.
1653
- `#472 <https://github.com/pybind/pybind11/pull/472>`_,
1654
- `#474 <https://github.com/pybind/pybind11/pull/474>`_,
1655
- `#459 <https://github.com/pybind/pybind11/pull/459>`_,
1656
- `#453 <https://github.com/pybind/pybind11/pull/453>`_,
1657
- `#452 <https://github.com/pybind/pybind11/pull/452>`_, and
1658
- `#505 <https://github.com/pybind/pybind11/pull/505>`_.
1659
-
1660
- 5. Fast access operators. `#497 <https://github.com/pybind/pybind11/pull/497>`_.
1661
-
1662
- 6. Constructors for arrays whose storage is owned by another object.
1663
- `#440 <https://github.com/pybind/pybind11/pull/440>`_.
1664
-
1665
- 7. Added constructors for ``array`` and ``array_t`` explicitly accepting shape
1666
- and strides; if strides are not provided, they are deduced assuming
1667
- C-contiguity. Also added simplified constructors for 1-dimensional case.
1668
-
1669
- 8. Added buffer/NumPy support for ``char[N]`` and ``std::array<char, N>`` types.
1670
-
1671
- 9. Added ``memoryview`` wrapper type which is constructible from ``buffer_info``.
1672
-
1673
- * Eigen: many additional conversions and support for non-contiguous
1674
- arrays/slices.
1675
- `#427 <https://github.com/pybind/pybind11/pull/427>`_,
1676
- `#315 <https://github.com/pybind/pybind11/pull/315>`_,
1677
- `#316 <https://github.com/pybind/pybind11/pull/316>`_,
1678
- `#312 <https://github.com/pybind/pybind11/pull/312>`_, and
1679
- `#267 <https://github.com/pybind/pybind11/pull/267>`_
1680
-
1681
- * Incompatible changes in ``class_<...>::class_()``:
1682
-
1683
- 1. Declarations of types that provide access via the buffer protocol must
1684
- now include the ``py::buffer_protocol()`` annotation as an argument to
1685
- the ``class_`` constructor.
1686
-
1687
- 2. Declarations of types that require a custom metaclass (i.e. all classes
1688
- which include static properties via commands such as
1689
- ``def_readwrite_static()``) must now include the ``py::metaclass()``
1690
- annotation as an argument to the ``class_`` constructor.
1691
-
1692
- These two changes were necessary to make type definitions in pybind11
1693
- future-proof, and to support PyPy via its cpyext mechanism. `#527
1694
- <https://github.com/pybind/pybind11/pull/527>`_.
1695
-
1696
-
1697
- 3. This version of pybind11 uses a redesigned mechanism for instantiating
1698
- trampoline classes that are used to override virtual methods from within
1699
- Python. This led to the following user-visible syntax change: instead of
1700
-
1701
- .. code-block:: cpp
1702
-
1703
- py::class_<TrampolineClass>("MyClass")
1704
- .alias<MyClass>()
1705
- ....
1706
-
1707
- write
1708
-
1709
- .. code-block:: cpp
1710
-
1711
- py::class_<MyClass, TrampolineClass>("MyClass")
1712
- ....
1713
-
1714
- Importantly, both the original and the trampoline class are now
1715
- specified as an arguments (in arbitrary order) to the ``py::class_``
1716
- template, and the ``alias<..>()`` call is gone. The new scheme has zero
1717
- overhead in cases when Python doesn't override any functions of the
1718
- underlying C++ class. `rev. 86d825
1719
- <https://github.com/pybind/pybind11/commit/86d825>`_.
1720
-
1721
- * Added ``eval`` and ``eval_file`` functions for evaluating expressions and
1722
- statements from a string or file. `rev. 0d3fc3
1723
- <https://github.com/pybind/pybind11/commit/0d3fc3>`_.
1724
-
1725
- * pybind11 can now create types with a modifiable dictionary.
1726
- `#437 <https://github.com/pybind/pybind11/pull/437>`_ and
1727
- `#444 <https://github.com/pybind/pybind11/pull/444>`_.
1728
-
1729
- * Support for translation of arbitrary C++ exceptions to Python counterparts.
1730
- `#296 <https://github.com/pybind/pybind11/pull/296>`_ and
1731
- `#273 <https://github.com/pybind/pybind11/pull/273>`_.
1732
-
1733
- * Report full backtraces through mixed C++/Python code, better reporting for
1734
- import errors, fixed GIL management in exception processing.
1735
- `#537 <https://github.com/pybind/pybind11/pull/537>`_,
1736
- `#494 <https://github.com/pybind/pybind11/pull/494>`_,
1737
- `rev. e72d95 <https://github.com/pybind/pybind11/commit/e72d95>`_, and
1738
- `rev. 099d6e <https://github.com/pybind/pybind11/commit/099d6e>`_.
1739
-
1740
- * Support for bit-level operations, comparisons, and serialization of C++
1741
- enumerations. `#503 <https://github.com/pybind/pybind11/pull/503>`_,
1742
- `#508 <https://github.com/pybind/pybind11/pull/508>`_,
1743
- `#380 <https://github.com/pybind/pybind11/pull/380>`_,
1744
- `#309 <https://github.com/pybind/pybind11/pull/309>`_.
1745
- `#311 <https://github.com/pybind/pybind11/pull/311>`_.
1746
-
1747
- * The ``class_`` constructor now accepts its template arguments in any order.
1748
- `#385 <https://github.com/pybind/pybind11/pull/385>`_.
1749
-
1750
- * Attribute and item accessors now have a more complete interface which makes
1751
- it possible to chain attributes as in
1752
- ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)``. `#425
1753
- <https://github.com/pybind/pybind11/pull/425>`_.
1754
-
1755
- * Major redesign of the default and conversion constructors in ``pytypes.h``.
1756
- `#464 <https://github.com/pybind/pybind11/pull/464>`_.
1757
-
1758
- * Added built-in support for ``std::shared_ptr`` holder type. It is no longer
1759
- necessary to to include a declaration of the form
1760
- ``PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`` (though continuing to
1761
- do so won't cause an error).
1762
- `#454 <https://github.com/pybind/pybind11/pull/454>`_.
1763
-
1764
- * New ``py::overload_cast`` casting operator to select among multiple possible
1765
- overloads of a function. An example:
1766
-
1767
- .. code-block:: cpp
1768
-
1769
- py::class_<Pet>(m, "Pet")
1770
- .def("set", py::overload_cast<int>(&Pet::set), "Set the pet's age")
1771
- .def("set", py::overload_cast<const std::string &>(&Pet::set), "Set the pet's name");
1772
-
1773
- This feature only works on C++14-capable compilers.
1774
- `#541 <https://github.com/pybind/pybind11/pull/541>`_.
1775
-
1776
- * C++ types are automatically cast to Python types, e.g. when assigning
1777
- them as an attribute. For instance, the following is now legal:
1778
-
1779
- .. code-block:: cpp
1780
-
1781
- py::module m = /* ... */
1782
- m.attr("constant") = 123;
1783
-
1784
- (Previously, a ``py::cast`` call was necessary to avoid a compilation error.)
1785
- `#551 <https://github.com/pybind/pybind11/pull/551>`_.
1786
-
1787
- * Redesigned ``pytest``-based test suite. `#321 <https://github.com/pybind/pybind11/pull/321>`_.
1788
-
1789
- * Instance tracking to detect reference leaks in test suite. `#324 <https://github.com/pybind/pybind11/pull/324>`_
1790
-
1791
- * pybind11 can now distinguish between multiple different instances that are
1792
- located at the same memory address, but which have different types.
1793
- `#329 <https://github.com/pybind/pybind11/pull/329>`_.
1794
-
1795
- * Improved logic in ``move`` return value policy.
1796
- `#510 <https://github.com/pybind/pybind11/pull/510>`_,
1797
- `#297 <https://github.com/pybind/pybind11/pull/297>`_.
1798
-
1799
- * Generalized unpacking API to permit calling Python functions from C++ using
1800
- notation such as ``foo(a1, a2, *args, "ka"_a=1, "kb"_a=2, **kwargs)``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
1801
-
1802
- * ``py::print()`` function whose behavior matches that of the native Python
1803
- ``print()`` function. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
1804
-
1805
- * Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42,
1806
- "name"_a="World");``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
1807
-
1808
- * Added ``py::str::format()`` method and ``_s`` literal: ``py::str s = "1 + 2
1809
- = {}"_s.format(3);``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
1810
-
1811
- * Added ``py::repr()`` function which is equivalent to Python's builtin
1812
- ``repr()``. `#333 <https://github.com/pybind/pybind11/pull/333>`_.
1813
-
1814
- * Improved construction and destruction logic for holder types. It is now
1815
- possible to reference instances with smart pointer holder types without
1816
- constructing the holder if desired. The ``PYBIND11_DECLARE_HOLDER_TYPE``
1817
- macro now accepts an optional second parameter to indicate whether the holder
1818
- type uses intrusive reference counting.
1819
- `#533 <https://github.com/pybind/pybind11/pull/533>`_ and
1820
- `#561 <https://github.com/pybind/pybind11/pull/561>`_.
1821
-
1822
- * Mapping a stateless C++ function to Python and back is now "for free" (i.e.
1823
- no extra indirections or argument conversion overheads). `rev. 954b79
1824
- <https://github.com/pybind/pybind11/commit/954b79>`_.
1825
-
1826
- * Bindings for ``std::valarray<T>``.
1827
- `#545 <https://github.com/pybind/pybind11/pull/545>`_.
1828
-
1829
- * Improved support for C++17 capable compilers.
1830
- `#562 <https://github.com/pybind/pybind11/pull/562>`_.
1831
-
1832
- * Bindings for ``std::optional<t>``.
1833
- `#475 <https://github.com/pybind/pybind11/pull/475>`_,
1834
- `#476 <https://github.com/pybind/pybind11/pull/476>`_,
1835
- `#479 <https://github.com/pybind/pybind11/pull/479>`_,
1836
- `#499 <https://github.com/pybind/pybind11/pull/499>`_, and
1837
- `#501 <https://github.com/pybind/pybind11/pull/501>`_.
1838
-
1839
- * ``stl_bind.h``: general improvements and support for ``std::map`` and
1840
- ``std::unordered_map``.
1841
- `#490 <https://github.com/pybind/pybind11/pull/490>`_,
1842
- `#282 <https://github.com/pybind/pybind11/pull/282>`_,
1843
- `#235 <https://github.com/pybind/pybind11/pull/235>`_.
1844
-
1845
- * The ``std::tuple``, ``std::pair``, ``std::list``, and ``std::vector`` type
1846
- casters now accept any Python sequence type as input. `rev. 107285
1847
- <https://github.com/pybind/pybind11/commit/107285>`_.
1848
-
1849
- * Improved CMake Python detection on multi-architecture Linux.
1850
- `#532 <https://github.com/pybind/pybind11/pull/532>`_.
1851
-
1852
- * Infrastructure to selectively disable or enable parts of the automatically
1853
- generated docstrings. `#486 <https://github.com/pybind/pybind11/pull/486>`_.
1854
-
1855
- * ``reference`` and ``reference_internal`` are now the default return value
1856
- properties for static and non-static properties, respectively. `#473
1857
- <https://github.com/pybind/pybind11/pull/473>`_. (the previous defaults
1858
- were ``automatic``). `#473 <https://github.com/pybind/pybind11/pull/473>`_.
1859
-
1860
- * Support for ``std::unique_ptr`` with non-default deleters or no deleter at
1861
- all (``py::nodelete``). `#384 <https://github.com/pybind/pybind11/pull/384>`_.
1862
-
1863
- * Deprecated ``handle::call()`` method. The new syntax to call Python
1864
- functions is simply ``handle()``. It can also be invoked explicitly via
1865
- ``handle::operator<X>()``, where ``X`` is an optional return value policy.
1866
-
1867
- * Print more informative error messages when ``make_tuple()`` or ``cast()``
1868
- fail. `#262 <https://github.com/pybind/pybind11/pull/262>`_.
1869
-
1870
- * Creation of holder types for classes deriving from
1871
- ``std::enable_shared_from_this<>`` now also works for ``const`` values.
1872
- `#260 <https://github.com/pybind/pybind11/pull/260>`_.
1873
-
1874
- * ``make_iterator()`` improvements for better compatibility with various
1875
- types (now uses prefix increment operator); it now also accepts iterators
1876
- with different begin/end types as long as they are equality comparable.
1877
- `#247 <https://github.com/pybind/pybind11/pull/247>`_.
1878
-
1879
- * ``arg()`` now accepts a wider range of argument types for default values.
1880
- `#244 <https://github.com/pybind/pybind11/pull/244>`_.
1881
-
1882
- * Support ``keep_alive`` where the nurse object may be ``None``. `#341
1883
- <https://github.com/pybind/pybind11/pull/341>`_.
1884
-
1885
- * Added constructors for ``str`` and ``bytes`` from zero-terminated char
1886
- pointers, and from char pointers and length. Added constructors for ``str``
1887
- from ``bytes`` and for ``bytes`` from ``str``, which will perform UTF-8
1888
- decoding/encoding as required.
1889
-
1890
- * Many other improvements of library internals without user-visible changes
1891
-
1892
-
1893
- 1.8.1 (July 12, 2016)
1894
- ----------------------
1895
- * Fixed a rare but potentially very severe issue when the garbage collector ran
1896
- during pybind11 type creation.
1897
-
1898
- 1.8.0 (June 14, 2016)
1899
- ----------------------
1900
- * Redesigned CMake build system which exports a convenient
1901
- ``pybind11_add_module`` function to parent projects.
1902
- * ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite``
1903
- * Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``)
1904
- * Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper
1905
- to disable an enforced cast that may lose precision, e.g. to create overloads
1906
- for different precisions and complex vs real-valued matrices.
1907
- * Prevent implicit conversion of floating point values to integral types in
1908
- function arguments
1909
- * Fixed incorrect default return value policy for functions returning a shared
1910
- pointer
1911
- * Don't allow registering a type via ``class_`` twice
1912
- * Don't allow casting a ``None`` value into a C++ lvalue reference
1913
- * Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command
1914
- * Improved detection of whether or not custom C++ types can be copy/move-constructed
1915
- * Extended ``str`` type to also work with ``bytes`` instances
1916
- * Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``.
1917
- * When specifying function arguments via ``py::arg``, the test that verifies
1918
- the number of arguments now runs at compile time.
1919
- * Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some
1920
- compiler warnings
1921
- * List function arguments in exception text when the dispatch code cannot find
1922
- a matching overload
1923
- * Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which
1924
- can be used to override virtual methods whose name differs in C++ and Python
1925
- (e.g. ``__call__`` and ``operator()``)
1926
- * Various minor ``iterator`` and ``make_iterator()`` improvements
1927
- * Transparently support ``__bool__`` on Python 2.x and Python 3.x
1928
- * Fixed issue with destructor of unpickled object not being called
1929
- * Minor CMake build system improvements on Windows
1930
- * New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which
1931
- take an arbitrary number of arguments and keyword arguments
1932
- * New syntax to call a Python function from C++ using ``*args`` and ``*kwargs``
1933
- * The functions ``def_property_*`` now correctly process docstring arguments (these
1934
- formerly caused a segmentation fault)
1935
- * Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()``
1936
- macro accepts more arguments)
1937
- * Cygwin support
1938
- * Documentation improvements (pickling support, ``keep_alive``, macro usage)
1939
-
1940
- 1.7 (April 30, 2016)
1941
- ----------------------
1942
- * Added a new ``move`` return value policy that triggers C++11 move semantics.
1943
- The automatic return value policy falls back to this case whenever a rvalue
1944
- reference is encountered
1945
- * Significantly more general GIL state routines that are used instead of
1946
- Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API
1947
- * Redesign of opaque types that drastically simplifies their usage
1948
- * Extended ability to pass values of type ``[const] void *``
1949
- * ``keep_alive`` fix: don't fail when there is no patient
1950
- * ``functional.h``: acquire the GIL before calling a Python function
1951
- * Added Python RAII type wrappers ``none`` and ``iterable``
1952
- * Added ``*args`` and ``*kwargs`` pass-through parameters to
1953
- ``pybind11.get_include()`` function
1954
- * Iterator improvements and fixes
1955
- * Documentation on return value policies and opaque types improved
1956
-
1957
- 1.6 (April 30, 2016)
1958
- ----------------------
1959
- * Skipped due to upload to PyPI gone wrong and inability to recover
1960
- (https://github.com/pypa/packaging-problems/issues/74)
1961
-
1962
- 1.5 (April 21, 2016)
1963
- ----------------------
1964
- * For polymorphic types, use RTTI to try to return the closest type registered with pybind11
1965
- * Pickling support for serializing and unserializing C++ instances to a byte stream in Python
1966
- * Added a convenience routine ``make_iterator()`` which turns a range indicated
1967
- by a pair of C++ iterators into a iterable Python object
1968
- * Added ``len()`` and a variadic ``make_tuple()`` function
1969
- * Addressed a rare issue that could confuse the current virtual function
1970
- dispatcher and another that could lead to crashes in multi-threaded
1971
- applications
1972
- * Added a ``get_include()`` function to the Python module that returns the path
1973
- of the directory containing the installed pybind11 header files
1974
- * Documentation improvements: import issues, symbol visibility, pickling, limitations
1975
- * Added casting support for ``std::reference_wrapper<>``
1976
-
1977
- 1.4 (April 7, 2016)
1978
- --------------------------
1979
- * Transparent type conversion for ``std::wstring`` and ``wchar_t``
1980
- * Allow passing ``nullptr``-valued strings
1981
- * Transparent passing of ``void *`` pointers using capsules
1982
- * Transparent support for returning values wrapped in ``std::unique_ptr<>``
1983
- * Improved docstring generation for compatibility with Sphinx
1984
- * Nicer debug error message when default parameter construction fails
1985
- * Support for "opaque" types that bypass the transparent conversion layer for STL containers
1986
- * Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors
1987
- * Redesigned property implementation; fixes crashes due to an unfortunate default return value policy
1988
- * Anaconda package generation support
1989
-
1990
- 1.3 (March 8, 2016)
1991
- --------------------------
1992
-
1993
- * Added support for the Intel C++ compiler (v15+)
1994
- * Added support for the STL unordered set/map data structures
1995
- * Added support for the STL linked list data structure
1996
- * NumPy-style broadcasting support in ``pybind11::vectorize``
1997
- * pybind11 now displays more verbose error messages when ``arg::operator=()`` fails
1998
- * pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues
1999
- * Many, many bugfixes involving corner cases and advanced usage
2000
-
2001
- 1.2 (February 7, 2016)
2002
- --------------------------
2003
-
2004
- * Optional: efficient generation of function signatures at compile time using C++14
2005
- * Switched to a simpler and more general way of dealing with function default
2006
- arguments. Unused keyword arguments in function calls are now detected and
2007
- cause errors as expected
2008
- * New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward``
2009
- * New ``pybind11::base<>`` attribute to indicate a subclass relationship
2010
- * Improved interface for RAII type wrappers in ``pytypes.h``
2011
- * Use RAII type wrappers consistently within pybind11 itself. This
2012
- fixes various potential refcount leaks when exceptions occur
2013
- * Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7)
2014
- * Made handle and related RAII classes const correct, using them more
2015
- consistently everywhere now
2016
- * Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are
2017
- now stored in a C++ hash table that is not visible in Python
2018
- * Fixed refcount leaks involving NumPy arrays and bound functions
2019
- * Vastly improved handling of shared/smart pointers
2020
- * Removed an unnecessary copy operation in ``pybind11::vectorize``
2021
- * Fixed naming clashes when both pybind11 and NumPy headers are included
2022
- * Added conversions for additional exception types
2023
- * Documentation improvements (using multiple extension modules, smart pointers,
2024
- other minor clarifications)
2025
- * unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function
2026
- * Fixed license text (was: ZLIB, should have been: 3-clause BSD)
2027
- * Python 3.2 compatibility
2028
- * Fixed remaining issues when accessing types in another plugin module
2029
- * Added enum comparison and casting methods
2030
- * Improved SFINAE-based detection of whether types are copy-constructible
2031
- * Eliminated many warnings about unused variables and the use of ``offsetof()``
2032
- * Support for ``std::array<>`` conversions
2033
-
2034
- 1.1 (December 7, 2015)
2035
- --------------------------
2036
-
2037
- * Documentation improvements (GIL, wrapping functions, casting, fixed many typos)
2038
- * Generalized conversion of integer types
2039
- * Improved support for casting function objects
2040
- * Improved support for ``std::shared_ptr<>`` conversions
2041
- * Initial support for ``std::set<>`` conversions
2042
- * Fixed type resolution issue for types defined in a separate plugin module
2043
- * CMake build system improvements
2044
- * Factored out generic functionality to non-templated code (smaller code size)
2045
- * Added a code size / compile time benchmark vs Boost.Python
2046
- * Added an appveyor CI script
2047
-
2048
- 1.0 (October 15, 2015)
2049
- ------------------------
2050
- * Initial release