merge 3.4
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 3413b12..3c82e51 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -102,8 +102,17 @@
         }
     }
     else {
-        pto->kw = pkw;
-        Py_INCREF(pkw);
+        if (pkw == Py_None) {
+            pto->kw = PyDict_New();
+            if (pto->kw == NULL) {
+                Py_DECREF(pto);
+                return NULL;
+            }
+        }
+        else {
+            pto->kw = pkw;
+            Py_INCREF(pkw);
+        }
     }
 
     pto->weakreflist = NULL;