PyErr_Warn is deprecated in 2.5 - goes away for 3.0
diff --git a/Python/import.c b/Python/import.c
index bb40b68..7ac9e2a 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1320,8 +1320,8 @@
sprintf(warnstr, "Not importing directory "
"'%.*s': missing __init__.py",
MAXPATHLEN, buf);
- if (PyErr_Warn(PyExc_ImportWarning,
- warnstr)) {
+ if (PyErr_WarnEx(PyExc_ImportWarning,
+ warnstr, 1)) {
return NULL;
}
}
@@ -1339,8 +1339,8 @@
sprintf(warnstr, "Not importing directory "
"'%.*s': missing __init__.py",
MAXPATHLEN, buf);
- if (PyErr_Warn(PyExc_ImportWarning,
- warnstr)) {
+ if (PyErr_WarnEx(PyExc_ImportWarning,
+ warnstr, 1)) {
return NULL;
}
}