Skip to content

Commit

Permalink
suppressing suppresable leak warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloprobst committed Oct 30, 2024
1 parent d5a40a5 commit 1a81589
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cpp/nanobind/src/hyperon_das_atomdb_cpp_bind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,8 @@ NB_MODULE(ext, m) {
.def("__setstate__", &helpers::tuple_to_link)
.def("to_dict", &helpers::link_to_dict);
// ---------------------------------------------------------------------------------------------
// Disabling leak warnings as they can happen on Python interpreter shutdown, even if there are
// no actual leaks. This is a known issue related the Python C API, `typing` module and
// shared pointers. Re-enable them to run debugs if you suspect a leak in the code.
nb::set_leak_warnings(false);
}
3 changes: 2 additions & 1 deletion cpp/scripts/_build_glibc_packs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ rpm -U --force ${LIB_DIST_DIR}/${LIB_NAME_PATTERN}*.rpm
NANOBIND_ROOT=$(realpath "${PWD}/nanobind")
TMP_DEST_DIR="${NANOBIND_ROOT}/tmp_dist"
DEST_DIR="${NANOBIND_ROOT}/dist"
BUILD_DIR="${NANOBIND_ROOT}/build"

# Remove existing/old wheel files
rm -rf ${TMP_DEST_DIR}
rm -rf ${TMP_DEST_DIR} ${BUILD_DIR}
rm -f ${DEST_DIR}/${GLIBC_WHEEL_NAME_PATTERN}

# Create dirs
Expand Down
3 changes: 2 additions & 1 deletion cpp/scripts/_build_musl_packs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ tar zvxf ${LIB_DIST_DIR}/${LIB_NAME_PATTERN}*.tar.gz --strip-components=1 -C /
NANOBIND_ROOT=$(realpath "${PWD}/nanobind")
TMP_DEST_DIR="${NANOBIND_ROOT}/tmp_dist"
DEST_DIR="${NANOBIND_ROOT}/dist"
BUILD_DIR="${NANOBIND_ROOT}/build"

# Remove existing/old wheel files
rm -rf ${TMP_DEST_DIR}
rm -rf ${TMP_DEST_DIR} ${BUILD_DIR}
rm -f ${DEST_DIR}/${MUSL_WHEEL_NAME_PATTERN}

# Create dirs
Expand Down

0 comments on commit 1a81589

Please sign in to comment.