From 8ddf16dfeacb658272b5cfbd20e225f925e55830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Cl=C3=A9ment=20Tosi?= Date: Tue, 4 Jun 2019 13:40:29 +0100 Subject: [PATCH] doc: Patch for doc generation under Py3 Patch scripts with methods that are supported under Py2.7 and Py3. --- doc/build_instrument_method_map.py | 4 ++-- doc/build_plugin_docs.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/build_instrument_method_map.py b/doc/build_instrument_method_map.py index b1983801..28780b9c 100644 --- a/doc/build_instrument_method_map.py +++ b/doc/build_instrument_method_map.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright 2015-2015 ARM Limited +# Copyright 2015-2019 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ OUTPUT_TEMPLATE_FILE = os.path.join(os.path.dirname(__file__), 'source', 'instr def generate_instrument_method_map(outfile): - signal_table = format_simple_table([(k, v) for k, v in SIGNAL_MAP.iteritems()], + signal_table = format_simple_table([(k, v) for k, v in SIGNAL_MAP.items()], headers=['method name', 'signal'], align='<<') priority_table = format_simple_table(zip(CallbackPriority.names, CallbackPriority.values), headers=['decorator', 'priority'], align='<>') diff --git a/doc/build_plugin_docs.py b/doc/build_plugin_docs.py index 079c4a1f..3e5f8284 100755 --- a/doc/build_plugin_docs.py +++ b/doc/build_plugin_docs.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright 2014-2015 ARM Limited +# Copyright 2014-2019 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ def generate_plugin_documentation(source_dir, outdir, ignore_paths): exts = pluginloader.list_plugins(ext_type) sorted_exts = iter(sorted(exts, key=lambda x: x.name)) try: - wfh.write(get_rst_from_plugin(sorted_exts.next())) + wfh.write(get_rst_from_plugin(next(sorted_exts))) except StopIteration: return for ext in sorted_exts: