summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-09-28 13:30:28 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-09-28 13:30:28 +0300
commit65a6afbbdaf1fc81304c66ffb1b024d63c4bbb5a (patch)
tree5bf65ed5ea4789db668c29360ee3a558d98a36a1 /python
parenta22fda5b5add3b96ac68a39ab8a6c88b72285098 (diff)
downloadrpm-65a6afbbdaf1fc81304c66ffb1b024d63c4bbb5a.tar.gz
rpm-65a6afbbdaf1fc81304c66ffb1b024d63c4bbb5a.tar.bz2
rpm-65a6afbbdaf1fc81304c66ffb1b024d63c4bbb5a.zip
Arrange rpm.headerLoad() compatibility on python level
Diffstat (limited to 'python')
-rw-r--r--python/header-py.c6
-rw-r--r--python/rpm/__init__.py4
-rw-r--r--python/rpmmodule.c2
3 files changed, 4 insertions, 8 deletions
diff --git a/python/header-py.c b/python/header-py.c
index 0f940afa1..521f5b6b7 100644
--- a/python/header-py.c
+++ b/python/header-py.c
@@ -524,12 +524,6 @@ Header hdrGetHeader(hdrObject * s)
return s->h;
}
-PyObject * hdrLoad(PyObject * s, PyObject * args, PyObject * kwds)
-{
- DEPRECATED_METHOD;
- return PyObject_Call((PyObject *) &hdr_Type, args, kwds);
-}
-
PyObject * rpmReadHeaders (FD_t fd)
{
PyObject * list;
diff --git a/python/rpm/__init__.py b/python/rpm/__init__.py
index 8354bc874..e70602574 100644
--- a/python/rpm/__init__.py
+++ b/python/rpm/__init__.py
@@ -4,6 +4,7 @@ This module enables you to manipulate rpms and the rpm database.
"""
+import warnings
from _rpm import *
import _rpm
@@ -12,3 +13,6 @@ _RPMVSF_NOHEADER = _rpm._RPMVSF_NOHEADER
_RPMVSF_NOPAYLOAD = _rpm._RPMVSF_NOPAYLOAD
_RPMVSF_NOSIGNATURES = _rpm._RPMVSF_NOSIGNATURES
+def headerLoad(*args, **kwds):
+ warnings.warn("Use rpm.hdr() instead.", DeprecationWarning, stacklevel=2)
+ return hdr(*args, **kwds)
diff --git a/python/rpmmodule.c b/python/rpmmodule.c
index d43e89cc7..ff516fc5b 100644
--- a/python/rpmmodule.c
+++ b/python/rpmmodule.c
@@ -158,8 +158,6 @@ static PyMethodDef rpmModuleMethods[] = {
{ "checkSignals", (PyCFunction) checkSignals, METH_VARARGS,
NULL },
- { "headerLoad", (PyCFunction) hdrLoad, METH_VARARGS|METH_KEYWORDS,
- NULL },
{ "mergeHeaderListFromFD", (PyCFunction) rpmMergeHeadersFromFD, METH_VARARGS|METH_KEYWORDS,
NULL },
{ "readHeaderListFromFD", (PyCFunction) rpmHeaderFromFD, METH_VARARGS|METH_KEYWORDS,