From 3a48a5c1541daa1fc3f49b9dbe0da247e7cd90f3 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Mon, 21 Oct 2019 14:39:33 +0000 Subject: [PATCH] Fix build failures for python 3.8 This fix tries to address the issue raised in 33543 where tensorflow build on python 3.8 failed. This fix fixed the issue as was suggested in 33543 and pip builds finished successfully. NOTE: tensorflow depends on h5py which does not have python 3.8 support yet, as such a release version of tensorflow for python 3.8 may have to wait for h5py first. Signed-off-by: Yong Tang --- tensorflow/python/eager/pywrap_tfe_src.cc | 4 ++-- tensorflow/python/lib/core/bfloat16.cc | 2 +- tensorflow/python/lib/core/ndarray_tensor_bridge.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/python/eager/pywrap_tfe_src.cc b/tensorflow/python/eager/pywrap_tfe_src.cc index cfae44af20..109bfe0579 100644 --- a/tensorflow/python/eager/pywrap_tfe_src.cc +++ b/tensorflow/python/eager/pywrap_tfe_src.cc @@ -1431,7 +1431,7 @@ static PyTypeObject TFE_Py_Tape_Type = { sizeof(TFE_Py_Tape), /* tp_basicsize */ 0, /* tp_itemsize */ &TFE_Py_Tape_Delete, /* tp_dealloc */ - nullptr, /* tp_print */ + 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ @@ -1469,7 +1469,7 @@ static PyTypeObject TFE_Py_ForwardAccumulator_Type = { sizeof(TFE_Py_ForwardAccumulator), /* tp_basicsize */ 0, /* tp_itemsize */ &TFE_Py_ForwardAccumulatorDelete, /* tp_dealloc */ - nullptr, /* tp_print */ + 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/tensorflow/python/lib/core/bfloat16.cc b/tensorflow/python/lib/core/bfloat16.cc index fde3a83770..54be76375c 100644 --- a/tensorflow/python/lib/core/bfloat16.cc +++ b/tensorflow/python/lib/core/bfloat16.cc @@ -317,7 +317,7 @@ PyTypeObject PyBfloat16_Type = { sizeof(PyBfloat16), // tp_basicsize 0, // tp_itemsize nullptr, // tp_dealloc - nullptr, // tp_print + 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare / tp_reserved diff --git a/tensorflow/python/lib/core/ndarray_tensor_bridge.cc b/tensorflow/python/lib/core/ndarray_tensor_bridge.cc index 16f6934186..03ff77100d 100644 --- a/tensorflow/python/lib/core/ndarray_tensor_bridge.cc +++ b/tensorflow/python/lib/core/ndarray_tensor_bridge.cc @@ -86,7 +86,7 @@ PyTypeObject TensorReleaserType = { 0, /* tp_itemsize */ /* methods */ TensorReleaser_dealloc, /* tp_dealloc */ - nullptr, /* tp_print */ + 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_compare */ -- 2.25.1