Skip to content

Commit 57910a7

Browse files
ci(profiling): ignore deprecated function tp_print warning [backport 2.20] (#12200)
Co-authored-by: Taegyun Kim <[email protected]>
1 parent 3bd50fa commit 57910a7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ddtrace/internal/datadog/profiling/crashtracker/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ add_library(${EXTENSION_NAME} SHARED ${CRASHTRACKER_CPP_SRC})
4646
add_ddup_config(${EXTENSION_NAME})
4747
# Cython generates code that produces errors for the following, so relax compile options
4848
target_compile_options(${EXTENSION_NAME} PRIVATE -Wno-old-style-cast -Wno-shadow -Wno-address)
49+
# tp_print is marked deprecated in Python 3.8, but cython still generates code using it
50+
if("${Python3_VERSION_MINOR}" STREQUAL "8")
51+
target_compile_options(${EXTENSION_NAME} PRIVATE -Wno-deprecated-declarations)
52+
endif()
4953

5054
# cmake may mutate the name of the library (e.g., lib- and -.so for dynamic libraries). This suppresses that behavior,
5155
# which is required to ensure all paths can be inferred correctly by setup.py.

ddtrace/internal/datadog/profiling/ddup/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ add_library(${EXTENSION_NAME} SHARED ${DDUP_CPP_SRC})
4949
add_ddup_config(${EXTENSION_NAME})
5050
# Cython generates code that produces errors for the following, so relax compile options
5151
target_compile_options(${EXTENSION_NAME} PRIVATE -Wno-old-style-cast -Wno-shadow -Wno-address)
52+
# tp_print is marked deprecated in Python 3.8, but cython still generates code using it
53+
if("${Python3_VERSION_MINOR}" STREQUAL "8")
54+
target_compile_options(${EXTENSION_NAME} PRIVATE -Wno-deprecated-declarations)
55+
endif()
5256

5357
# cmake may mutate the name of the library (e.g., lib- and -.so for dynamic libraries). This suppresses that behavior,
5458
# which is required to ensure all paths can be inferred correctly by setup.py.

0 commit comments

Comments
 (0)