Skip to content

Commit 00befe7

Browse files
Merge pull request #41 from mainsail-org/mir/whats-left-modules
what is left / entire module page
2 parents 995c9f6 + 6c33a6b commit 00befe7

File tree

6 files changed

+178
-0
lines changed

6 files changed

+178
-0
lines changed

Diff for: _config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ navigation:
4747
dashboards:
4848
- title: CPython test compatibility
4949
url: /pages/regression-tests-results.html
50+
- title: What's left to add to RustPython
51+
url: /pages/whats-left
5052

5153
# Build settings
5254
theme: minima

Diff for: _data/whats_left/modules.csv

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
module
2+
_abc
3+
_bisect
4+
_blake2
5+
_datetime
6+
_elementtree
7+
_heapq
8+
_locale
9+
_md5
10+
_pickle
11+
_sha1
12+
_sha256
13+
_sha3
14+
_sha512
15+
_stat
16+
_statistics
17+
_symtable
18+
_tracemalloc
19+
cmath
20+
fcntl
21+
grp
22+
pyexpat
23+
spwd
24+
syslog
25+
xxsubtype
26+
_bootlocale
27+
_strptime
28+
_sysconfigdata__linux_x86_64-linux-gnu
29+
_sysconfigdata__x86_64-linux-gnu
30+
binhex
31+
bz2
32+
cProfile
33+
cgitb
34+
contextvars
35+
crypt
36+
ctypes
37+
curses
38+
dataclasses
39+
dbm
40+
dummy_threading
41+
ensurepip
42+
filecmp
43+
fileinput
44+
imaplib
45+
lib2to3
46+
lzma
47+
mailbox
48+
mailcap
49+
modulefinder
50+
nntplib
51+
pickletools
52+
pipes
53+
poplib
54+
profile
55+
pstats
56+
pty
57+
pyclbr
58+
rlcompleter
59+
shelve
60+
sitecustomize
61+
smtpd
62+
smtplib
63+
sqlite3
64+
symbol
65+
tabnanny
66+
trace
67+
tracemalloc
68+
tty
69+
wave
70+
zipapp
71+
_asyncio
72+
_bz2
73+
_codecs_cn
74+
_codecs_hk
75+
_codecs_iso2022
76+
_codecs_jp
77+
_codecs_kr
78+
_codecs_tw
79+
_contextvars
80+
_crypt
81+
_ctypes
82+
_ctypes_test
83+
_curses
84+
_curses_panel
85+
_dbm
86+
_decimal
87+
_gdbm
88+
_hashlib
89+
_lsprof
90+
_lzma
91+
_multibytecodec
92+
_opcode
93+
_posixshmem
94+
_queue
95+
_sqlite3
96+
_ssl
97+
_testbuffer
98+
_testcapi
99+
_testimportmultiple
100+
_testinternalcapi
101+
_testmultiphase
102+
_uuid
103+
_xxsubinterpreters
104+
_xxtestfuzz
105+
audioop
106+
mmap
107+
nis
108+
ossaudiodev
109+
parser
110+
readline
111+
resource
112+
termios
113+
xxlimited

Diff for: _layouts/whats_left.html

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
layout: default
3+
---
4+
5+
<div class="w-80 m-auto mt-2">
6+
<div class="d-md-flex">
7+
<div class="d-sm-none">
8+
<img class="logo" src="{{site.baseurl}}/assets/img/rust-python-logo.svg" alt="RustPython Logo">
9+
</div>
10+
<div class="pl-md-2">
11+
<div class="title">{{ site.title }}</div>
12+
<div class="section-title">{{ page.title }} </div>
13+
</div>
14+
</div>
15+
</div>
16+
17+
18+
<div class="w-80 m-auto mt-2">
19+
{{ content }}
20+
<div class="section-title">What's Left: entire modules</div>
21+
<div class="column-count-is-2">
22+
<ol>
23+
{% for item in site.data.whats_left.modules %}
24+
<li class="word-wrap-anywhere"> {{ item.module }}</li>
25+
{% endfor %}
26+
</ol>
27+
</div>
28+
</div>
29+
</div>

Diff for: assets/style.css

+9
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ code.highlighter-rouge, mark.code {
103103
width: 80%;
104104
}
105105

106+
.column-count-is-2 {
107+
column-count: 2;
108+
}
109+
110+
.word-wrap-anywhere {
111+
word-wrap: anywhere;
112+
}
113+
114+
106115
/* colors */
107116
.bg-light {
108117
background-color: #f6f8fa;

Diff for: pages/whats-left.markdown

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: whats_left
3+
title: "What's Left"
4+
date: 2021-03-29 01:45:00 +0900
5+
categories: numbers
6+
---
7+
8+
RustPython currently supports the full Python syntax. This is "what's left" from the Python Standard Library.
9+
For each module's details, check the [Python Module Index](https://docs.python.org/3/py-modindex.html).
10+
11+
Note that not every module here is critical or feasible for RustPython to implement. For example, the `readline` Python module is heavily based around the API of GNU readline, but we use rustyline (a different readline implementation), so it probably wouldn't be worth the effort to emulate GNU
12+
readline on top of rustyline just to implement an infrequently used module.
13+
14+
In addition, some modules may just be modules written in Python that we haven't copied over to the stdlib yet; always be sure to check whether a module is implemented in Python before trying to rewrite it in Rust. You can follow [these instructions](https://rustpython.github.io/blog/2020/04/04/how-to-contribute-by-cpython-unittest.html#add-a-new-unittest-file) for copying over files from CPython's Lib.

Diff for: scripts/whats_left_modules.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# create directory in case it doesn't exist
4+
mkdir -p ../_data/whats_left
5+
6+
# start a new csv file for modules
7+
echo "module" > ../_data/whats_left/modules.csv
8+
9+
# read the temp file and look for "(entire module)"
10+
# save the output as csv
11+
cat ../_data/whats_left.temp | grep "(entire module)" | cut -d ' ' -f 1 >> ../_data/whats_left/modules.csv

0 commit comments

Comments
 (0)