Skip to content

Commit 3097037

Browse files
committed
[GR-19144] Expand documentation a little
PullRequest: graalpython/844
2 parents 2c0cc8b + 365cbc4 commit 3097037

File tree

13 files changed

+1155
-80
lines changed

13 files changed

+1155
-80
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33
This changelog summarizes major changes between GraalVM versions of the Python
44
language runtime. The main focus is on user-observable behavior of the engine.
55

6+
## Version 20.1.0
7+
8+
* Update language support target and standard library to 3.8.2
9+
* Improve performance of tuples with primitive elements
10+
* Improve performance of using Python sequences from other GraalVM languages
11+
* Improve performance of dictionaries and sets
12+
* Support `cProfile` and `trace` modules through the GraalVM CPU sampler and coverage, respectively
13+
* Support NumPy on macOS
14+
* Support setuptools-scm and pytz.timezone
15+
* Support new syntax for iterable unpacking from yield and return statements
16+
* Fix issues with inspection and printing of non-Python numbers in the Chrome debugger
17+
* Fix issues with AST sharing across different contexts, if these context run concurrently on multiple threads
18+
* Fix code serialization and deserialization with pickle
19+
* Fix DirEntry.stat
20+
* Fix passing non-ASCII strings to `gethostbyname`
21+
* Fix `help(numpy)` to work again in the interactive REPL
22+
* Polyglot: Rethrow AttributeError as UnknownIdentifierException in invokeMember
23+
* Jython mode: treat Java `null` as identical to Python `None` when comparing with the `is` operator
24+
* Jython mode: `isinstance` now works with Java classes and objects
25+
* Improve errno handling in `posix` module
26+
627
## Version 20.0.0
728

829
* Jython Compatiblity: Implement `from JavaType import *` to import all static members of a Java class

docs/contributor/CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,29 @@ following command. This will create a native executable called `graalpython` and
167167
print its path as the last output, if successful.
168168

169169
mx python-svm
170+
171+
### Benchmarking
172+
173+
We use the `mx` facilities for benchmarking. Use this to list the available
174+
Python suites and VM configurations:
175+
176+
mx benchmark --list
177+
178+
If you just want to run a single benchmark from, for example, the `meso` suite,
179+
you can use this:
180+
181+
mx benchmark meso --list
182+
183+
Then if you want to run something, use (for example):
184+
185+
mx benchmark meso:nbody3
186+
187+
To select which Python VM you want to use, you can pass the arguments separated
188+
by `--`:
189+
190+
mx benchmark meso:nbody3 -- --python-vm=cpython
191+
192+
For additional arguments to the Python launcher, you can separate them by
193+
another double-dash:
194+
195+
mx benchmark meso:nbody3 -- --python-vm=graalpython -- --python.EmulateJython -Dgraal.Dump= -Dgraal.MethodFilter=*measure*

