diff --git a/Control/StoreGateBindings/src/AthenaPyRoot.h b/Control/StoreGateBindings/src/AthenaPyRoot.h
index 291fd236b64e6dc8b760f0589553cfdb8b2b597e..f2ea376996db245d5829764792a8fd9d88a1a89f 100644
--- a/Control/StoreGateBindings/src/AthenaPyRoot.h
+++ b/Control/StoreGateBindings/src/AthenaPyRoot.h
@@ -18,6 +18,7 @@
 #endif
 
 // fixes 'dereferencing type-punned pointer will break strict-aliasing rules'
+#if PY_VERSION_HEX < 0x03000000
 #ifdef Py_True
 #undef Py_True
 #define Py_True ( (PyObject*)(void*)&_Py_TrueStruct )
@@ -26,6 +27,7 @@
 #undef Py_False
 #define Py_False ( (PyObject*)(void*)&_Py_ZeroStruct )
 #endif
+#endif
 
 #define ObjectProxy_ASVOIDPTR(o) (TPython::ObjectProxy_AsVoidPtr(o))
 
diff --git a/Control/StoreGateBindings/src/PyThinning.cxx b/Control/StoreGateBindings/src/PyThinning.cxx
index 2eb8bf473443262a42735a7dc994369749845700..6d0e4d2f658932d1644869b66ff6f59c9b80ecfb 100755
--- a/Control/StoreGateBindings/src/PyThinning.cxx
+++ b/Control/StoreGateBindings/src/PyThinning.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "Python.h"
@@ -162,10 +162,12 @@ AthenaInternal::thinContainer( IThinningSvc* self,
 	 if ( iFilter == Py_True ) { filter[i] = true;
 	 } else                    { filter[i] = false;
 	 }
+#if PY_VERSION_HEX < 0x03000000
        } else if ( PyInt_CheckExact (iFilter) ) {
 	 if ( PyInt_AS_LONG (iFilter) ) { filter[i] = true;
 	 } else                         { filter[i] = false;
 	 }
+#endif
        } else if ( PyLong_CheckExact (iFilter) ) {
 	 if ( PyLong_AsLong (iFilter) ) { filter[i] = true;
 	 } else                         { filter[i] = false;
@@ -187,15 +189,21 @@ AthenaInternal::thinContainer( IThinningSvc* self,
 
      while (PyDict_Next(filter_, &itr_pos, &dict_key, &dict_value)) {
        // XXX FIXME: handle case where key is a C++ IdentifierHash ?
+#if PY_VERSION_HEX < 0x03000000
        std::size_t i = PyInt_AS_LONG(dict_key);
+#else
+       std::size_t i = PyLong_AsLong(dict_key);
+#endif
        if ( PyBool_Check (dict_value) ) {
 	 if ( dict_value == Py_True ) { filter[i] = true;
 	 } else                       { filter[i] = false;
 	 }
+#if PY_VERSION_HEX < 0x03000000
        } else if ( PyInt_CheckExact (dict_value) ) {
 	 if ( PyInt_AS_LONG (dict_value) ) { filter[i] = true;
 	 } else                            { filter[i] = false;
 	 }
+#endif
        } else if ( PyLong_CheckExact (dict_value) ) {
 	 if ( PyLong_AsLong (dict_value) ) { filter[i] = true;
 	 } else                            { filter[i] = false;
@@ -422,14 +430,22 @@ namespace SG {
       if (!pysc) {
 	PyROOT::throw_py_exception();
       }
+#if PY_VERSION_HEX < 0x03000000
       if ( !PyInt_Check (pysc) ) {
+#else
+      if ( !PyLong_Check (pysc) ) {
+#endif
 	Py_DECREF (pysc);
 	PyErr_SetString (PyExc_TypeError,
 			 (char*)"unexpected returned type");
 	PyROOT::throw_py_exception();
       }
 
+#if PY_VERSION_HEX < 0x03000000
       StatusCode sc (PyInt_AS_LONG( pysc ));
+#else
+      StatusCode sc (PyLong_AsLong( pysc ));
+#endif
       Py_DECREF (pysc);
       if ( !sc.isSuccess() ) {
 	PyErr_Format
diff --git a/Control/StoreGateBindings/src/SgPyDataModel.h b/Control/StoreGateBindings/src/SgPyDataModel.h
index 782a19faf6c91dd7edf47771c929317e5bab6a72..353566c854281c56b2e0bf35362cd55d2e7e012e 100644
--- a/Control/StoreGateBindings/src/SgPyDataModel.h
+++ b/Control/StoreGateBindings/src/SgPyDataModel.h
@@ -240,7 +240,11 @@ namespace SG {
         if ( alias ) {
           tp = alias;
         } else {
+#if PY_VERSION_HEX < 0x03000000
           tp = PyString_FromString(cpp_tp.c_str());
+#else
+          tp = PyUnicode_FromString(cpp_tp.c_str());
+#endif
         }
         PyDict_SetItem(m_clids, clid, tp);
         // reverse look-up
diff --git a/Control/StoreGateBindings/src/StoreGatePyExt.cxx b/Control/StoreGateBindings/src/StoreGatePyExt.cxx
index f011c45421adb1d21bb3ec374baf6a177d5af8d7..834e86e711b8f013d4b8f9decc7844912c4146ea 100755
--- a/Control/StoreGateBindings/src/StoreGatePyExt.cxx
+++ b/Control/StoreGateBindings/src/StoreGatePyExt.cxx
@@ -58,7 +58,12 @@ PyObject* pynameFromType (PyObject* tp)
   PyObject* pyname = nullptr;
 
   if ( ! PyType_Check( tp ) ) {
-    if ( ! PyString_Check( tp ) ) {
+#if PY_VERSION_HEX < 0x03000000
+    if ( ! PyString_Check( tp ) )
+#else
+    if ( ! PyUnicode_Check( tp ) )
+#endif
+    {
       PyErr_SetString( PyExc_TypeError, 
                        "contains() argument 1 must be type or class name" );
       return nullptr;
@@ -73,7 +78,12 @@ PyObject* pynameFromType (PyObject* tp)
     if (!pyname) {
       pyname = PyObject_GetAttrString( tp, (char*)"__name__" );
     }
-    if ( pyname && ! PyString_Check( pyname ) ) {
+#if PY_VERSION_HEX < 0x03000000
+    if ( pyname && ! PyString_Check( pyname ) )
+#else
+    if ( pyname && ! PyUnicode_Check( pyname ) )
+#endif
+    {
       PyObject* pystr = PyObject_Str( pyname );
       if ( pystr ) {
         Py_DECREF( pyname );
@@ -226,19 +236,31 @@ AthenaInternal::retrieveObjectFromStore( StoreGateSvc* store,
   } else if (realID == char_clid) {
     res = dbb->cast( char_clid );
     char *v = reinterpret_cast<char*>(res);
+#if PY_VERSION_HEX < 0x03000000
     objProxy = PyString_FromStringAndSize(v, 1);
+#else
+    objProxy = PyUnicode_FromStringAndSize(v, 1);
+#endif
     return objProxy;
 
   } else if (realID == int_clid) {
     res = dbb->cast( int_clid );
     int *v = reinterpret_cast<int*>(res);
+#if PY_VERSION_HEX < 0x03000000
     objProxy = PyInt_FromLong(*v);
+#else
+    objProxy = PyLong_FromLong(*v);
+#endif
     return objProxy;
 
   } else if (realID == uint_clid) {
     res = dbb->cast( uint_clid );
     unsigned int *v = reinterpret_cast<unsigned int*>(res);
+#if PY_VERSION_HEX < 0x03000000
     objProxy = PyInt_FromLong(*v);
+#else
+    objProxy = PyLong_FromLong(*v);
+#endif
     return objProxy;
 
   } else if (realID == long_clid) {
@@ -494,7 +516,11 @@ AthenaInternal::recordObjectToStore( StoreGateSvc* store,
   // check if this is a PyRoot object or a 'regular' PyObject
   const bool isPlainPyObj = !TPython::ObjectProxy_Check (obj);
   if ( isPlainPyObj ) {
+#if PY_VERSION_HEX < 0x03000000
     pyname = PyString_FromString ((char*)"PyObject");
+#else
+    pyname = PyUnicode_FromString ((char*)"PyObject");
+#endif
   } else {
     pyname = pynameFromType( tp );
   }