Skip to content

Commit 2ff2ae7

Browse files
fix No module named _sqlite3 issue in cpu branch 24.0
1 parent 23e9e15 commit 2ff2ae7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/PythonLanguage.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
import java.io.IOException;
3838
import java.io.InputStream;
39+
import java.nio.charset.StandardCharsets;
3940
import java.nio.file.InvalidPathException;
4041
import java.util.ArrayList;
4142
import java.util.Arrays;
@@ -226,10 +227,11 @@ public final class PythonLanguage extends TruffleLanguage<PythonContext> {
226227
if (GRAALVM_MINOR != (ch = is.read() - ' ')) {
227228
throw new RuntimeException("suite.py version info does not match PythonLanguage#GRAALVM_MINOR: " + ch);
228229
}
230+
is.read(); // skip GraalVM micro version
229231
// see mx.graalpython/mx_graalpython.py:dev_tag
230-
byte[] rev = new byte[1 /* ' ' */ + 3 /* 'dev' */ + 10 /* revision */];
232+
byte[] rev = new byte[3 /* 'dev' */ + 10 /* revision */];
231233
if (is.read(rev) == rev.length) {
232-
DEV_TAG = new String(rev).strip();
234+
DEV_TAG = new String(rev, StandardCharsets.US_ASCII).strip();
233235
} else {
234236
DEV_TAG = "";
235237
}

mx.graalpython/mx_graalpython.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,7 @@ def graalpy_ext(llvm_mode, **kwargs):
17621762

17631763
def dev_tag(arg=None, **kwargs):
17641764
if not get_boolean_env('GRAALPYTHONDEVMODE', True) or 'dev' not in SUITE.release_version():
1765+
mx.logv("GraalPy dev_tag: <0 because not in dev mode>")
17651766
return ''
17661767

17671768
rev_list = [

0 commit comments

Comments
 (0)