GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — gh-119349: Add ctypes.util function to list loaded shared libraries by WardBrian · Pull Request #122946 · python/cpython Conversation
|
|
The following commit authors need to sign the Contributor License Agreement: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I'm not a fan of returning |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Yes, what to do in the error case is certainly interesting. In my original implementation I returned We certainly could let the error propagate, but there isn't much you can do as a user with the exceptions. Most use cases I can imagine would catch the error and then return something falsey, either None or |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think we should offload that choice to the user. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It's a good way to show issues without flat-on taking down the (maybe
server) program.
Could you imagine that happening in GitHub's code storage server code?
Kai Griswold
…On Tue, Aug 13, 2024, 3:34 AM Peter Bierma ***@***.***> wrote:
I'm not a fan of returning None and emitting a warning instead of raising
an error. That seems like a potential footgun; I could see developers being
very confused as to why their code isn't working if they have warnings
suppressed, or simply don't see them (e.g. they're buried in logs).
—
Reply to this email directly, view it on GitHub
<#122946 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWUL3JYBIXZW4JVUOVEW4S3ZRHAIPAVCNFSM6AAAAABMMPSC6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBVGY3TGMRWHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am seeing that we're special-casing not having support for AIX. Does CPython even officially support AIX? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It's not listed in PEP 11, but there are ~150 other mentions of the platform in the codebase, mostly in test code, like the mentions here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of emitting warnings. Either you silently skip the failed names, or you raise. Or you return bytes and you won't have decoding issues for instance. But if you can list the DLLs being loaded, you should always return the complete list, and if you can't, then you should return None (other functions seem to do it as well when they can't get the result for whatever reason).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I'm not sure how long it takes to be reviewed and for the bot to update, but I wanted to note that my employer has filled out the CLA at this point |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Bikeshedding: if we're going to allow returning |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The dllist() function calls platform-specific APIs in order to list the runtime libraries loaded by Python and any imported modules. If these fail for any reason, None is returned.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit 5ab1b02 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F30617%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
On that platform, libc is called libc-2.28.so, not libc.so. Instead, the test searches for libffi.so, which is a dependency of ctypes
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit 80be2ab 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F30617%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Android has |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Pretty much LGTM, apart from my many nitpicks. Looking forward to seeing this merged!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Android links ctypes against libffi statically. We could change this, but if it's only for this test, then it would be easier to just test for libc on Android instead. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This should cover all tested systems, including Andriod which statically links libffi
I went ahead and updated the test to check if either libc.so or libffi.so is in the return on unix-alikes. Hopefully this guards against more platform issues, and we can always add a third candidate to this list if we end up with an even weirder platform that has neither... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit 1c3594e 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F30617%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for doing this and for your patience with reviews, @WardBrian
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.