8000 [GR-44824] Release hotfixes. · oracle/graalpython@8a76798 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a76798

Browse files
timfelgilles-duboscq
authored andcommitted
[GR-44824] Release hotfixes.
PullRequest: graalpython/2965
2 parents a111233 + cb34120 commit 8a76798

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

docs/user/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,19 @@ To try GraalPy with a full GraalVM, including support for Java embedding and int
4848

4949
### Windows
5050

51-
There is currently no installer for Windows.
52-
Instead, follow [these instructions](https://github.com/oracle/graalpython#user-content-building-from-source) to build GraalPy from source.
51+
There is a preview binary build of Windows that you can download via [www.graalvm.org](https://www.graalvm.org/downloads/).
52+
The Windows build has several known issues:
53+
54+
- JLine treats Windows a dumb terminal, no autocomplete and limited editing capabilities in the REPL
55+
- Interactive help() in the REPL doesn't work
56+
- Oracle GraalPy builds cannot create venvs or install packages, use community GraalPy builds to do those things.
57+
- Inside venvs:
58+
- graalpy.cmd and graalpy.exe are broken
59+
- pip.exe cannot be used directly
60+
- pip has trouble with cache file loading, use `--no-cache-dir`
61+
- Only pure Python binary wheels can be installed, no native extensions or source builds
62+
- To install a package, use `myvenv/Scripts/python.cmd -m pip --no-cache-dir install <pkg>`
63+
- Running from PowerShell works better than running from CMD, various scripts will fail on the latter
5364

5465
## Running Python
5566

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyContextFunctions.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,16 @@ static Object doGeneric(GraalHPyContext hpyContext, Object charPtr,
18751875

18761876
@TruffleBoundary
18771877
static Encoding getFSDefault() {
1878-
return Encoding.fromJCodingName(System.getProperty("file.encoding"));
1878+
String fileEncoding = System.getProperty("file.encoding");
1879+
if (fileEncoding != null) {
1880+
try {
1881+
return Encoding.valueOf(fileEncoding.replace('-', '_'));
1882+
} catch (IllegalArgumentException e) {
1883+
// avoid any fatal Java exceptions; fall through
1884+
}
1885+
}
1886+
// fall back to UTF-8
1887+
return Encoding.UTF_8;
18791888
}
18801889
}
18811890

graalpython/lib-graalpython/modules/standalone/__main__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ def get_executable(file):
420420

421421
def get_graalvm_url(self):
422422
if "." in self.jdk_version:
423-
major_version = jdk_version[:jdk_version.index(".")]
423+
major_version = self.jdk_version[:self.jdk_version.index(".")]
424424
else:
425-
major_version = jdk_version
425+
major_version = self.jdk_version
426426

427427
system = platform.system()
428428
sufix = 'tar.gz'
@@ -444,7 +444,7 @@ def get_graalvm_url(self):
444444
else:
445445
raise RuntimeError("Unknown platform machine", machine)
446446

447-
return f"{GRAALVM_URL_BASE}{major_version}/archive/graalvm-jdk-{jdk_version}_{system}-{machine}_bin.{sufix}"
447+
return f"{GRAALVM_URL_BASE}{major_version}/archive/graalvm-jdk-{self.jdk_version}_{system}-{machine}_bin.{sufix}"
448448

449449
def get_tools(self):
450450
if os.getenv("JAVA_HOME"):
@@ -543,6 +543,9 @@ def build_binary(self, ni, jc):
543543
"-Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime",
544544
"-Dpolyglot.engine.WarnInterpreterOnly=false",
545545
]
546+
# Remove once GR-48563 is fixed
547+
if "Oracle GraalVM" in subprocess.check_output([ni, "--version"], text=True):
548+
cmd.append("-H:-OptConditionalMoves")
546549
cmd += [
547550
"--no-fallback",
548551
"-H:-CopyLanguageResources",

0 commit comments

Comments
 (0)
0