pybind / pybind11

Seamless operability between C++11 and Python
https://pybind11.readthedocs.io/
Other
15.08k stars 2.05k forks source link

feat: remove Python 3.7 support #5191

Open rwgk opened 4 days ago

rwgk commented 4 days ago

Description

WIP

Suggested changelog entry:

rwgk commented 4 days ago

Overview of all compiler versions used/lost(-)/gained(+) before this PR, and with this PR @ commit 2f24de56d447712a4d294b57152a14bd6b48be49:

 AppleClang 15.0.0.15000040
-Clang 3.6.2    16 Jul 2015
-Clang 3.7.1     5 Jan 2016
-Clang 3.9.1    23 Dec 2016
 Clang 5.0.2
-Clang 7.1.0    10 May 2019
-Clang 9.0.1    20 Dec 2019
-Clang 10.0.1    6 Aug 2020
 Clang 11.1.0
 Clang 12.0.1
 Clang 13.0.1
 Clang 14.0.6
 Clang 15.0.7
 Clang 16.0.6
 Clang 18.1.6 with GNU-like command-line
 Clang 18.1.7
 Clang 19.0.0
-GNU 7.5.0      November 14, 2019
-GNU 8.3.0      February 22, 2019
 GNU 8.5.0
 GNU 9.4.0
+GNU 10.2.1
 GNU 10.5.0
 GNU 11.4.0
 GNU 11.4.1
 GNU 12.4.0
 GNU 13.2.0
 GNU 13.2.1
 GNU 13.3.0
 Intel 2021.10.0.20230609
 MSVC 19.29.30154.0
 MSVC 19.40.33811.0
 NVHPC 23.5.0
rwgk commented 4 days ago

Tracking simple findings:

henryiii commented 3 days ago

I think this next release might be a good time to remove C++11 support and increase our minimum supported compilers.

rwgk commented 3 days ago

I think this next release might be a good time to remove C++11 support and increase our minimum supported compilers.

Awesome. That's what I was thinking, too. I'll work on this PR more after the 2.13 release has baked in a bit.

henryiii commented 2 days ago

I think we can also bump CMake support. Personally, I've been going 3.15+ everywhere as that is what was required to build scikit-build-core. Though another option is 3.12+ (FindPython). I think we has someone request 3.10 or 3.11 before, might be worth checking.

If we did go 3.15+, we maybe could start to phase out classic FindPythonInterp support.

rwgk commented 2 days ago

If we did go 3.15+, we maybe could start to phase out classic FindPythonInterp support.

I just looked up: CMake 3.15.0 publication date was 17 July 2019

Does that look correct? — That's already 5 years ago (almost at least), and before Python 3.8 was released (Oct 2019). — I think it's much more likely to be helpful than harmful to make CMake 3.15 the minimum, and shed cruft.

henryiii commented 2 days ago

Here's the support table for CMake, with darker red for older than 3.15:

cmake versions

rwgk commented 2 days ago

My thinking:

henryiii commented 2 days ago

We’ve already made a 2.13 branch, master is 2.14. No rush, but waiting isn’t required. Does save ci time though if the branches are functionally identical.

No need to defer cleanup, we have plenty of time for this to sit in master. We should specify and test minimum versions where possible. I’m hoping we get a MSVC bump. :)

But that can also be a follow-up.

rwgk commented 16 hours ago

but waiting isn’t required.

it more prioritizing than waiting

this is up high on my list though; not a lot more to do