Skip to content

Commit 65c66c1

Browse files
committed
Set up documentation versioning and use rel paths
1 parent a74315a commit 65c66c1

File tree

7 files changed

+36
-52
lines changed

7 files changed

+36
-52
lines changed

docs/user/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ For native extensions running as LLVM bitcode, CPython is currently slower -- yo
4646
### I heard languages with JIT compilers have slow startup. Is that true for GraalVM's Python runtime?
4747

4848
It depends.
49-
When you use [Native Image](https://www.graalvm.org/reference-manual/native-image/) with Python, or the `graalpython` launcher of GraalVM, startup is competitive with CPython.
49+
When you use [Native Image](../native-image/README.md) with Python, or the `graalpython` launcher of GraalVM, startup is competitive with CPython.
5050
In any case, both with Native Image or when running on the JVM, you first need to warm up to reach peak performance. This is a complicated story in itself, but, in general, it can take a while (a minute or two) after you have reached and are running your core workload.
5151

5252
### Can I share warmed-up code between multiple Python contexts?

docs/user/Interoperability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ print(java.instanceof(my_list, ArrayList))
188188
# prints True
189189
```
190190

191-
See [Polyglot Programming](https://www.graalvm.org/reference-manual/polyglot-programming/) and [Embed Languages](https://www.graalvm.org/reference-manual/embed-languages/) for more information about interoperability with other programming languages.
191+
See [Polyglot Programming](../polyglot-programming.md) and [Embed Languages](../embedding/embed-languages.md) for more information about interoperability with other programming languages.
192192

193193
## The Behaviour of Types
194194

docs/user/Jython.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,4 +245,4 @@ There are no APIs particular to Python that are exposed, and everything is done
245245

246246
It is important to note that as long as your application is executed on GraalVM with the Python language installed,
247247
you can embed Python in your programs.
248-
For more details, refer to the [Embed Languages](https://www.graalvm.org/reference-manual/embed-languages/) guide.
248+
For more details, refer to the [Embed Languages](../embedding/embed-languages.md) guide.

docs/user/OsInterface.md

Lines changed: 28 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,32 @@
1+
---
2+
layout: docs-experimental
3+
toc_group: python
4+
link_title: Operating System Interfaces
5+
permalink: /reference-manual/python/OSInterface/
6+
---
7+
18
# Operating System Interfaces
29

3-
Truffle based GraalVM languages usually implement the system related
4-
functions using the [Truffle abstraction layer](https://www.graalvm.org/graalvm-as-a-platform/language-implementation-framework/), which is OS independent
5-
and provides extension points for the users when embedding GraalVM Python
6-
or other Truffle based languages into Java applications. See, for example,
7-
[Truffle FileSystem service-provider](https://www.graalvm.org/truffle/javadoc/org/graalvm/polyglot/io/FileSystem.html).
10+
Truffle-based GraalVM languages usually implement the system related functions using the [Truffle abstraction layer](../../../truffle/docs/README.md), which is OS independent
11+
and provides extension points for the users when embedding GraalVM Python or other Truffle based languages into Java applications.
12+
See, for example, [Truffle FileSystem service-provider](https://www.graalvm.org/truffle/javadoc/org/graalvm/polyglot/io/FileSystem.html).
813

9-
The Python standard library also provides OS abstraction, but exposes lower level interfaces,
10-
for instance, the OS module directly exposes some POSIX functions. On non-POSIX platforms,
11-
this interface is emulated to a degree.
14+
The Python standard library also provides OS abstraction, but exposes lower level interfaces, for instance, the OS module directly exposes some POSIX functions.
15+
On non-POSIX platforms, this interface is emulated to a degree.
1216

13-
GraalVM Python runtime provides two alternative implementations of the system related
14-
functionality offered by the builtin Python modules such as `os`.
15-
Which implementation is used can be controlled by the option `PosixModuleBackend`:
16-
valid values are `native` and `java`.
17+
GraalVM Python runtime provides two alternative implementations of the system related functionality offered by the builtin Python modules such as `os`.
18+
Which implementation is used can be controlled by the option `PosixModuleBackend`: valid values are `native` and `java`.
1719

1820
## Native backend
1921

20-
The `native` backend calls directly the POSIX API in mostly the same way
21-
as CPython, the reference Python implementation, does.
22+
The `native` backend calls directly the POSIX API in mostly the same way as CPython, the reference Python implementation, does.
2223

23-
This approach is the most compatible with CPython and provides bare access
24-
to the underlying OS interface without any emulation layer in between.
24+
This approach is the most compatible with CPython and provides bare access to the underlying OS interface without any emulation layer in between.
2525

26-
By default, this implementation bypasses the Truffle abstraction layer,
27-
therefore it is not sandboxed and does not support custom implementations
28-
of [Truffle FileSystem service-provider](https://www.graalvm.org/truffle/javadoc/org/graalvm/polyglot/io/FileSystem.html)
29-
and other Polyglot API providers related to system interfaces.
26+
By default, this implementation bypasses the Truffle abstraction layer, therefore it is not sandboxed and does not support custom implementations of [Truffle FileSystem service-provider](https://www.graalvm.org/truffle/javadoc/org/graalvm/polyglot/io/FileSystem.html) and other Polyglot API providers related to system interfaces.
3027

31-
The native backend is chosen by default when GraalVM Python
32-
is started via the `graalpython` or any other Python related
33-
launcher inside GraalVM. The exception are Python related launchers
34-
with `-managed` suffix available only in GraalVM Enterprise
35-
(e.g., `graalpython-managed`), which by default use the `java` POSIX backend.
28+
The native backend is chosen by default when GraalVM Python is started via the `graalpython` or any other Python related launcher inside GraalVM.
29+
The exception are Python related launchers with `-managed` suffix available only in GraalVM Enterprise (e.g., `graalpython-managed`), which by default use the `java` POSIX backend.
3630

3731
### Limitations of the native backend
3832

@@ -43,21 +37,15 @@ Known limitations:
4337

4438
## Java backend
4539

46-
The `java` backend uses the [Truffle abstraction layer](https://www.graalvm.org/graalvm-as-a-platform/language-implementation-framework/)
47-
and therefore supports custom Polyglot API providers related to system interfaces and sandboxing.
48-
Since this abstraction is POSIX agnostic, it does not expose
49-
all the necessary functionality. Some functionality is emulated, and some
50-
functionality is not supported at all.
40+
The `java` backend uses the [Truffle abstraction layer](../../../truffle/docs/README.md) and therefore supports custom Polyglot API providers related to system interfaces and sandboxing.
41+
Since this abstraction is POSIX agnostic, it does not expose all the necessary functionality. Some functionality is emulated, and some functionality is not supported at all.
5142

52-
The java backend is the default when GraalVM Python is run via
53-
the `Context` API, i.e., [embedded in Java applications](https://www.graalvm.org/reference-manual/embed-languages), or when it is launched using Python related launchers
54-
with `-managed` suffix available only in GraalVM Enterprise.
43+
The java backend is the default when GraalVM Python is run via the `Context` API, i.e., [embedded in Java applications](../embedding/embed-languages.md), or when it is launched using Python related launchers with `-managed` suffix available only in GraalVM Enterprise.
5544

5645
### Limitations of the emulated backend
5746

58-
GraalVM Python can log info about known incompatibility of functions executed at runtime,
59-
which includes the OS interface related functions. To turn on this logging use
60-
`--log.python.compatibility=FINE` or other desired logging level.
47+
GraalVM Python can log info about known incompatibility of functions executed at runtime, which includes the OS interface related functions.
48+
To turn on this logging, use `--log.python.compatibility=FINE` or other desired logging level.
6149

6250
Known limitations of the emulated layer are:
6351

@@ -76,12 +64,8 @@ Known limitations of the emulated layer are:
7664

7765
## Relation to Python native extensions
7866

79-
Apart from operating system interfaces exposed as builtin Python level modules,
80-
Python native extensions executed via the GraalVM LLVM runtime may also access
81-
OS interfaces at the C level. How such accesses are handled depends on the
82-
GraalVM LLVM runtime configuration.
67+
Apart from operating system interfaces exposed as builtin Python level modules, Python native extensions executed via the GraalVM LLVM runtime may also access OS interfaces at the C level.
68+
How such accesses are handled depends on the GraalVM LLVM runtime configuration.
8369

84-
At this point, the only combination where OS handles, such as file descriptors,
85-
can be shared between Python and the C code of Python extensions is with
86-
`native` PosixModuleBackend and `native` mode of GraalVM LLVM runtime.
87-
This combination is the default for the `graalpython` launcher.
70+
At this point, the only combination where OS handles, such as file descriptors, can be shared between Python and the C code of Python extensions is with `native` PosixModuleBackend and `native` mode of GraalVM LLVM runtime.
71+
This combination is the default for the `graalpython` launcher.

docs/user/ParserDetails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This guide elaborates on how Python files are parsed on the GraalVM Python runti
1414

1515
Creating the abstract syntax tree (AST) for a Python source has two phases.
1616
The first one creates a simple syntax tree (SST) and a scope tree.
17-
The second phase transforms the SST to the [Language Implementation framework](https://www.graalvm.org/graalvm-as-a-platform/language-implementation-framework/) tree.
17+
The second phase transforms the SST to the [Truffle Language Implementation framework](../../../truffle/docs/README.md) tree.
1818

1919
For the transformation, the scope tree it needed.
2020
The scope tree contains scope locations for variable and function definitions, and information about scopes.

docs/user/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ See [FAQ](FAQ.md) for commonly asked questions about this implementation.
1515

1616
## Installing Python
1717

18-
The Python runtime is not provided by default, and can be added to GraalVM with the [GraalVM Updater](https://www.graalvm.org/reference-manual/graalvm-updater), `gu`, tool:
18+
The Python runtime is not provided by default, and can be added to GraalVM with the [GraalVM Updater](../graalvm-updater.md), `gu`, tool:
1919
```shell
2020
gu install python
2121
```
2222

2323
The above command will install Python from the GitHub catalog for GraalVM Community Edition users.
24-
For GraalVM Enterprise users, the [manual installation](https://www.graalvm.org/reference-manual/graalvm-updater/#manual-installation) is required.
24+
For GraalVM Enterprise users, the [manual installation](../graalvm-updater.md/#manual-installation) is required.
2525

2626
## Running Python
2727

@@ -70,7 +70,7 @@ For more information, continue reading to the [Installing Supported Packages](Pa
7070

7171
## Native Image and JVM Runtime
7272

73-
By default, GraalVM runs Python from a binary, compiled ahead-of-time with [Native Image](https://www.graalvm.org/reference-manual/native-image/), yielding faster startup time and lower footprint.
73+
By default, GraalVM runs Python from a binary, compiled ahead-of-time with [Native Image](../native-image/README.md), yielding faster startup time and lower footprint.
7474
Although the ahead-of-time compiled binary includes the Python and LLVM interpreters, in order to interoperate with
7575
other languages you have to supply the `--jvm` argument.
7676
This instructs the launcher to run on the JVM instead of in Native Image mode.

docs/user/Tooling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To start debugging, open the following URL in Chrome:
2121
chrome-devtools://devtools/bundled/js_app.html?ws=127.0.1.1:9229/76fcb6dd-35267eb09c3
2222
```
2323

24-
The standard Python built-in `breakpoint()` will work using the [GraalVM's Chrome Inspector](https://www.graalvm.org/tools/chrome-debugger/) implementation.
24+
The standard Python built-in `breakpoint()` will work using the [GraalVM's Chrome Inspector](../../tools/chrome-debugger.md) implementation.
2525
You can inspect variables, set watch expressions, interactively evaluate code snippets, etc.
2626
However, this only works if you pass `--inspect` or some other inspect option. Otherwise, `pdb` is triggered as on CPython (and does not currently work).
2727

0 commit comments

Comments
 (0)