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 doko
Recipients barry, doko, petr.viktorin
Date 2021-05-25.11:10:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621941017.83.0.685868201234.issue44230@roundup.psfhosted.org>
In-reply-to
Content
On Posix targets, the file names for extensionsions are currently

foo.cpython-39-x86_64-linux-gnu.so
foo.abi3.so

for platforms which have PLATFORM_TRIPLET defined.  This makes it clear which extension belongs to which interpreter, and at least on Debian and Ubuntu, it allowes cross-building of extensions by installing both the required build and host (or host and target) packages in the same environment.

Of course, the stable ABI is stable, so introducing another extension suffix to lookup has to be optional.  Having such a lookup only as a local patch in a CPython build would make these extensions not loadable by other CPython builds.

Proposing to also look up an extension with the stable ABI as

foo.x86_64-linux-gnu.abi3.so

Not using foo.x86_64-linux-gnu-abi3.so (with a dash) to keep possible .endswith() matches working.

Adding this new lookup to _PyImport_DynLoadFiletab, before or after the original .abi3.so should be possible.

- Adding it after the original one has the advantage that lookups won't get penalized with one extra lookup for people not using it.
- Adding it before the original one has the advantage that the more specific one is looked up before the more general one. That behavior could also become the default on Debian builds using a local patch.

One more question would be how to document that change, or if the platform specific extension file name should be the preferred name for the future.  Adding here just a minimal patch for discussion.
History
Date User Action Args
2021-05-25 11:10:17dokosetrecipients: + doko, barry, petr.viktorin
2021-05-25 11:10:17dokosetmessageid: <1621941017.83.0.685868201234.issue44230@roundup.psfhosted.org>
2021-05-25 11:10:17dokolinkissue44230 messages
2021-05-25 11:10:17dokocreate