docs/contributor/MISSING.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# (Largely) Missing Core Modules
2+
3+
This is just a snapshot as of:
4+
Thu 2020-03-19 - 5:19 PM
5+
6+
### Builtin modules from sys.builtin_module_names that we don't have built-in or care shared object modules
7+
8+
#### These we might want to use from C
9+
* **_blake2**: hashing extension module, we could use it from C
10+
* **_csv**: We can use it from C
11+
* **_curses, _curses_panel**: Use from C
12+
* **_dbm**: Use from C
13+
* **_gdbm**: Use from C
14+
* **_sha3**: We should just run the C module
15+
* **_sqlite3**: Either use from C, or use a Java API.
16+
* **_tkinter**: Should be used from C
17+
* **audioop**: Should be useable from C
18+
* **grp**: UNIX group file access. We need to use this from the C module.
19+
* **nis**: We should just use the C module
20+
* **spwd**: UNIX shadow password file access. We need to use this from the C module.
21+
* **syslog**: Access to syslog. We should probable just use this from the C module.
22+
* **termios**: Posix terminal module IO. Use from C
23+
24+
#### These are not strictly needed for now
25+
* **_abc**: Just a performance optimization, not necessary.
26+
* **_asyncio**: We should write this ourselves, but I think the pure Python should be enough for a while
27+
* **_bisect**: Just a performance optimization, not necessary.
28+
* **_datetime**: Just a performance optimization, not necessary.
29+
* **_decimal**: Just performance, not necessary
30+
* **_elementtree**: Just a performance optimization, not necessary.
31+
* **_hashlib**: Just for performance
32+
* **_heapq**: Just a performance optimization, not necessary.
33+
* **_json**: Just for performance
34+
* **_pickle**: Just a performance optimization, not necessary.
35+
* **_queue**: Just for performance, not needed
36+
* **_queue**: Just an optimization, we stubbed it out
37+
* **_stat**: Just a performance optimization, not necessary.
38+
* **_warnings**: Warnings filtering, not strictly needed.
39+
40+
#### These we probably won't support
41+
* **_opcode**: We won't have it
42+
* **_symtable**: Interface for the compilers internal symboltable, we cannot easily support this
43+
* **ossaudiodev**: Not needed, it's for Linux OSS audio
44+
45+
#### These we should re-implement
46+
* **_codecs_cn, _codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr, _codecs_tw, _multibytecodec**: We can just use our own codecs
47+
* **_crypt**: We can just implement this in Java, it's a single function
48+
* **_ctypes, _ctypes_test**: We might be able to use these directly, but reimplement would be faster
49+
* **_lsprof**: We'll probably just want to replace this with the Truffle profiler
50+
* **_ssl**: To use this from C, we have to use the socketmodule from C also
51+
* **_string**: Empty right now, but its only two methods that we can re-implement
52+
* **_tracemalloc**: Memory allocation tracing, we should substitute with the Truffle instrument.
53+
* **_uuid**: Can be implemented ourselves, is just 1 function
54+
* **cmath**: Complex math module. We should implement this in Java, I think.
55+
* **faulthandler**: Needs to deal with Java stacks
56+
* **fcntl**: Should use the TruffleFile APIs
57+
* **parser**: We need to implement this for our parser
58+
* **select**: Needs to work with TruffleFile and future Truffle socket abstractions
59+
60+
### Incompleteness on our part:
61+
* **_ast**: Used in various places, including the help system. Would be nice to support, ours is an empty shell
62+
* **_contextvars**: Very incomplete
63+
* **_multiprocessing**: We need to implement this with the Context API
64+
* **_signal**: Needs a Truffle API for Signal handling, until then this is the bare minimum
65+
* **_socket**: We map to Java sockets, but not much else.
66+
* **array**: This just exposes the array type. Missing some methods and major optimizations.
67+
* **mmap**: We use this as a mixture from the C module, Python, and Java code. Needs major optimizations.
68+
* **posix**: Missing quite a bit of functionality that isn't easy to expose with Truffle API
69+
* **resource**: This is about resources, there should be Truffle APIs for this (there are issues open)
70+
* **thread**: The module is incomplete, and we don't have proper multi-threading in our impl, yet
71+
* **unicodedata**: A bit incomplete, but not difficult. Maybe should use a Java ICU library
72+
73+
### Basically complete or easy to make so
74+
* **_bz2**: We're already using this from C
75+
* **_collections**
76+
* **_imp**
77+
* **_io**: We have built the bare minimum and are using _pyio mostly, which has everything we need
78+
* **_md5**: We use the Python impl from PyPy
79+
* **_posixsubprocess**
80+
* **_random**
81+
* **_sha1**: We use the Python impl from PyPy
82+
* **_sha256**: We use the Python impl from PyPy
83+
* **_sha512**: We use the Python impl from PyPy
84+
* **_sre**: We use TRegex with fallback to the CPython module for special features
85+
* **_struct**: We already use this from the C module.
86+
* **_weakref**
87+
* **atexit**
88+
* **binascii**: Just missing a methods
89+
* **builtins**: Missing very few functions
90+
* **codecs**
91+
* **errno**
92+
* **functools**: Missing a few functions, we mostly implemented it in Python
93+
* **gc**
94+
* **itertools**: We mostly just implement all this in Python (a lot is taken from PyPy)
95+
* **locale**: Partially Truffle APIs, should probably use more to play nice for embedders
96+
* **marshal**
97+
* **math**
98+
* **operator**
99+
* **pwd**
100+
* **pyexpat**: We've re-implemented this in Java. If too incompatible, we should just switch to the C code.
101+
* **readline**: We re-implemented this in terms of JLine used in our launcher
102+
* **sys**
103+
* **time**: Missing a few methods, but nothing hard
104+
* **zipimport**: We have reimplemented this, but Python 3.8 is moving to a pure-Python impl that we can use
105+
* **zlib**

0 commit comments

Comments
 (0)