We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3358fee commit e2a3e2eCopy full SHA for e2a3e2e
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ImpModuleBuiltins.java
@@ -466,8 +466,12 @@ protected ArgumentClinicProvider getArgumentClinic() {
466
@Specialization
467
boolean run(String name) {
468
// if PYTHONPATH is set, it is prepended to the sys.path on startup and thus might
469
- // override any frozen modules from the stdlib
470
- return getContext().getOption(PythonOptions.PythonPath).isEmpty() && findFrozen(name).status == FROZEN_OKAY;
+ // override the site module from the stdlib
+ if (!getContext().getOption(PythonOptions.PythonPath).isEmpty() && "site".equals(name)) {
471
+ return false;
472
+ } else {
473
+ return findFrozen(name).status == FROZEN_OKAY;
474
+ }
475
}
476
477
0 commit comments