From d255d63c183268a6e906a089b55e92883f86bb02 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Mon, 24 Jun 2024 22:56:38 -0700 Subject: [PATCH] Misc cleanup pass --- README.rst | 4 ++-- docs/advanced/classes.rst | 3 +-- docs/compiling.rst | 4 ++-- tests/requirements.txt | 5 ++--- tools/FindPythonLibsNew.cmake | 2 +- tools/pybind11NewTools.cmake | 2 +- tools/pybind11Tools.cmake | 2 +- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.rst b/README.rst index 0d1e1d2913..8e0c391770 100644 --- a/README.rst +++ b/README.rst @@ -34,7 +34,7 @@ dependency. Think of this library as a tiny self-contained version of Boost.Python with everything stripped away that isn't relevant for binding generation. Without comments, the core header files only require ~4K -lines of code and depend on Python (3.7+, or PyPy) and the C++ +lines of code and depend on Python (3.8+, or PyPy) and the C++ standard library. This compact implementation was possible thanks to some C++11 language features (specifically: tuples, lambda functions and variadic templates). Since its creation, this library has grown beyond @@ -79,7 +79,7 @@ Goodies In addition to the core functionality, pybind11 provides some extra goodies: -- Python 3.7+, and PyPy3 7.3 are supported with an implementation-agnostic +- Python 3.8+, and PyPy3 7.3 are supported with an implementation-agnostic interface (pybind11 2.9 was the last version to support Python 2 and 3.5). - It is possible to bind C++11 lambda functions with captured diff --git a/docs/advanced/classes.rst b/docs/advanced/classes.rst index 01a490b721..1e221072f2 100644 --- a/docs/advanced/classes.rst +++ b/docs/advanced/classes.rst @@ -826,8 +826,7 @@ An instance can now be pickled as follows: always use the latest available version. Beware: failure to follow these instructions will cause important pybind11 memory allocation routines to be skipped during unpickling, which will likely lead to memory corruption - and/or segmentation faults. Python defaults to version 3 (Python 3-3.7) and - version 4 for Python 3.8+. + and/or segmentation faults. .. seealso:: diff --git a/docs/compiling.rst b/docs/compiling.rst index 0b7c178b01..234f53fb34 100644 --- a/docs/compiling.rst +++ b/docs/compiling.rst @@ -426,7 +426,7 @@ with ``PYTHON_EXECUTABLE``. For example: .. code-block:: bash - cmake -DPYBIND11_PYTHON_VERSION=3.7 .. + cmake -DPYBIND11_PYTHON_VERSION=3.8 .. # Another method: cmake -DPYTHON_EXECUTABLE=/path/to/python .. @@ -493,7 +493,7 @@ existing targets instead: cmake_minimum_required(VERSION 3.15...3.22) project(example LANGUAGES CXX) - find_package(Python 3.7 COMPONENTS Interpreter Development REQUIRED) + find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED) find_package(pybind11 CONFIG REQUIRED) # or add_subdirectory(pybind11) diff --git a/tests/requirements.txt b/tests/requirements.txt index 337897bd24..f4f838ec0a 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,9 +1,8 @@ --only-binary=:all: -build~=1.0; python_version>="3.7" -numpy~=1.20.0; python_version=="3.7" and platform_python_implementation=="PyPy" +build~=1.0; python_version>="3.8" numpy~=1.23.0; python_version=="3.8" and platform_python_implementation=="PyPy" numpy~=1.25.0; python_version=="3.9" and platform_python_implementation=='PyPy' -numpy~=1.21.5; platform_python_implementation!="PyPy" and python_version>="3.7" and python_version<"3.10" +numpy~=1.21.5; platform_python_implementation!="PyPy" and python_version>="3.8" and python_version<"3.10" numpy~=1.22.2; platform_python_implementation!="PyPy" and python_version=="3.10" numpy~=1.26.0; platform_python_implementation!="PyPy" and python_version>="3.11" and python_version<"3.13" pytest~=7.0 diff --git a/tools/FindPythonLibsNew.cmake b/tools/FindPythonLibsNew.cmake index 283b4e2980..014f68fb56 100644 --- a/tools/FindPythonLibsNew.cmake +++ b/tools/FindPythonLibsNew.cmake @@ -92,7 +92,7 @@ endif() # Use the Python interpreter to find the libs. if(NOT PythonLibsNew_FIND_VERSION) - set(PythonLibsNew_FIND_VERSION "3.7") + set(PythonLibsNew_FIND_VERSION "3.8") endif() if(NOT CMAKE_VERSION VERSION_LESS "3.27") diff --git a/tools/pybind11NewTools.cmake b/tools/pybind11NewTools.cmake index a8b0800bb8..444f3aaf54 100644 --- a/tools/pybind11NewTools.cmake +++ b/tools/pybind11NewTools.cmake @@ -56,7 +56,7 @@ if(NOT Python_FOUND AND NOT Python3_FOUND) endif() find_package( - Python 3.7 REQUIRED COMPONENTS ${_pybind11_interp_component} ${_pybind11_dev_component} + Python 3.8 REQUIRED COMPONENTS ${_pybind11_interp_component} ${_pybind11_dev_component} ${_pybind11_quiet} ${_pybind11_global_keyword}) # If we are in submodule mode, export the Python targets to global targets. diff --git a/tools/pybind11Tools.cmake b/tools/pybind11Tools.cmake index bed5e08039..021038d954 100644 --- a/tools/pybind11Tools.cmake +++ b/tools/pybind11Tools.cmake @@ -43,7 +43,7 @@ endif() # A user can set versions manually too set(Python_ADDITIONAL_VERSIONS - "3.12;3.11;3.10;3.9;3.8;3.7" + "3.12;3.11;3.10;3.9;3.8" CACHE INTERNAL "") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")