Skip to content

Commit 6a81328

Browse files
committed
Update docs and CHANGELOG
1 parent 2b7f9b3 commit 6a81328

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ language runtime. The main focus is on user-observable behavior of the engine.
99
* When calling a method on a foreign object in Python code, Python methods are now prioritized over foreign members.
1010
* Added `polyglot.register_interop_type` and `@polyglot.interop_type` to define custom Python methods for a given foreign class/type. See [the documentation](https://github.com/oracle/graalpython/blob/master/docs/user/Interoperability.md#the-interoperability-extension-api) for more information.
1111
* Foreign objects are now given a Python class corresponding to their interop traits.
12-
** Foreign lists now inherit from Python `list`, foreign dictionaries from `dict`, foreign iterators from `iterator`, foreign exceptions from `BaseException` and foreign none/null from `NoneType`.
13-
** This means all Python methods of these types are available on the corresponding foreign objects, which behave as close as possible as if they were Python objects.
14-
** See [the documentation](https://github.com/oracle/graalpython/blob/master/docs/user/Interoperability.md#interacting-with-foreign-objects-from-python-scripts) for more information.
12+
* Foreign lists now inherit from Python `list`, foreign dictionaries from `dict`, foreign strings from `str`, foreign iterators from `iterator`, foreign exceptions from `BaseException`, foreign numbers from `ForeignNumberType` and foreign none/null from `NoneType`.
13+
* This means all Python methods of these types are available on the corresponding foreign objects, which behave as close as possible as if they were Python objects.
14+
* See [the documentation](https://github.com/oracle/graalpython/blob/master/docs/user/Interoperability.md#interacting-with-foreign-objects-from-python-scripts) for more information.
1515
* Remove support for running with Sulong managed both in embeddings as well as through the `graalpy-managed` launcher.
1616

1717
## Version 24.1.0
@@ -40,9 +40,9 @@ language runtime. The main focus is on user-observable behavior of the engine.
4040
* `multiprocessing` module now uses the `spawn` method (creates new processes) by default. The formerly default method that uses threads and multiple Truffle contexts can be selected using `multiprocessing.set_start_method('graalpy')`.
4141
* `polyglot` module: add API to redefine Truffle interop messages for external / user defined types. For more details see [The Truffle Interoperability Extension API](docs/user/Interoperability.md).
4242
* Adding integration with jBang (https://www.jbang.dev/)
43-
** running example via `jbang hello@oracle/graalpython` or `jbang hello@oracle/graalpython "print(1*4)"`
44-
** creating new script via: `jbang init --template=graalpy@oracle/graalpython myscript.java`
45-
** creating new script with local maven repo for testing: `jbang init --template=graalpy_local_repo@oracle/graalpython -Dpath_to_local_repo=/absolute/path/to/local/maven/repository myscript.java'
43+
* running example via `jbang hello@oracle/graalpython` or `jbang hello@oracle/graalpython "print(1*4)"`
44+
* creating new script via: `jbang init --template=graalpy@oracle/graalpython myscript.java`
45+
* creating new script with local maven repo for testing: `jbang init --template=graalpy_local_repo@oracle/graalpython -Dpath_to_local_repo=/absolute/path/to/local/maven/repository myscript.java'
4646

4747
## Version 23.1.0
4848
* GraalPy distributions (previously known as GraalPy Enterprise) are now available under the [GFTC license](https://www.oracle.com/downloads/licenses/graal-free-license.html). The community builds published on Github have been renamed to `graalpy-community-<version>-<os>-<arch>.tar.gz`.

docs/user/Interoperability.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,15 @@ h == {1: 2, 3: 6} # True
9292
Specifically:
9393
* Foreign lists inherit from Python `list`
9494
* Foreign dictionaries inherit from `dict`
95+
* Foreign strings inherit from `str`
9596
* Foreign iterators inherit from `iterator`
9697
* Foreign exceptions inherit from `BaseException`
98+
* Foreign numbers inherit from `ForeignNumberType` (since `InteropLibrary` has no way to differentiate integers and floats, but see below)
9799
* Foreign none/null inherit from `NoneType`
100+
* Other foreign objects inherit from `foreign`
101+
102+
Note that Java primitives `byte`, `short`, `int`, `long` and `BigInteger` values are considered Python `int` objects,
103+
and Java primitives `float`, `double` values are considered Python `float` objects.
98104

99105
## Interacting with other dynamic languages from Python scripts
100106

0 commit comments

Comments
 (0)