From 780be6a71d8920c30b7de053e79ed82630919738 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 23 Jul 2022 09:45:16 -0700 Subject: [PATCH] src/sage/misc/sageinspect.py: Deprecate loadable_module_extension --- src/sage/misc/sageinspect.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index 13f0fc1bec3..ced989e3b4e 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -179,13 +179,20 @@ def loadable_module_extension(): It is '.dll' on cygwin, '.so' otherwise. + This function is deprecated. + EXAMPLES:: sage: from sage.misc.sageinspect import loadable_module_extension sage: from importlib.machinery import EXTENSION_SUFFIXES sage: loadable_module_extension() in EXTENSION_SUFFIXES + doctest:warning... + DeprecationWarning: loadable_module_extension is deprecated; use importlib.machinery.EXTENSION_SUFFIXES instead + See https://trac.sagemath.org/33636 for details. True """ + from sage.misc.superseded import deprecation + deprecation(33636, "loadable_module_extension is deprecated; use importlib.machinery.EXTENSION_SUFFIXES instead") # Return the full platform-specific extension module suffix return import_machinery.EXTENSION_SUFFIXES[0]