Skip to content

Commit 83e9d9f

Browse files
authored
Merge pull request #309 from zrax/py39_min
Drop support for Python versions before 3.7, and simplify CI matrix accordingly
2 parents 5e1483b + 9f2b119 commit 83e9d9f

4 files changed

Lines changed: 9 additions & 21 deletions

File tree

.github/workflows/windows-ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ jobs:
1010
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v143, cmake-arch: x64, arch: x64, python: "3.13", unity: OFF, str: windows-x64-v143 }
1111
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v143, cmake-arch: x64, arch: x64, python: "3.12", unity: ON, str: windows-x64-v143 }
1212
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v143, cmake-arch: x64, arch: x64, python: "3.11", unity: ON, str: windows-x64-v143 }
13-
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v143, cmake-arch: x64, arch: x64, python: "3.10", unity: ON, str: windows-x64-v143 }
14-
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v142, cmake-arch: Win32, arch: x86, python: 3.9, unity: ON, str: windows-x86-v142 }
15-
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v142, cmake-arch: x64, arch: x64, python: 3.8, unity: OFF, str: windows-x64-v142 }
13+
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v142, cmake-arch: x64, arch: x64, python: "3.10", unity: ON, str: windows-x64-v143 }
14+
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v142, cmake-arch: Win32, arch: x86, python: 3.9, unity: OFF, str: windows-x86-v142 }
15+
# Python 3.7 compatibility is required by Blender 2.79
1616
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v142, cmake-arch: Win32, arch: x86, python: 3.7, unity: OFF, str: windows-x86-v142 }
17-
- { image: windows-2022, generator: Visual Studio 17 2022, toolset: v142, cmake-arch: x64, arch: x64, python: 3.6, unity: ON, str: windows-x64-v142 }
1817
env:
1918
VCPKG_BINARY_SOURCES: 'clear'
2019
VCPKG_DEFAULT_HOST_TRIPLET: windows-hsplasma

Python/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
find_package(Python3 3.2 REQUIRED COMPONENTS Interpreter Development)
1+
find_package(Python3 3.7 REQUIRED COMPONENTS Interpreter Development)
22

33
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
44
set(CMAKE_CXX_FLAGS "-fno-strict-aliasing ${CMAKE_CXX_FLAGS}")

Python/PyPlasma.h

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ struct pySequenceFastRef
5555
PyObject* get(Py_ssize_t idx) { return PySequence_Fast_GET_ITEM(fObj, idx); }
5656
};
5757

58-
#if (PY_MAJOR_VERSION < 3) || ((PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION < 2))
59-
#error Your Python version is too old. Only 3.2 and later are supported
58+
#if (PY_MAJOR_VERSION < 3) || ((PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION < 7))
59+
#error Your Python version is too old. Only 3.7 and later are supported
6060
#endif
6161

6262
// C doesn't have boolean types until C11, which Python doesn't use
@@ -556,11 +556,6 @@ template <> inline plKeyDef pyPlasma_get(PyObject* value) { return (plKeyDef)PyL
556556
#define PY_METHOD_TERMINATOR { nullptr, nullptr, 0, nullptr }
557557

558558
/* Helpers for declaring and populating the master PyTypeObject structure */
559-
#if (PY_MAJOR_VERSION >= 4) || ((PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION >= 4))
560-
#define _TP_FINALIZE_INIT nullptr,
561-
#else
562-
#define _TP_FINALIZE_INIT
563-
#endif
564559

565560
// tp_print moved to the end, and two new vectorcall fields inserted in Python 3.8...
566561
// tp_print removed entirely from Python 3.9...
@@ -606,18 +601,12 @@ template <> inline plKeyDef pyPlasma_get(PyObject* value) { return (plKeyDef)PyL
606601
nullptr, nullptr, nullptr, nullptr, nullptr, \
607602
nullptr, nullptr, nullptr, nullptr, nullptr, \
608603
nullptr, 0, \
609-
_TP_FINALIZE_INIT \
604+
nullptr, \
610605
_TP_VECTORCALL_PRINT \
611606
_TP_WATCHED_INIT \
612607
_TP_VERSIONS_USED \
613608
};
614609

615-
#if ((PY_MAJOR_VERSION > 3) || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 5))
616-
#define _NB_MATRIX_MULTIPLY_INIT nullptr, nullptr,
617-
#else
618-
#define _NB_MATRIX_MULTIPLY_INIT
619-
#endif
620-
621610
#define PY_PLASMA_TYPE_AS_NUMBER(pyType) \
622611
static PyNumberMethods py##pyType##_As_Number = { \
623612
nullptr, nullptr, nullptr, \
@@ -628,7 +617,7 @@ template <> inline plKeyDef pyPlasma_get(PyObject* value) { return (plKeyDef)PyL
628617
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, \
629618
nullptr, nullptr, nullptr, nullptr, \
630619
nullptr, \
631-
_NB_MATRIX_MULTIPLY_INIT \
620+
nullptr, nullptr, \
632621
};
633622

634623
#define PY_PLASMA_TYPE_AS_MAPPING(pyType) \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ For libHSPlasmaNet
4949

5050
For PyHSPlasma
5151

52-
- [Python 3.2+](http://www.python.org/)
52+
- [Python 3.7+](http://www.python.org/)
5353

5454
You will also need CMake and a C++ compiler with at least some C++11 support.
5555
The following compiler versions are currently supported (others may work,

0 commit comments

Comments
 (0)