diff --git a/CHANGELOG.md b/CHANGELOG.md index 63b77bda2..3625b9f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Splunk SDK for Python Changelog +## Version 1.6.9 + +### Bug Fix + +* Fix buffered input in python 3 + ## Version 1.6.8 ### Bug Fix diff --git a/examples/searchcommands_app/setup.py b/examples/searchcommands_app/setup.py index 27c7e1552..63966bf42 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.8', + version='1.6.9', 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 cb25a2f42..fcf811881 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, 8) +__version_info__ = (1, 6, 9) __version__ = ".".join(map(str, __version_info__)) diff --git a/splunklib/binding.py b/splunklib/binding.py index 62efd03f2..36a7f1080 100644 --- a/splunklib/binding.py +++ b/splunklib/binding.py @@ -1369,7 +1369,7 @@ def request(url, message, **kwargs): head = { "Content-Length": str(len(body)), "Host": host, - "User-Agent": "splunk-sdk-python/1.6.6", + "User-Agent": "splunk-sdk-python/1.6.9", "Accept": "*/*", "Connection": "Close", } # defaults diff --git a/splunklib/searchcommands/internals.py b/splunklib/searchcommands/internals.py index 8ef1adf7d..8af06ccb6 100644 --- a/splunklib/searchcommands/internals.py +++ b/splunklib/searchcommands/internals.py @@ -364,10 +364,6 @@ def read(self, ifile): name, value = None, None for line in ifile: - # SPL-175233 -- input is buffered, needs to be decoded - if sys.version_info >= (3, 0): - line = line.decode() - if line == '\n': break item = line.split(':', 1) diff --git a/splunklib/searchcommands/search_command.py b/splunklib/searchcommands/search_command.py index b93156587..b2835eec6 100644 --- a/splunklib/searchcommands/search_command.py +++ b/splunklib/searchcommands/search_command.py @@ -1054,13 +1054,8 @@ def iteritems(self): SearchMetric = namedtuple('SearchMetric', ('elapsed_seconds', 'invocation_count', 'input_count', 'output_count')) -# SPL-175233, set default stdin to be buffered -if sys.version_info >= (3, 0) and sys.platform == 'win32': - stdinput = sys.stdin.buffer -else: - stdinput = sys.stdin -def dispatch(command_class, argv=sys.argv, input_file=stdinput, output_file=sys.stdout, module_name=None): +def dispatch(command_class, argv=sys.argv, input_file=sys.stdin, output_file=sys.stdout, module_name=None): """ Instantiates and executes a search command class This function implements a `conditional script stanza `_ based on the value of