.. module:: dl
:platform: Unix
:synopsis: Call C functions in shared objects.
+ :deprecated:
+
+.. deprecated:: 2.6
+ The dl module has been removed in Python 3.0.
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
The :mod:`dl` module defines an interface to the :cfunc:`dlopen` function, which
"""Test dlmodule.c
Roger E. Masse revised strategy by Barry Warsaw
"""
-
-import dl
-from test.test_support import verbose,TestSkipped
+from test.test_support import verbose,TestSkipped, import_module
+dl = import_module('dl', deprecated=True)
sharedlibs = [
('/usr/lib/libc.so', 'getpid'),
'Bastion', 'compiler', 'dircache')
inclusive_platforms = {'irix':('pure',)}
# XXX Don't know if lib-tk is only installed if _tkinter is built.
- optional_modules = ('bsddb185', 'Canvas')
+ optional_modules = ('bsddb185', 'Canvas', 'dl')
def check_removal(self, module_name, optional=False):
"""Make sure the specified module, when imported, raises a
{
PyObject *m, *d, *x;
+ if (PyErr_WarnPy3k("the dl module has been removed in "
+ "Python 3.0", 2) < 0)
+ return;
+
/* Initialize object type */
Py_TYPE(&Dltype) = &PyType_Type;