Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/scripts/extract_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@

# Gitlab Runners OSS
OSS = {
"macos-latest": ["darwin", "aarch64"],
"ubuntu-latest": ["linux", "amd64"],
"ubuntu-24.04-arm": ["linux", "aarch64"],
"windows-latest": ["windows", "amd64"]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Refer to our [embedding documentation](https://www.graalvm.org/latest/reference-
* Gradle
```kotlin
implementation("org.graalvm.polyglot:polyglot:25.0.2")
implementation("org.graalvm.polyglot:python:25.0.2")
implementation("org.graalvm.python:python-embedding:25.0.2")
```

</details>
Expand Down Expand Up @@ -115,7 +115,7 @@ Thanks to our integration with GraalVM Native Image, we can deploy Python applic

Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).

1. Find the download that matches the pattern _graalpy-XX.Y.Z-macos-amd64.tar.gz_ or _graalpy-XX.Y.Z-macos-aarch64.tar.gz_ (depending on your platform) and download.
1. Find the download that matches the pattern _graalpy-XX.Y.Z-macos-aarch64.tar.gz_ and download.
2. Remove the quarantine attribute.
```bash
sudo xattr -r -d com.apple.quarantine /path/to/graalpy
Expand All @@ -124,7 +124,7 @@ Thanks to our integration with GraalVM Native Image, we can deploy Python applic
```bash
sudo xattr -r -d com.apple.quarantine ~/.pyenv/versions/graalpy-25.0.2
```
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-XX.Y.Z-macos-amd64/bin_ (or _graalpy-XX.Y.Z-macos-aarch64/bin_) directory.
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-XX.Y.Z-macos-aarch64/bin_ directory.

* Windows

Expand Down Expand Up @@ -174,7 +174,7 @@ To run Jython scripts, you need to use a GraalPy distribution running on the JVM

* macOS

1. Find and download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases) that matches the pattern _graalpy-jvm-XX.Y.Z-macos-amd64.tar.gz_ or _graalpy-jvm-XX.Y.Z-macos-aarch64.tar.gz_ (depending on your platform) and download.
1. Find and download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases) that matches the pattern _graalpy-jvm-XX.Y.Z-macos-aarch64.tar.gz_ and download.
2. Remove the quarantine attribute.
```bash
sudo xattr -r -d com.apple.quarantine /path/to/graalpy
Expand All @@ -183,7 +183,7 @@ To run Jython scripts, you need to use a GraalPy distribution running on the JVM
```bash
sudo xattr -r -d com.apple.quarantine ~/.pyenv/versions/graalpy-25.0.2
```
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-jvm-XX.Y.Z-macos-amd64/bin_ (or _graalpy-jvm-XX.Y.Z-macos-aarch64/bin_) directory.
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-jvm-XX.Y.Z-macos-aarch64/bin_ directory.
4. Run your scripts with `graalpy --python.EmulateJython`.

* Windows
Expand Down Expand Up @@ -222,7 +222,7 @@ Consult the [security guide](./SECURITY.md) for our responsible security vulnera

## License

This GraalVM implementation of Python is Copyright (c) 2017, 2024 Oracle and/or its affiliates and is made available to you under the terms the Universal Permissive License v 1.0 as shown at [https://oss.oracle.com/licenses/upl/](https://oss.oracle.com/licenses/upl/).
This GraalVM implementation of Python is Copyright (c) 2017, 2026 Oracle and/or its affiliates and is made available to you under the terms the Universal Permissive License v 1.0 as shown at [https://oss.oracle.com/licenses/upl/](https://oss.oracle.com/licenses/upl/).
This implementation is in part derived from and contains additional code from 3rd parties, the copyrights and licensing of which is detailed in the [LICENSE](./LICENSE.txt) and [THIRD_PARTY_LICENSE](THIRD_PARTY_LICENSE.txt) files.

[badge-slack]: https://img.shields.io/badge/Slack-join-active?logo=slack
Expand Down
57 changes: 0 additions & 57 deletions docs/site/02-downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ steps:
<th>Linux (aarch64)</th>
<th>Linux (amd64)</th>
<th>macOS (aarch64)</th>
<th>macOS (amd64)</th>
<th class="border-correct-4">Windows (amd64)</th>
</tr>
<tr>
Expand Down Expand Up @@ -133,20 +132,6 @@ steps:
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</a></td>
<td><a target="_blank" href="https://github.com/oracle/graalpython/releases/download/graal-{{ site.language_version }}/graalpy-{{ site.language_version }}-macos-amd64.tar.gz">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_261_486)">
<path d="M12 0C5.383 0 0 5.383 0 12C0 18.617 5.383 24 12 24C18.617 24 24 18.617 24 12C24 5.383 18.617 0 12 0Z" fill="#F29111"/>
<path d="M7 19H17C17.553 19 18 18.552 18 18C18 17.448 17.553 17 17 17H7C6.447 17 6 17.448 6 18C6 18.552 6.447 19 7 19Z" fill="#09222E"/>
<path d="M11.4693 14.78C11.6153 14.927 11.8073 15 11.9993 15C12.1913 15 12.3833 14.927 12.5293 14.78L15.7793 11.53C16.2513 11.06 15.9183 10.25 15.2493 10.25H12.9993V5.75C12.9993 5.198 12.5523 4.75 11.9993 4.75C11.4463 4.75 10.9993 5.198 10.9993 5.75V10.25H8.74927C8.08027 10.25 7.74727 11.06 8.21927 11.53L11.4693 14.78Z" fill="#09222E"/>
</g>
<defs>
<clipPath id="clip0_261_486">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</a></td>
<td><a target="_blank" href="https://github.com/oracle/graalpython/releases/download/graal-{{ site.language_version }}/graalpy-{{ site.language_version }}-windows-amd64.tar.gz"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
Expand Down Expand Up @@ -205,20 +190,6 @@ steps:
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</a></td>
<td><a target="_blank" href="https://github.com/oracle/graalpython/releases/download/graal-{{ site.language_version }}/graalpy-jvm-{{ site.language_version }}-macos-amd64.tar.gz">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_261_486)">
<path d="M12 0C5.383 0 0 5.383 0 12C0 18.617 5.383 24 12 24C18.617 24 24 18.617 24 12C24 5.383 18.617 0 12 0Z" fill="#F29111"/>
<path d="M7 19H17C17.553 19 18 18.552 18 18C18 17.448 17.553 17 17 17H7C6.447 17 6 17.448 6 18C6 18.552 6.447 19 7 19Z" fill="#09222E"/>
<path d="M11.4693 14.78C11.6153 14.927 11.8073 15 11.9993 15C12.1913 15 12.3833 14.927 12.5293 14.78L15.7793 11.53C16.2513 11.06 15.9183 10.25 15.2493 10.25H12.9993V5.75C12.9993 5.198 12.5523 4.75 11.9993 4.75C11.4463 4.75 10.9993 5.198 10.9993 5.75V10.25H8.74927C8.08027 10.25 7.74727 11.06 8.21927 11.53L11.4693 14.78Z" fill="#09222E"/>
</g>
<defs>
<clipPath id="clip0_261_486">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</a></td>
<td><a target="_blank" href="https://github.com/oracle/graalpython/releases/download/graal-{{ site.language_version }}/graalpy-jvm-{{ site.language_version }}-windows-amd64.tar.gz">
Expand Down Expand Up @@ -279,20 +250,6 @@ steps:
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</a></td>
<td><a target="_blank" href="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/refs/heads/main/graalpy/versions/latest-native-macos-amd64.url">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_261_486)">
<path d="M12 0C5.383 0 0 5.383 0 12C0 18.617 5.383 24 12 24C18.617 24 24 18.617 24 12C24 5.383 18.617 0 12 0Z" fill="#F29111"/>
<path d="M7 19H17C17.553 19 18 18.552 18 18C18 17.448 17.553 17 17 17H7C6.447 17 6 17.448 6 18C6 18.552 6.447 19 7 19Z" fill="#09222E"/>
<path d="M11.4693 14.78C11.6153 14.927 11.8073 15 11.9993 15C12.1913 15 12.3833 14.927 12.5293 14.78L15.7793 11.53C16.2513 11.06 15.9183 10.25 15.2493 10.25H12.9993V5.75C12.9993 5.198 12.5523 4.75 11.9993 4.75C11.4463 4.75 10.9993 5.198 10.9993 5.75V10.25H8.74927C8.08027 10.25 7.74727 11.06 8.21927 11.53L11.4693 14.78Z" fill="#09222E"/>
</g>
<defs>
<clipPath id="clip0_261_486">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</a></td>
<td><a target="_blank" href="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/refs/heads/main/graalpy/versions/latest-native-windows-amd64.url">
Expand Down Expand Up @@ -352,20 +309,6 @@ steps:
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</a></td>
<td><a target="_blank" href="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/refs/heads/main/graalpy/versions/latest-jvm-macos-amd64.url">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_261_486)">
<path d="M12 0C5.383 0 0 5.383 0 12C0 18.617 5.383 24 12 24C18.617 24 24 18.617 24 12C24 5.383 18.617 0 12 0Z" fill="#F29111"/>
<path d="M7 19H17C17.553 19 18 18.552 18 18C18 17.448 17.553 17 17 17H7C6.447 17 6 17.448 6 18C6 18.552 6.447 19 7 19Z" fill="#09222E"/>
<path d="M11.4693 14.78C11.6153 14.927 11.8073 15 11.9993 15C12.1913 15 12.3833 14.927 12.5293 14.78L15.7793 11.53C16.2513 11.06 15.9183 10.25 15.2493 10.25H12.9993V5.75C12.9993 5.198 12.5523 4.75 11.9993 4.75C11.4463 4.75 10.9993 5.198 10.9993 5.75V10.25H8.74927C8.08027 10.25 7.74727 11.06 8.21927 11.53L11.4693 14.78Z" fill="#09222E"/>
</g>
<defs>
<clipPath id="clip0_261_486">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</a></td>
<td class="border-correct-2"><a target="_blank" href="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/refs/heads/main/graalpy/versions/latest-jvm-windows-amd64.url">
Expand Down
2 changes: 1 addition & 1 deletion docs/site/_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
baseurl: "/python"
url: "https://graalvm.org"
github: "oracle/graalpython"
language_version: 25.0.1
language_version: 25.0.2
name: GraalPy

