chore: drop Python 3.5 (#3719)

* chore: drop Python 3.5 support

* chore: more fstrings with flynt's help

* ci: drop Python 3.5

* chore: bump dependency versions

* docs: touch up py::args

* tests: remove deprecation warning

* Ban smartquotes

* Very minor tweaks (by-product of reviewing PR #3719).

Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
This commit is contained in:
Henry Schreiner
2022-02-11 19:06:16 -05:00
committed by GitHub
parent 1a432b426f
commit 522c59ceb2
49 changed files with 171 additions and 241 deletions

View File

@@ -92,7 +92,7 @@ endif()
# Use the Python interpreter to find the libs.
if(NOT PythonLibsNew_FIND_VERSION)
set(PythonLibsNew_FIND_VERSION "3.5")
set(PythonLibsNew_FIND_VERSION "3.6")
endif()
find_package(PythonInterp ${PythonLibsNew_FIND_VERSION} ${_pythonlibs_required}

View File

@@ -13,7 +13,7 @@ lib = sys.argv[1]
save = sys.argv[2]
if not os.path.exists(lib):
sys.exit("Error: requested file ({}) does not exist".format(lib))
sys.exit(f"Error: requested file ({lib}) does not exist")
libsize = os.path.getsize(lib)
@@ -28,7 +28,7 @@ if os.path.exists(save):
if change == 0:
print(" (no change)")
else:
print(" (change of {:+} bytes = {:+.2%})".format(change, change / oldsize))
print(f" (change of {change:+} bytes = {change / oldsize:+.2%})")
else:
print()

View File

@@ -193,7 +193,7 @@ Using ``find_package`` with version info is not recommended except for release v
.. code-block:: cmake
find_package(pybind11 CONFIG)
find_package(pybind11 2.0 EXACT CONFIG REQUIRED)
find_package(pybind11 2.9 EXACT CONFIG REQUIRED)
#]=============================================================================]
@PACKAGE_INIT@

View File

@@ -32,7 +32,7 @@ if(NOT Python_FOUND AND NOT Python3_FOUND)
set(Python_ROOT_DIR "$ENV{pythonLocation}")
endif()
find_package(Python 3.5 REQUIRED COMPONENTS Interpreter Development ${_pybind11_quiet})
find_package(Python 3.6 REQUIRED COMPONENTS Interpreter Development ${_pybind11_quiet})
# If we are in submodule mode, export the Python targets to global targets.
# If this behavior is not desired, FindPython _before_ pybind11.

View File

@@ -43,7 +43,7 @@ endif()
# A user can set versions manually too
set(Python_ADDITIONAL_VERSIONS
"3.11;3.10;3.9;3.8;3.7;3.6;3.5"
"3.11;3.10;3.9;3.8;3.7;3.6"
CACHE INTERNAL "")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
# Setup script for pybind11-global (in the sdist or in tools/setup_global.py in the repository)
# This package is targeted for easy use from CMake.

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
# Setup script (in the sdist or in tools/setup_main.py in the repository)