Skip to content

Commit f03e75b

Browse files
committed
more complete MISSING document that also documents modules we have but that aren't complete
1 parent 9fa1512 commit f03e75b

File tree

1 file changed

+66
-30
lines changed

1 file changed

+66
-30
lines changed

docs/contributor/MISSING.md

Lines changed: 66 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,99 @@ Thu 2020-03-19 - 5:19 PM
77

88
#### These we might want to use from C
99
* **_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
1014
* **_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
1118
* **grp**: UNIX group file access. We need to use this from the C module.
19+
* **nis**: We should just use the C module
1220
* **spwd**: UNIX shadow password file access. We need to use this from the C module.
1321
* **syslog**: Access to syslog. We should probable just use this from the C module.
14-
* **audioop**: Should be useable from C
15-
* **_curses, _curses_panel**: Use from C
16-
* **_csv**: We can use it from C
17-
* **_gdbm**: Use from C
18-
* **_dbm**: Use from C
19-
* **nis**: We should just use the C module
20-
* **_sqlite3**: Either use from C, or use a Java API.
2122
* **termios**: Posix terminal module IO. Use from C
22-
* **_tkinter**: Should be used from C
2323

2424
#### These are not strictly needed for now
2525
* **_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
2627
* **_bisect**: Just a performance optimization, not necessary.
2728
* **_datetime**: Just a performance optimization, not necessary.
29+
* **_decimal**: Just performance, not necessary
2830
* **_elementtree**: Just a performance optimization, not necessary.
31+
* **_hashlib**: Just for performance
2932
* **_heapq**: Just a performance optimization, not necessary.
33+
* **_json**: Just for performance
3034
* **_pickle**: Just a performance optimization, not necessary.
35+
* **_queue**: Just for performance, not needed
36+
* **_queue**: Just an optimization, we stubbed it out
3137
* **_stat**: Just a performance optimization, not necessary.
3238
* **_warnings**: Warnings filtering, not strictly needed.
33-
* **_asyncio**: We should write this ourselves, but I think the pure Python should be enough for a while
34-
* **_decimal**: Just performance, not necessary
35-
* **_hashlib**: Just for performance
36-
* **_json**: Just for performance
37-
* **_queue**: Just for performance, not needed
38-
39-
#### These we actually have, just not in Java
40-
* **_struct**: We already use this from the C module.
41-
* **_bz2**: We're already using this from C
42-
* **_md5**: We use the Python impl from PyPy
43-
* **_sha1**: We use the Python impl from PyPy
44-
* **_sha256**: We use the Python impl from PyPy
45-
* **_sha512**: We use the Python impl from PyPy
46-
* **mmap**: We already use this from the C module.
4739

4840
#### These we probably won't support
49-
* **_symtable**: Interface for the compilers internal symboltable, we cannot easily support this
5041
* **_opcode**: We won't have it
42+
* **_symtable**: Interface for the compilers internal symboltable, we cannot easily support this
5143
* **ossaudiodev**: Not needed, it's for Linux OSS audio
5244

5345
#### These we should re-implement
54-
* **_lsprof**: We'll probably just want to replace this with the Truffle profiler
55-
* **_tracemalloc**: Memory allocation tracing, we should substitute with the Truffle instrument.
56-
* **cmath**: Complex math module. We should implement this in Java, I think.
5746
* **_codecs_cn, _codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr, _codecs_tw, _multibytecodec**: We can just use our own codecs
5847
* **_crypt**: We can just implement this in Java, it's a single function
5948
* **_ctypes, _ctypes_test**: We might be able to use these directly, but reimplement would be faster
60-
* **parser**: We need to implement this for our parser
49+
* **_lsprof**: We'll probably just want to replace this with the Truffle profiler
6150
* **_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.
6253
* **_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
6359

64-
### Very incomplete on our part:
65-
60+
### Incompleteness on our part:
6661
* **_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
6765
* **_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
6869
* **resource**: This is about resources, there should be Truffle APIs for this (there are issues open)
69-
* **_multiprocessing**: We need to implement this with the Context API
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)