diff --git a/CHANGELOG.md b/CHANGELOG.md index 89c2b645..1c0cd3ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Splunk Enterprise SDK for Python Changelog +## Version 1.6.16 + +### Bug fixes +[#312](https://github.com/splunk/splunk-sdk-python/pull/312) Fix issue [#309](https://github.com/splunk/splunk-sdk-python/issues/309), avoid catastrophic backtracking in searchcommands + ## Version 1.6.15 ### Bug fixes diff --git a/Makefile b/Makefile index 598bdea9..a09da530 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,14 @@ build_app: @echo "$(ATTN_COLOR)==> build_app $(NO_COLOR)" @python setup.py build dist +.PHONY: docs +docs: + @echo "$(ATTN_COLOR)==> docs $(NO_COLOR)" + @rm -rf ./docs/_build + @tox -e docs + @cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX" + @echo "$(ATTN_COLOR)==> Docs pages can be found at ./docs/_build/html, docs bundle available at ./docs/_build/docs_html.zip" + .PHONY: test test: @echo "$(ATTN_COLOR)==> test $(NO_COLOR)" diff --git a/README.md b/README.md index fbb4f382..94ae4246 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # The Splunk Enterprise Software Development Kit for Python -#### Version 1.6.15 +#### Version 1.6.16 The Splunk Enterprise Software Development Kit (SDK) for Python contains library code and examples designed to enable developers to build applications using the Splunk platform. diff --git a/docs/conf.py b/docs/conf.py index 3c7c43d4..84316d04 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -138,7 +138,7 @@ # Custom sidebar templates, maps document names to template names. #html_sidebars = { html_sidebars = { - '**': ['localtoc.html', 'globaltoc.html', 'searchbox.html'], + '**': ['globaltoc.html', 'searchbox.html'], } # Additional templates that should be rendered to pages, maps page names to diff --git a/examples/searchcommands_app/setup.py b/examples/searchcommands_app/setup.py index fdb73463..b9dc87b7 100755 --- a/examples/searchcommands_app/setup.py +++ b/examples/searchcommands_app/setup.py @@ -439,7 +439,7 @@ def run(self): setup( description='Custom Search Command examples', name=os.path.basename(project_dir), - version='1.6.15', + version='1.6.16', author='Splunk, Inc.', author_email='devinfo@splunk.com', url='http://github.com/splunk/splunk-sdk-python', diff --git a/splunklib/__init__.py b/splunklib/__init__.py index 668dcfe7..525dc8ee 100644 --- a/splunklib/__init__.py +++ b/splunklib/__init__.py @@ -16,5 +16,5 @@ from __future__ import absolute_import from splunklib.six.moves import map -__version_info__ = (1, 6, 15) +__version_info__ = (1, 6, 16) __version__ = ".".join(map(str, __version_info__)) diff --git a/splunklib/binding.py b/splunklib/binding.py index a95faa48..c3121fb8 100644 --- a/splunklib/binding.py +++ b/splunklib/binding.py @@ -1385,7 +1385,7 @@ def request(url, message, **kwargs): head = { "Content-Length": str(len(body)), "Host": host, - "User-Agent": "splunk-sdk-python/1.6.15", + "User-Agent": "splunk-sdk-python/1.6.16", "Accept": "*/*", "Connection": "Close", } # defaults diff --git a/splunklib/searchcommands/internals.py b/splunklib/searchcommands/internals.py index f7146e28..85f9e0fe 100644 --- a/splunklib/searchcommands/internals.py +++ b/splunklib/searchcommands/internals.py @@ -233,7 +233,7 @@ def replace(match): _escaped_character_re = re.compile(r'(\\.|""|[\\"])') - _fieldnames_re = re.compile(r"""("(?:\\.|""|[^"])+"|(?:\\.|[^\s"])+)""") + _fieldnames_re = re.compile(r"""("(?:\\.|""|[^"\\])+"|(?:\\.|[^\s"])+)""") _options_re = re.compile(r""" # Captures a set of name/value pairs when used with re.finditer diff --git a/tox.ini b/tox.ini index ba8fb2b2..d9a001e2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = clean,py27,py37 +envlist = clean,docs,py27,py37 skipsdist = {env:TOXBUILD:false} [testenv:pep8] @@ -26,7 +26,7 @@ application-import-names = splunk-sdk-python passenv = LANG setenv = SPLUNK_HOME=/opt/splunk INPUT_EXAMPLE_UPLOAD=/opt/splunk/var/log/splunk/splunkd_ui_access.log -whitelist_externals = true +allowlist_externals = make deps = pytest pytest-cov xmlrunner @@ -41,3 +41,9 @@ commands = deps = coverage skip_install = true commands = coverage erase + +[testenv:docs] +description = invoke sphinx-build to build the HTML docs +basepython = python3.7 +deps = sphinx >= 1.7.5, < 2 +commands = make -C docs/ html \ No newline at end of file