@@ -7,63 +7,99 @@ Thu 2020-03-19 - 5:19 PM
7
7
8
8
#### These we might want to use from C
9
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
10
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
11
18
* ** grp** : UNIX group file access. We need to use this from the C module.
19
+ * ** nis** : We should just use the C module
12
20
* ** spwd** : UNIX shadow password file access. We need to use this from the C module.
13
21
* ** 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.
21
22
* ** termios** : Posix terminal module IO. Use from C
22
- * ** _ tkinter** : Should be used from C
23
23
24
24
#### These are not strictly needed for now
25
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
26
27
* ** _ bisect** : Just a performance optimization, not necessary.
27
28
* ** _ datetime** : Just a performance optimization, not necessary.
29
+ * ** _ decimal** : Just performance, not necessary
28
30
* ** _ elementtree** : Just a performance optimization, not necessary.
31
+ * ** _ hashlib** : Just for performance
29
32
* ** _ heapq** : Just a performance optimization, not necessary.
33
+ * ** _ json** : Just for performance
30
34
* ** _ pickle** : Just a performance optimization, not necessary.
35
+ * ** _ queue** : Just for performance, not needed
36
+ * ** _ queue** : Just an optimization, we stubbed it out
31
37
* ** _ stat** : Just a performance optimization, not necessary.
32
38
* ** _ 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.
47
39
48
40
#### These we probably won't support
49
- * ** _ symtable** : Interface for the compilers internal symboltable, we cannot easily support this
50
41
* ** _ opcode** : We won't have it
42
+ * ** _ symtable** : Interface for the compilers internal symboltable, we cannot easily support this
51
43
* ** ossaudiodev** : Not needed, it's for Linux OSS audio
52
44
53
45
#### 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.
57
46
* ** _ codecs_cn, _ codecs_hk, _ codecs_iso2022, _ codecs_jp, _ codecs_kr, _ codecs_tw, _ multibytecodec** : We can just use our own codecs
58
47
* ** _ crypt** : We can just implement this in Java, it's a single function
59
48
* ** _ 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
61
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.
62
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
63
59
64
- ### Very incomplete on our part:
65
-
60
+ ### Incompleteness on our part:
66
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
67
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
68
69
* ** 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