FIx cmake warning on CMP0148

- find_package(PythonInterp) and find_package(PythonLibs) were deprecated in 3.12 and removed in 3.27
- The project minimum is at 3.16 already
diff --git a/compiler/cpp/test/CMakeLists.txt b/compiler/cpp/test/CMakeLists.txt
index 6cf309b..e042257 100644
--- a/compiler/cpp/test/CMakeLists.txt
+++ b/compiler/cpp/test/CMakeLists.txt
@@ -30,8 +30,8 @@
     endforeach()
 endforeach()
 
-find_package(PythonInterp QUIET)
-if(PYTHONINTERP_FOUND)
+find_package(Python3 COMPONENTS Interpreter QUIET)
+if(Python3_Interpreter_FOUND)
   add_test(NAME StalenessCheckTest COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/compiler/staleness_check.py ${THRIFT_COMPILER})
 else()
   message(WARNING "Skipping StalenessCheckTest as there is no python interpreter available.")