Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAaron Carlisle <carlisle.b3d@gmail.com>2019-07-06 23:48:49 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2019-07-07 00:01:11 +0300
commit8933a3bbd0c73e5af770744a591e4733912ec391 (patch)
tree99ecb25b3c42144ab9b4f616096d88c3a350f030 /doc
parent1f2f5f660bf96434cc91dff0539755e546369616 (diff)
API Docs: Fix Update changelog script to python3
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/sphinx_changelog_gen.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/python_api/sphinx_changelog_gen.py b/doc/python_api/sphinx_changelog_gen.py
index c96412b9d65..dc54de826ba 100644
--- a/doc/python_api/sphinx_changelog_gen.py
+++ b/doc/python_api/sphinx_changelog_gen.py
@@ -156,7 +156,8 @@ def api_dump():
for func_id, attr in funcs:
# arg_str = inspect.formatargspec(*inspect.getargspec(py_func))
- func_args_ids = tuple(inspect.getargspec(attr).args)
+ sig = inspect.signature(attr)
+ func_args_ids = [k for k, v in sig.parameters.items()]
dump_class[func_id] = (
"func_py", # basic_type
@@ -175,7 +176,7 @@ def api_dump():
import pprint
filename = api_dunp_fname()
- filehandle = open(filename, 'w')
+ filehandle = open(filename, 'w', encoding='utf-8')
tot = filehandle.write(pprint.pformat(dump, width=1))
filehandle.close()
print("%s, %d bytes written" % (filename, tot))
@@ -199,11 +200,11 @@ def compare_props(a, b, fuzz=0.75):
def api_changelog(api_from, api_to, api_out):
- file_handle = open(api_from, 'r')
+ file_handle = open(api_from, 'r', encoding='utf-8')
dict_from = eval(file_handle.read())
file_handle.close()
- file_handle = open(api_to, 'r')
+ file_handle = open(api_to, 'r', encoding='utf-8')
dict_to = eval(file_handle.read())
file_handle.close()
@@ -266,7 +267,7 @@ def api_changelog(api_from, api_to, api_out):
# also document function argument changes
- fout = open(api_out, 'w')
+ fout = open(api_out, 'w', encoding='utf-8')
fw = fout.write
# print(api_changes)