
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2011-10-19 22:05 byvstinner, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| posix_rtld.patch | vstinner,2011-10-19 22:05 | review | ||
| posix_rtld-2.patch | vstinner,2011-10-20 19:40 | review | ||
| Messages (9) | |||
|---|---|---|---|
| msg145975 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2011-10-19 22:05 | |
We have a sys.setdlopenflags() function, but required constants are not available on all platforms. The DLFCN is only available on Linux and sunos5 (is plat-sunos5 available for all Solaris and OpenIndiana versions?), but not on OpenBSD, FreBSD, Mac OS X, ... whereas these platforms have the sys.setdlopenflags() function.My patch contains 7 constants: - RTLD_LAZY - RTLD_NOW - RTLD_GLOBAL - RTLD_LOCAL - RTLD_NODELETE - RTLD_NOLOAD - RTLD_DEEPBIND (glibc >= 2.3)The ctypes has two RTDL constants: RTLD_LOCAL and RTLD_GLOBAL. The 2 constants are always available, even if the platform doesn't support them! Extract of _ctypes.c:----------------------------------------/* If RTLD_LOCAL is not defined (Windows!), set it to zero. */#ifndef RTLD_LOCAL#define RTLD_LOCAL 0#endif/* If RTLD_GLOBAL is not defined (cygwin), set it to the same value as RTLD_LOCAL.*/#ifndef RTLD_GLOBAL#define RTLD_GLOBAL RTLD_LOCAL#endif----------------------------------------Lib/plat-sunos5/DLFCN.py contains 25 constants, only 6 are available in my patch. I don't think that we should expose all constants.Using Google Codesearch, I only found one user of RTLD constants (of the DLFCN module). It's PyKDE4 who calls: sys.setdlopenflags(DLFCN.RTLD_NOW|DLFCN.RTLD_GLOBAL)I guess that the 7 constants should be enough for everyone :-) We may add more later on demand. You can add your own constant to your program if you really need a special option on a specific platform. | |||
| msg146046 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2011-10-20 19:40 | |
Updated patch: remove "either" in the documentation. Thanks neologix par the review. | |||
| msg146067 -(view) | Author: Charles-François Natali (neologix)*![]() | Date: 2011-10-21 07:19 | |
Note that I'm really +10 on this issue: such constants belong to individual modules rather than to the unmanageableLib/plat-XXX/. | |||
| msg146074 -(view) | Author: Martin v. Löwis (loewis)*![]() | Date: 2011-10-21 09:42 | |
The patch looks fine to me. However, I don't think it meets Charles-François' requirement of moving the constants into an individual module. Rather than living in the unmanageable plat-XXX, they now live in the unmanageable posixmodule.c... | |||
| msg146359 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2011-10-25 11:34 | |
New changesetc75427c0da06 by Victor Stinner in branch 'default':Issue#13226: Add RTLD_xxx constants to the os module. These constants can byhttp://hg.python.org/cpython/rev/c75427c0da06 | |||
| msg146671 -(view) | Author: Arfrever Frehtes Taifersar Arahesis (Arfrever)*![]() | Date: 2011-10-31 01:27 | |
Python/sysmodule.c still contains references to DLFCN module. | |||
| msg146688 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2011-10-31 10:50 | |
New changeset05e2bdc00c0c by Victor Stinner in branch 'default':Issue#13226: Update sys.setdlopenflags() docstringhttp://hg.python.org/cpython/rev/05e2bdc00c0c | |||
| msg146851 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2011-11-02 17:06 | |
sys.getdlopenflags() doc and docstring still contain references to ctypes and DLFCN module. | |||
| msg191589 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2013-06-21 15:00 | |
New changeset1da78c7d382b by Andrew Kuchling in branch 'default':#13226: update references from ctypes/DLFCN modules to os modulehttp://hg.python.org/cpython/rev/1da78c7d382b | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:22 | admin | set | github: 57435 |
| 2013-06-21 15:00:42 | python-dev | set | messages: +msg191589 |
| 2011-11-02 17:06:12 | vstinner | set | messages: +msg146851 |
| 2011-10-31 10:50:32 | python-dev | set | messages: +msg146688 |
| 2011-10-31 01:27:38 | Arfrever | set | messages: +msg146671 |
| 2011-10-25 11:34:21 | vstinner | set | status: open -> closed resolution: fixed |
| 2011-10-25 11:34:12 | python-dev | set | nosy: +python-dev messages: +msg146359 |
| 2011-10-21 09:42:21 | loewis | set | nosy: +loewis messages: +msg146074 |
| 2011-10-21 07:19:48 | neologix | set | nosy: +neologix messages: +msg146067 |
| 2011-10-20 19:40:45 | vstinner | set | files: +posix_rtld-2.patch messages: +msg146046 |
| 2011-10-19 23:20:06 | Arfrever | set | nosy: +Arfrever |
| 2011-10-19 22:14:17 | jwilk | set | nosy: +jwilk |
| 2011-10-19 22:05:43 | vstinner | create | |