permalink: pretty
Expand Down
5 changes: 3 additions & 2 deletions docs/site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ layout: base
</div>
{%- highlight groovy -%}
implementation("org.graalvm.polyglot:polyglot:{{ site.language_version }}")
implementation("org.graalvm.polyglot:python:{{ site.language_version }}")
implementation("org.graalvm.python:python-embedding:{{ site.language_version }}")
{%- endhighlight -%}
</div>
<div class="example-logo-box">
Expand All @@ -163,8 +163,9 @@ implementation("org.graalvm.polyglot:python:{{ site.language_version }}")
</div>
{%- highlight java -%}
import org.graalvm.polyglot.Context;
import org.graalvm.python.embedding.GraalPyResources;

try (Context context = Context.create()) {
try (Context context = GraalPyResources.contextBuilder().build()) {
context.eval("python", "print('Hello from GraalPy!')");
}
{%- endhighlight -%}
Expand Down
11 changes: 7 additions & 4 deletions docs/user/Interoperability.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,11 @@ This allows other languages to call your Python code directly.
Then use it, for example, from Java code:
```java
import org.graalvm.polyglot.*;

import org.graalvm.python.embedding.GraalPyResources;

class Main {
public static void main(String[] args) {
try (var context = Context.create()) {
try (var context = GraalPyResources.createContext()) {
context.eval(Source.newBuilder("python", "file:///python_script.py").build());

String result = context.
Expand Down Expand Up @@ -399,10 +400,11 @@ import java.nio.file.Files;
import java.nio.file.Path;

import org.graalvm.polyglot.Context;
import org.graalvm.python.embedding.GraalPyResources;

class Main {
public static void main(String[] args) {
try (var context = Context.create()) {
try (var context = GraalPyResources.createContext()) {
context.eval("python", Files.readString(Path.of("path/to/interop/behavior/script.py")));
assert context.eval("python", "numpy.float64(12)").asDouble() == 12.0;
assert context.eval("python", "numpy.int32(12)").asByte() == 12;
Expand Down Expand Up @@ -446,12 +448,13 @@ The following snippet sets up the Java environment and makes the object availabl

```java
import org.example.MyJavaClass;
import org.graalvm.python.embedding.GraalPyResources;

class Main {

public static void main(String[] args) {
MyJavaClass myJavaObject = new MyJavaClass(42, 17);
try (var context = Context.create()) {
try (var context = GraalPyResources.createContext()) {
// myJavaObject will be globally available in example.py as my_java_object
context.getBindings("python").putMember("my_java_object", myJavaObject);
context.eval(Source.newBuilder("python", "example.py"));
Expand Down
4 changes: 2 additions & 2 deletions docs/user/Python-Runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pyenv shell graalpy-25.0.2

Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).

1. Find the download that matches the pattern _graalpy-XX.Y.Z-macos-amd64.tar.gz_ or _graalpy-XX.Y.Z-macos-aarch64.tar.gz_ (depending on your platform) and download.
1. Find the download that matches the pattern _graalpy-XX.Y.Z-macos-aarch64.tar.gz_ and download.
2. Remove the quarantine attribute.
```bash
sudo xattr -r -d com.apple.quarantine /path/to/graalpy
Expand All @@ -106,7 +106,7 @@ Alternatively, you can download a compressed GraalPy installation file from [Git
```bash
sudo xattr -r -d com.apple.quarantine ~/.pyenv/versions/graalpy-25.0.2
```
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-XX.Y.Z-macos-amd64/bin_ (or _graalpy-XX.Y.Z-macos-aarch64/bin_) directory.
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-XX.Y.Z-macos-aarch64/bin_ directory.

### Windows

Expand Down
7 changes: 4 additions & 3 deletions docs/user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,19 @@ In order to distribute the resulting application for other systems, follow these
- Include the GraalPy support and the [GraalVM Polyglot API](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/package-summary.html) in the `dependencies` section:
```bash
implementation("org.graalvm.polyglot:polyglot:25.0.2")
implementation("org.graalvm.polyglot:python:25.0.2")
implementation("org.graalvm.python:python-embedding:25.0.2")
```

3. Finally, replace the code in the file named _App.java_ as follows for a small Python embedding:
```java
package interop;

import org.graalvm.polyglot.*;
import org.graalvm.python.embedding.GraalPyResources;

class App {
public static void main(String[] args) {
try (var context = Context.create()) {
try (var context = GraalPyResources.createContext()) {
System.out.println(context.eval("python", "'Hello Python!'").asString());
}
}
Expand Down Expand Up @@ -157,7 +158,7 @@ In order to distribute the resulting application for other systems, follow these
class App {
...
public static void main(String[] args) {
try (Context context = GraalPyResources.createContext()) {
try (Context context = GraalPyResources.contextBuilder().build()) {
String src = """
from termcolor import colored
colored_text = colored("hello java", "red", attrs=["reverse", "blink"])
Expand Down
1 change: 0 additions & 1 deletion docs/user/Test-Tiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Pure Python code runs reliably on GraalPy with recent JDKs when JIT compilation

| Platform | Notes |
|---------------------------------|----------------------------------------------|
| amd64-macos-darwin-graal-latest | macOS on Intel CPUs running Big Sur or newer. |
| amd64-windows-msvc-graal-latest | Windows 11, Windows Server 2025, or newer. |
| amd64-linux-glibc-oracle-21 | JDK 21 is tested without JIT compilation. |
| aarch64-linux-glibc-oracle-21 | JDK 21 is tested without JIT compilation. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -48,7 +48,7 @@ public enum PythonOS {
PLATFORM_WIN32("win32", "Windows"),
PLATFORM_ANY(null, null);

public static final String SUPPORTED_PLATFORMS = "linux/amd64, linux/aarch64, macos/amd64, macos/aarch64, and windows/amd64";
public static final String SUPPORTED_PLATFORMS = "linux/amd64, linux/aarch64, macos/aarch64, and windows/amd64";

private final String name;
private final String uname;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -130,7 +130,7 @@ public void unpackFiles(Env env, Path targetDirectory) throws IOException {
throw new IOException("Extracting native resources failed for " +
osArch.toString() +
". This means that GraalPy cannot use native extensions and some built-in features that rely on native code will be unavailable. " +
"Currently supported platforms are linux/amd64, linux/aarch64, macos/amd64, macos/aarch64, and windows/amd64. " +
"Currently supported platforms are linux/amd64, linux/aarch64, macos/aarch64, and windows/amd64. " +
"If you are running on one of these platforms and are receiving this error, that indicates a bug in this build of GraalPy. " +
"If you are running on a different platform and want to keep going with this unsupported configuration, you can specify the system property \"" +
ResourcesFilter.EXCLUDE_PROP +
Expand Down
Loading