From bb58f051e58dce378d0db4afa336235db5573d17 Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Wed, 5 Oct 2022 21:57:10 -0700 Subject: [PATCH] Added CoT XML Declaration constant --- CHANGELOG.md | 4 ++++ pytak/__init__.py | 1 + pytak/constants.py | 5 ++++- setup.py | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1350836..25fca18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +PyTAK 5.4.0 +----------- +Added CoT XML Declaration constant, should be included with all output XML CoT. + PyTAK 5.3.1 ----- Readme cleanup. diff --git a/pytak/__init__.py b/pytak/__init__.py index fb26f29..4d474bc 100644 --- a/pytak/__init__.py +++ b/pytak/__init__.py @@ -44,6 +44,7 @@ DEFAULT_HOST_ID, BOOLEAN_TRUTH, DEFAULT_MIN_ASYNC_SLEEP, + DEFAULT_XML_DECLARATION ) from .classes import ( # NOQA diff --git a/pytak/constants.py b/pytak/constants.py index bc378b0..4602903 100644 --- a/pytak/constants.py +++ b/pytak/constants.py @@ -79,4 +79,7 @@ # await asyncio.sleep(0) should allow co-routines to yield, but they end up # eating 100% CPU. @PeterQFR found bumping this to 0.1 solved the high CPU # issue. See: https://github.com/ampledata/pytak/pull/22 -DEFAULT_MIN_ASYNC_SLEEP: float = 0.1 \ No newline at end of file +DEFAULT_MIN_ASYNC_SLEEP: float = 0.1 + +# Python <3.8 has no way of including XML Declaration in ET.tostring(): +DEFAULT_XML_DECLARATION: str = '' \ No newline at end of file diff --git a/setup.py b/setup.py index 0f5fb43..79b6add 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ import setuptools __title__ = "pytak" -__version__ = "5.3.1" +__version__ = "5.4.0" __author__ = "Greg Albrecht W2GMD " __copyright__ = "Copyright 2022 Greg Albrecht" __license__ = "Apache License, Version 2.0"