]> granicus.if.org Git - python/commitdiff
Issue #14040: Remove rarely used file name suffixes for C extensions (under POSIX...
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 20 Feb 2012 18:41:11 +0000 (19:41 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 20 Feb 2012 18:41:11 +0000 (19:41 +0100)
This will improve import performance a bit (especially under importlib).

Doc/whatsnew/3.3.rst
Misc/NEWS
Python/dynload_aix.c
Python/dynload_dl.c
Python/dynload_hpux.c
Python/dynload_next.c
Python/dynload_shlib.c

index 8cabab607664d115e629adcad06eecd28e31e0be..20e2914bc088d10f12ddf24e8070a682f6b116d0 100644 (file)
@@ -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
 ------------
 
index d9ad8fc377345c8766793de94bf81dbf3ffebf67..6e010b7a2f0a54c9867d598f44e011807e58b76b 100644 (file)
--- 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.
 
index 6287c86edf3bd23747f326f8ed83fc3d7c3f445b..8346f065e3f4e53a17c6942c57c50eff4f7033f3 100644 (file)
@@ -28,7 +28,6 @@ typedef struct Module {
 
 const struct filedescr _PyImport_DynLoadFiletab[] = {
     {".so", "rb", C_EXTENSION},
-    {"module.so", "rb", C_EXTENSION},
     {0, 0}
 };
 
index 37519b23e7eec4801d2539548082a59fd183a0b3..a914a0846e6b457c8123ea86c5dfb5be6b73fb3e 100644 (file)
@@ -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}
 };
 
index 3ebbbad01f13dd2301226a0dfbe17b515d8f219e..1004010902ff9db3b50b98b9be94e12bf24fedb6 100644 (file)
@@ -15,7 +15,6 @@
 
 const struct filedescr _PyImport_DynLoadFiletab[] = {
     {SHLIB_EXT, "rb", C_EXTENSION},
-    {"module"SHLIB_EXT, "rb", C_EXTENSION},
     {0, 0}
 };
 
index eb17950b4578841b48fd11fd4d98ca3ddeb353a2..5caff8bc9c4e6c1e1a356116067de51445b2a51e 100644 (file)
@@ -10,7 +10,6 @@
 
 const struct filedescr _PyImport_DynLoadFiletab[] = {
     {".so", "rb", C_EXTENSION},
-    {"module.so", "rb", C_EXTENSION},
     {0, 0}
 };
 
index 1c215c329cb5cd242d6d018b08ded193cbd3634b..ab24238f57057c35baf70c2283313a91e4959e98 100644 (file)
@@ -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__ */