This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients David.Edelsohn, Michael.Felt,, martin.panter
Date 2016-06-12.09:41:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Michael, how are you supposed to apply your latest patch? I have Gnu Patch 2.7.5, but even in the best case it doesn’t find the files to patch:

$ patch -p1 -n < python.Lib.ctypes.160608.patch
can't find file to patch at input line 2
The text leading up to this was:
|diff -r Python-2.7.11/Lib/ctypes/ python-

Perhaps can you make a “unified” diff (-u option) like you did in your previous patches? Whatever you did with Python3.issue26439.160511.patch seemed to work best.

Also, since your patches add new functionality (the automatic archive member detection), they will have to be for Python 3, not 2.


Tuple vs "archive(member)" string being an API change:
> name = "libcrypto.a("
> name = ("libcrypto.a", "")
> name = ("libcrypto.a(", RTLD_MEMBER)

IMO all three options are API changes. Even though the first one is still a string, we are changing the meaning of the string. It no longer always means a plain file or library name, and you lose the ability to indicate a plain library file when the special format is used (even though that ability is unlikely to be used much).


Yes, please remove the internal variables from the signatures. Local variables always override the global scope anyway, so it makes no difference. And if you use the wrong kind of object (mutable object) as a default value in the signature, it can actually lead to subtle bugs.

I am happy to try modifying your code (once we get the patch format etc figured out). That is probably the quickest way to fix up some of the problems that are obvious to me, e.g. variables in signatures, subprocess driving, etc.


With my understanding, find_library("FOO") should not recognize /usr/lib/, it should only look for /usr/lib/, etc. So it should return None. Does linking with -lFOO recognize /usr/lib/ for you?

Similarly, find_library("../some/where/") shouldn’t work. You wouldn’t pass that with -l to the linker, I don’t think.
Date User Action Args
2016-06-12 09:41:46martin.pantersetrecipients: + martin.panter, David.Edelsohn, Michael.Felt,
2016-06-12 09:41:46martin.pantersetmessageid: <>
2016-06-12 09:41:46martin.panterlinkissue26439 messages
2016-06-12 09:41:46martin.pantercreate