Title: no need to try loading posix extensions without SOABI
Type: Stage: patch review
Components: Interpreter Core Versions: Python 3.2
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: barry, benjamin.peterson, doko, eric.araujo, georg.brandl, loewis
Priority: normal Keywords: patch

Created on 2010-09-09 01:05 by doko, last changed 2010-09-12 17:14 by georg.brandl. This issue is now closed.

File name Uploaded Description Edit
dynload.diff doko, 2010-09-09 01:05 proposed patch
pc-so.diff georg.brandl, 2010-09-12 11:02
Messages (11)
msg115922 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2010-09-09 01:05
the SOABI is always defined, no need to try loading an extension without the SOABI in its name.

ok to commit?
msg115925 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-09-09 02:16
I guess I'm concerned about any compatibility issues e.g. an extension built for 3.1 trying to load into 3.2.  But that'll probably fail anyway.  So I guess it's impossible to build a bare .so extension for Python 3.2.
msg115992 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-09-10 10:11
I'm not in favor of this change.  PEP 3179 was accepted because it presented an optional additional feature that doesn't break compatibility.

For example, build tools of third-party external modules that do not use distutils would break.
msg115993 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-09-10 10:23
Martin might be able to provide some insight from when (IIRC) Windows dynamic DLLs were restricted to .pyd extension only.
msg116014 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-09-10 12:43
Indeed, PEP 3179 is only supposed to add support for people who wish to version their modules.
msg116017 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-09-10 13:12


The point about building w/o distutils is a good one and touches on my concerns in my comment above.  It would be nice to know whether there's any measurable practical benefit to the change, i.e. measure startup time for an application that loads lots of modules.
msg116166 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-09-12 10:41
I agree with msg115992. People do use make to build extension modules, with hard-coded file names in the make targets.
msg116167 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2010-09-12 10:43
however we should expose the name of the SOABI string/extension in python-config, so that people can build with this name if they want to.
msg116171 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-09-12 11:02
It is available via sysconfig, so that would not be a problem.

Patch is attached; I'm not sure if the option name --so is the best one though.
msg116206 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2010-09-12 15:43
--extension-suffix ?
doesn't use the `so', which you don't see on MacOs, HpUX and Windows.
msg116221 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-09-12 17:14
Windows isn't relevant here, but for the others, extension-suffix sounds much better.  Added in r84747.
Date User Action Args
2010-09-12 17:14:33georg.brandlsetmessages: + msg116221
2010-09-12 15:43:17dokosetmessages: + msg116206
2010-09-12 11:02:23georg.brandlsetfiles: + pc-so.diff

messages: + msg116171
2010-09-12 10:43:33dokosetmessages: + msg116167
2010-09-12 10:41:16loewissetmessages: + msg116166
2010-09-11 23:46:56eric.araujosetnosy: + eric.araujo
2010-09-10 13:12:45barrysetmessages: + msg116017
2010-09-10 12:43:23benjamin.petersonsetstatus: open -> closed
resolution: rejected
messages: + msg116014
2010-09-10 10:23:17georg.brandlsetmessages: + msg115993
2010-09-10 10:11:04georg.brandlsetnosy: + loewis, georg.brandl, benjamin.peterson
messages: + msg115992
2010-09-09 02:16:30barrysetmessages: + msg115925
2010-09-09 01:06:09dokosetstage: patch review
2010-09-09 01:05:41dokocreate