Skip to content

Commit ab525c3

Browse files
committed
Fix experimental warning
1 parent ff1cc05 commit ab525c3

File tree

1 file changed

+2
-3
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common

1 file changed

+2
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common/CExtContext.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,9 @@ private static String dlopenFlagsToString(int flags) {
304304
public static Object loadCExtModule(Node location, PythonContext context, ModuleSpec spec, CheckFunctionResultNode checkFunctionResultNode)
305305
throws IOException, ApiInitException, ImportException {
306306
if (getLogger().isLoggable(Level.WARNING) && context.getOption(PythonOptions.WarnExperimentalFeatures)) {
307-
boolean runViaLauncher = context.getOption(PythonOptions.RunViaLauncher);
308-
if (!runViaLauncher || !C_EXT_SUPPORTED_LIST.contains(spec.name.toJavaStringUncached())) {
307+
if (!C_EXT_SUPPORTED_LIST.contains(spec.name.toJavaStringUncached())) {
309308
String message = "Loading C extension module %s from '%s'. Support for the Python C API is considered experimental.";
310-
if (!runViaLauncher) {
309+
if (!(boolean) context.getOption(PythonOptions.RunViaLauncher)) {
311310
message += " See https://www.graalvm.org/latest/reference-manual/python/Native-Extensions/#embedding-limitations for the limitations. " +
312311
"You can suppress this warning by setting the context option 'python.WarnExperimentalFeatures' to 'false'.";
313312
}

0 commit comments

Comments
 (0)