Skip to content

[2.7] bpo-27435 Fix ctypes.util.find_library failure on AIX (GH-4507)#5156

Closed
aixtools wants to merge 8 commits intopython:2.7from
aixtools:bpo-27435-v2.7
Closed

[2.7] bpo-27435 Fix ctypes.util.find_library failure on AIX (GH-4507)#5156
aixtools wants to merge 8 commits intopython:2.7from
aixtools:bpo-27435-v2.7

Conversation

@aixtools
Copy link
Copy Markdown
Contributor

@aixtools aixtools commented Jan 11, 2018

The changes needed (mainly removal of f-strings) to backport to Python2-2.7.
a) among other things - I did this for myself.
b) demonstrates that it is easy (perhaps easier) to backport to Python3 (3.4, 3.5 and 3.6)

Besides removal of f-strings:

  • a superfluous addition to Modules/dlmodule.c (this is where I saw several RTLD_ definitions, but they seem to have no impact
  • added RTLD_MEMBER and RTLD_NOW to Modules/_ctypes/_ctypes.c: Note that RTLD_NOW is not really needed as this is automatically added to the mode (invisibly) already (in _ctypes.c). However, to be complete, added both. In Python3 these would be part of the 'os' component (e.g., os.RTLD_MEMBER) - OR - they can be removed from _ctypes.c (and dlmodule.c) and be set in text in util.py (for the internal test) and init.py for the class definition
  • removed reference to DEVNULL - not in Python2

Still need to work on Docs
Still need to look at improvements based on suggestions/solutions that @haubi (?, Michael Haubi) posted on issue27435 thread (see 2.7...haubi:issue27435/2.7)

https://bugs.python.org/issue27435

add some specific AIX print statements as part of the self-tests
FYI: RTLD_NOW is already used, but buried in current code
These are added so that they can be imported rather than static define in .py code
Note - in Python3 these will be os.RTLD_MEMBER and os.RTLD_NOW
also - move "aix" block in util.py so that it is processed correctly
@aixtools aixtools changed the title [2.7] Fix ctypes.util.find_library failure on AIX (GH-4507) [2.7] bpo-27435 Fix ctypes.util.find_library failure on AIX (GH-4507) Jan 11, 2018
@aixtools
Copy link
Copy Markdown
Contributor Author

aixtools commented Jun 3, 2018

Removing for consideration in cpython. Shall include independently via aixtools/cpython fork. See http://www.aixtools.net/index.php/python2 if interested in patch.

@aixtools aixtools closed this Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants