From c229e6e8ff6de61581f59266dc553f04f2c870c3 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 20 Feb 2012 19:41:11 +0100 Subject: Issue #14040: Remove rarely used file name suffixes for C extensions (under POSIX mainly). This will improve import performance a bit (especially under importlib). --- Doc/whatsnew/3.3.rst | 14 ++++++++++++++ Misc/NEWS | 3 +++ Python/dynload_aix.c | 1 - Python/dynload_dl.c | 1 - Python/dynload_hpux.c | 1 - Python/dynload_next.c | 1 - Python/dynload_shlib.c | 6 ------ 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index 8cabab6..20e2914 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -939,6 +939,20 @@ Porting C code :c:func:`PyUnicode_FromFormat()`, your code will automatically take advantage of the new unicode representations. +Building C extensions +--------------------- + +* The range of possible file names for C extensions has been narrowed. + Very rarely used spellings have been suppressed: under POSIX, files + named ``xxxmodule.so``, ``xxxmodule.abi3.so`` and + ``xxxmodule.cpython-*.so`` are no longer recognized as implementing + the ``xxx`` module. If you had been generating such files, you have + to switch to the other spellings (i.e., remove the ``module`` string + from the file names). + + (implemented in :issue:`14040`.) + + Other issues ------------ diff --git a/Misc/NEWS b/Misc/NEWS index d9ad8fc..6e010b7 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 3.3 Alpha 1? Core and Builtins ----------------- +- Issue #14040: Remove rarely used file name suffixes for C extensions + (under POSIX mainly). + - Issue #14051: Allow arbitrary attributes to be set of classmethod and staticmethod. diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c index 6287c86..8346f06 100644 --- a/Python/dynload_aix.c +++ b/Python/dynload_aix.c @@ -28,7 +28,6 @@ typedef struct Module { const struct filedescr _PyImport_DynLoadFiletab[] = { {".so", "rb", C_EXTENSION}, - {"module.so", "rb", C_EXTENSION}, {0, 0} }; diff --git a/Python/dynload_dl.c b/Python/dynload_dl.c index 37519b2..a914a08 100644 --- a/Python/dynload_dl.c +++ b/Python/dynload_dl.c @@ -11,7 +11,6 @@ extern char *Py_GetProgramName(void); const struct filedescr _PyImport_DynLoadFiletab[] = { {".o", "rb", C_EXTENSION}, - {"module.o", "rb", C_EXTENSION}, {0, 0} }; diff --git a/Python/dynload_hpux.c b/Python/dynload_hpux.c index 3ebbbad..1004010 100644 --- a/Python/dynload_hpux.c +++ b/Python/dynload_hpux.c @@ -15,7 +15,6 @@ const struct filedescr _PyImport_DynLoadFiletab[] = { {SHLIB_EXT, "rb", C_EXTENSION}, - {"module"SHLIB_EXT, "rb", C_EXTENSION}, {0, 0} }; diff --git a/Python/dynload_next.c b/Python/dynload_next.c index eb17950..5caff8b 100644 --- a/Python/dynload_next.c +++ b/Python/dynload_next.c @@ -10,7 +10,6 @@ const struct filedescr _PyImport_DynLoadFiletab[] = { {".so", "rb", C_EXTENSION}, - {"module.so", "rb", C_EXTENSION}, {0, 0} }; diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index 1c215c3..ab24238 100644 --- a/Python/dynload_shlib.c +++ b/Python/dynload_shlib.c @@ -39,7 +39,6 @@ const struct filedescr _PyImport_DynLoadFiletab[] = { #ifdef __CYGWIN__ {".dll", "rb", C_EXTENSION}, - {"module.dll", "rb", C_EXTENSION}, #else /* !__CYGWIN__ */ #if defined(PYOS_OS2) && defined(PYCC_GCC) {".pyd", "rb", C_EXTENSION}, @@ -48,15 +47,10 @@ const struct filedescr _PyImport_DynLoadFiletab[] = { #ifdef __VMS {".exe", "rb", C_EXTENSION}, {".EXE", "rb", C_EXTENSION}, - {"module.exe", "rb", C_EXTENSION}, - {"MODULE.EXE", "rb", C_EXTENSION}, #else /* !__VMS */ {"." SOABI ".so", "rb", C_EXTENSION}, - {"module." SOABI ".so", "rb", C_EXTENSION}, {".abi" PYTHON_ABI_STRING ".so", "rb", C_EXTENSION}, - {"module.abi" PYTHON_ABI_STRING ".so", "rb", C_EXTENSION}, {".so", "rb", C_EXTENSION}, - {"module.so", "rb", C_EXTENSION}, #endif /* __VMS */ #endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */ #endif /* __CYGWIN__ */ -- cgit v0.12