Skip to content

Commit 22683f9

Browse files
committed
remove asciitable from benchmark.py (not installable on Python 3.11), add benchmark_requirements.txt
1 parent 68292bd commit 22683f9

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

benchmark.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from timeit import timeit
22
import tabulate
3-
import asciitable
43
import prettytable
54
import texttable
65
import sys
@@ -9,7 +8,6 @@
98
from csv import writer
109
from io import StringIO
1110
import tabulate
12-
import asciitable
1311
import prettytable
1412
import texttable
1513
@@ -34,12 +32,6 @@ def run_prettytable(table):
3432
return str(pp)
3533
3634
37-
def run_asciitable(table):
38-
buf = StringIO()
39-
asciitable.write(table, output=buf, Writer=asciitable.FixedWidth)
40-
return buf.getvalue()
41-
42-
4335
def run_texttable(table):
4436
pp = texttable.Texttable()
4537
pp.set_cols_align(["l"] + ["r"]*9)
@@ -61,7 +53,6 @@ def run_tabulate(table, widechars=False):
6153
methods = [
6254
("join with tabs and newlines", "join_table(table)"),
6355
("csv to StringIO", "csv_table(table)"),
64-
("asciitable (%s)" % asciitable.__version__, "run_asciitable(table)"),
6556
("tabulate (%s)" % tabulate.__version__, "run_tabulate(table)"),
6657
(
6758
"tabulate (%s, WIDE_CHARS_MODE)" % tabulate.__version__,

benchmark_requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
prettytable
2+
texttable

0 commit comments

Comments
 (0)