dl module is missing?

Bug #1721840 reported by Colin Watson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python2.7 (Ubuntu)
New
Undecided
Unassigned

Bug Description

The Python 2.7 documentation documents the "dl" module (I know it's deprecated and has been removed in Python 3), but it doesn't actually exist:

  >>> import dl
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  ImportError: No module named dl

Seen with both 2.7.12-1ubuntu0~16.04.1 (xenial amd64) and 2.7.14-2ubuntu2 (artful amd64).

Revision history for this message
Matthias Klose (doko) wrote :

I'm not sure that this was ever enabled. it's documented as "a highly experimental and dangerous device for calling *arbitrary* C functions in *arbitrary* shared libraries".

I'd like to keep it disabled.

Revision history for this message
Colin Watson (cjwatson) wrote :

Your changelog entry for 2.2.1-1 suggests that it was enabled once.

As far as I can tell there's no other terribly sensible way to get at the value of RTLD_NOW in Python 2; I was helping a friend who was writing a complicated thing to do with the Python gdb bindings that needed that and that needed to work in both Python 2 and 3. (In Python 3, it's os.RTLD_NOW.)

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

annoyingly python2 has: ctypes.RTLD_GLOBAL ctypes.RTLD_LOCAL, but not ctypes.RTLD_NOW

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I wonder if https://pypi.python.org/pypi/backports.os https://github.com/pjdelport/backports.os should grow this feature, since python3 is the future.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.