Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore and deprecate client.tasks.get() without task_id
- Loading branch information
1 parent
ae74e1d
commit 86a7236
Showing
5 changed files
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
import json | ||
import re | ||
from itertools import chain | ||
from subprocess import check_call | ||
|
||
import black | ||
from click.testing import CliRunner | ||
from jinja2 import Environment, FileSystemLoader | ||
from pathlib import Path | ||
|
||
|
||
base_dir = Path(__file__).absolute().parent.parent | ||
asciidocs_dir = base_dir / "docs/asciidocs" | ||
flight_recorder_dir = base_dir.parent / "clients-flight-recorder" | ||
report_path = flight_recorder_dir / "recordings/docs/parsed-alternative-report.json" | ||
|
||
asciidocs_template = """[source, python] | ||
---- | ||
%s | ||
---- | ||
""" | ||
|
||
|
||
def main(): | ||
for filepath in asciidocs_dir.iterdir(): | ||
if filepath.name.endswith(".asciidoc"): | ||
filepath.unlink() | ||
|
||
if not flight_recorder_dir.exists() or not report_path.exists(): | ||
raise RuntimeError(f"clients-flight-recorder repository not checked out at {flight_recorder_dir}") | ||
|
||
with report_path.open() as f: | ||
report = json.loads(f.read()) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% extends "base" %} | ||
{% block request %} | ||
if task_id in SKIP_IN_PATH: | ||
warnings.warn( | ||
"Calling client.tasks.get() without a task_id is deprecated " | ||
"and will be removed in v8.0. Use client.tasks.list() instead.", | ||
DeprecationWarning, | ||
) | ||
|
||
{{ super()|trim }} | ||
{% endblock %} | ||
|