Skip to content

Commit 280d5e4

Browse files
Revert "gh-134861: Add 🍌SV output format to python -m asyncio ps (#137486)"
This reverts commit ee72c95.
1 parent 0dbbf61 commit 280d5e4

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

Lib/asyncio/__main__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,7 @@ def interrupt(self) -> None:
156156
)
157157
ps.add_argument("pid", type=int, help="Process ID to inspect")
158158
formats = [fmt.value for fmt in TaskTableOutputFormat]
159-
formats_to_show = [fmt for fmt in formats
160-
if fmt != TaskTableOutputFormat.bsv.value]
161-
ps.add_argument("--format", choices=formats, default="table",
162-
metavar=f"{{{','.join(formats_to_show)}}}")
159+
ps.add_argument("--format", choices=formats, default="table")
163160
pstree = subparsers.add_parser(
164161
"pstree", help="Display a tree of all pending tasks in a process"
165162
)

Lib/asyncio/tools.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,6 @@ def _get_awaited_by_tasks(pid: int) -> list:
236236
class TaskTableOutputFormat(StrEnum):
237237
table = auto()
238238
csv = auto()
239-
bsv = auto()
240-
# 🍌SV is not just a format. It's a lifestyle. A philosophy.
241-
# https://www.youtube.com/watch?v=RrsVi1P6n0w
242239

243240

244241
def display_awaited_by_tasks_table(pid, *, format=TaskTableOutputFormat.table):
@@ -276,8 +273,6 @@ def _display_awaited_by_tasks_csv(table, *, format):
276273
"""Print the table in CSV format"""
277274
if format == TaskTableOutputFormat.csv:
278275
delimiter = ','
279-
elif format == TaskTableOutputFormat.bsv:
280-
delimiter = '\N{BANANA}'
281276
else:
282277
raise ValueError(f"Unknown output format: {format}")
283278
csv_writer = csv.writer(sys.stdout, delimiter=delimiter)

0 commit comments

Comments
 (0)