e71db24
diff --git a/setup.py b/setup.py
e71db24
index 4cd36ee..e1e9931 100644
e71db24
--- a/setup.py
e71db24
+++ b/setup.py
e71db24
@@ -18,7 +18,7 @@
e71db24
 #
e71db24
 
e71db24
 
e71db24
-from distutils.version import StrictVersion
e71db24
+from distutils.version import LooseVersion
e71db24
 from distutils.core import setup, Extension
e71db24
 
e71db24
 from ctypes.util import find_library
e71db24
@@ -37,7 +37,7 @@ min_libev_version = "4.15"
e71db24
 version_error = "Aborted: pyev-{0} requires {{0}} >= {{1}}".format(pyev_version)
e71db24
 
e71db24
 def check_version(current_version, minimum_version, name):
e71db24
-    if StrictVersion(current_version) < StrictVersion(minimum_version):
e71db24
+    if LooseVersion(current_version) < LooseVersion(minimum_version):
e71db24
         raise SystemExit(version_error.format(name, minimum_version))
e71db24
 
e71db24
 
e71db24
diff --git a/src/pyev.c b/src/pyev.c
e71db24
index 47aa4bf..2e830ed 100644
e71db24
--- a/src/pyev.c
e71db24
+++ b/src/pyev.c
e71db24
@@ -338,7 +338,7 @@ PyType_ReadyWatcher(PyTypeObject *type, PyTypeObject *base)
e71db24
 
e71db24
 
e71db24
 int
e71db24
-PyModule_AddType(PyObject *module, const char *name, PyTypeObject *type)
e71db24
+PyModule_AddType_(PyObject *module, const char *name, PyTypeObject *type)
e71db24
 {
e71db24
     if (PyType_Ready(type)) {
e71db24
         return -1;
e71db24
@@ -555,7 +555,7 @@ init_pyev(void)
e71db24
     /* types and constants */
e71db24
     if (
e71db24
         /* loop */
e71db24
-        PyModule_AddType(pyev, "Loop", &LoopType) ||
e71db24
+        PyModule_AddType_(pyev, "Loop", &LoopType) ||
e71db24
         PyModule_AddUnsignedIntMacro(pyev, EVFLAG_AUTO) ||
e71db24
         PyModule_AddUnsignedIntMacro(pyev, EVFLAG_NOENV) ||
e71db24
         PyModule_AddUnsignedIntMacro(pyev, EVFLAG_FORKCHECK) ||