From 6b0df5bd26702ef185fc2a1097c6047c047f8b41 Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Wed, 26 May 2021 23:41:09 -0700 Subject: [PATCH 1/3] preserve the xmlns:user namespace when saving a file --- tableaudocumentapi/xfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tableaudocumentapi/xfile.py b/tableaudocumentapi/xfile.py index 8e213ab..3d650cc 100644 --- a/tableaudocumentapi/xfile.py +++ b/tableaudocumentapi/xfile.py @@ -121,6 +121,7 @@ def save_into_archive(xml_tree, filename, new_filename=None): def _save_file(container_file, xml_tree, new_filename=None): + ET.register_namespace("user","http://www.tableausoftware.com/xml/user") if new_filename is None: new_filename = container_file From 5c16c604e6154d641f6c93ff2543ea099732ee14 Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Wed, 26 May 2021 23:51:10 -0700 Subject: [PATCH 2/3] pycodestyle --- tableaudocumentapi/xfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tableaudocumentapi/xfile.py b/tableaudocumentapi/xfile.py index 3d650cc..33dba40 100644 --- a/tableaudocumentapi/xfile.py +++ b/tableaudocumentapi/xfile.py @@ -121,7 +121,7 @@ def save_into_archive(xml_tree, filename, new_filename=None): def _save_file(container_file, xml_tree, new_filename=None): - ET.register_namespace("user","http://www.tableausoftware.com/xml/user") + ET.register_namespace("user", "http://www.tableausoftware.com/xml/user") if new_filename is None: new_filename = container_file From 5af93c969e9a888073aba0c58687571d1fa8120e Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Wed, 26 May 2021 23:58:27 -0700 Subject: [PATCH 3/3] update changelog and version --- CHANGELOG.md | 4 ++++ setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c5976a..178d112 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ + +## 07 (26 May 2021) +* Fix bug in xfile that overwrote the namespace name when saving a document + ## 06 (11 January 2017) * Initial SQL and query banding support (#123) diff --git a/setup.py b/setup.py index 59270ed..e75a961 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='tableaudocumentapi', - version='0.6', + version='0.7', author='Tableau', author_email='github@tableau.com', url='https://github.com/tableau/document-api-python',